PHPackages                             domlip94/soundcloudfetcher - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. domlip94/soundcloudfetcher

ActiveLibrary[API Development](/categories/api)

domlip94/soundcloudfetcher
==========================

Simple PHP Wrapper for SoundCloud API

05PHP

Since Jul 14Pushed 6y agoCompare

[ Source](https://github.com/DomLip94/SoundCloudFetcher)[ Packagist](https://packagist.org/packages/domlip94/soundcloudfetcher)[ RSS](/packages/domlip94-soundcloudfetcher/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Simple SoundCloud API Wrapper
=============================

[](#simple-soundcloud-api-wrapper)

Get started
-----------

[](#get-started)

The quickest way to get going is by using Composer (it's 2019).

Do so by executing the command below in your cli:

```
composer require domlip94/soundcloudfetcher

```

To use, firstly we instantiate the class

```
$soundCloud = new SoundCloud([
    'client_id'     => null,
    'client_secret' => null
]);

```

The **client\_secret** is not usually required, but **client\_id** is.

Available Methods
-----------------

[](#available-methods)

At the minute the only available methods are resolve and fetch track data, I intend to add more methods soon.

Alternatively, you can call an undefined API method yourself (see below.)

### Resolve a Soundcloud URL

[](#resolve-a-soundcloud-url)

This resolves a SoundCloud URL to a track ID as an integer, which you may need for other API calls.

It is called like so:

```
$soundCloud->resolveSoundCloudUrl(TRACK_URL);

```

The **TRACK\_URL** argument would obviously be the link to the track, like below.

```
$soundCloud->resolveSoundCloudUrl('https://soundcloud.com/adamstuartfunston/af-podcast-014');

$soundCloud->resolveSoundCloudUrl($trackUrl);

```

This then returns

```
(int) 649287689

```

### Get track data

[](#get-track-data)

This returns the track data as an array.

You can either choose certain array keys to return, or return everything.

It is called like so:

```
$soundCloud->fetchTrackData(TRACK_URL, ARRAY_KEYS_TO_RETURN);

```

- **ARRAY\_KEYS\_TO\_RETURN** must be an array or null.

So an example would be,

###### Get all track data

[](#get-all-track-data)

```
$soundCloud->fetchTrackData('https://soundcloud.com/adamstuartfunston/af-podcast-014');

```

###### Get track length

[](#get-track-length)

```
$soundCloud->fetchTrackData('https://soundcloud.com/adamstuartfunston/af-podcast-014', [
    'duration'
]);

```

###### Get track title and length

[](#get-track-title-and-length)

```
$soundCloud->fetchTrackData('https://soundcloud.com/adamstuartfunston/af-podcast-014', [
    'title', duration'
]);

```

### Other methods

[](#other-methods)

While I build this out, only the basics are available. However, the two methods above call the same method to execute their call.

That method is:

```
$soundCloud->doApiCall(API_METHOD, METHOD_ARGUMENTS);

```

- **API\_METHOD** is the remote API method endpoint.
- **METHOD\_ARGUMENTS** is an array of arguments we will provide to the SoundCloud API.

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7ec73350d4313b81cfe946b5ef715f875bf9ff6e28e2f4f39dede1f0a28cfbac?d=identicon)[DomLip94](/maintainers/DomLip94)

---

Top Contributors

[![DomLip94](https://avatars.githubusercontent.com/u/23213222?v=4)](https://github.com/DomLip94 "DomLip94 (1 commits)")

### Embed Badge

![Health badge](/badges/domlip94-soundcloudfetcher/health.svg)

```
[![Health](https://phpackages.com/badges/domlip94-soundcloudfetcher/health.svg)](https://phpackages.com/packages/domlip94-soundcloudfetcher)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M475](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M270](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M452](/packages/google-gax)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
