# SoundCloud Playlist Tracks

Hydrated playlist members: the playlist is fetched once and its members are resolved in bulk chunks, so this endpoint fans out over several upstream lookups. Each lookup is billed separately, therefore the response reports the fan-out in hydration.upstream_calls and hydration.chunks. Reaching the member cap is a successful, billable response with truncated=true and hydration.next_offset set; request that offset to hydrate the next page, which costs only the lookups for its own members. max_members layers a cap on top of the operator-sized configured default rather than overriding it: a value larger than the configured cap is clamped down to it, and hydration.member_cap always reports the cap that was actually applied. Members SoundCloud no longer resolves keep their stub fields instead of being dropped or invented.

- **Documentation:** [https://scrappa.co/docs/soundcloud-api/soundcloud_playlist_tracks](https://scrappa.co/docs/soundcloud-api/soundcloud_playlist_tracks)
- **API group:** SoundCloud API
- **Endpoint:** `GET https://scrappa.co/api/soundcloud/playlists/tracks`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | SoundCloud numeric playlist id, e.g. 2000000000. |
| `max_members` | integer | No | Upper bound of hydrated members. Defaults to the configured member cap (500); a larger value is clamped down to that cap rather than overriding it. |
| `offset` | integer | No | Member offset for paging a truncated playlist. Defaults to 0. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/soundcloud/playlists/tracks?id=2000000000&max_members=5&offset=0"
```

## Example response

```json
{
    "search_parameters": {
        "engine": "soundcloud_playlist_tracks",
        "id": "2000000000",
        "max_members": 5,
        "offset": 0
    },
    "playlist": {
        "id": 2000000000,
        "title": "Midnight Sessions",
        "track_count": 9,
        "permalink_url": "https://soundcloud.com/artist/sets/midnight-sessions"
    },
    "tracks": [
        {
            "id": 1000000000,
            "title": "Night Drive",
            "duration": 214000,
            "playback_count": 48000,
            "permalink_url": "https://soundcloud.com/artist/night-drive"
        }
    ],
    "member_count": 5,
    "hydration": {
        "upstream_calls": 2,
        "chunks": 1,
        "member_cap": 5,
        "truncated": true,
        "next_offset": 5,
        "unresolved_member_ids": 0
    },
    "pagination": {
        "offset": 0,
        "limit": 5,
        "total": 9,
        "next_offset": 5
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A required parameter is missing or a parameter failed validation. |
| 404 | SoundCloud Not Found | The requested SoundCloud object does not exist. |
| 503 | SoundCloud Upstream Unavailable | SoundCloud could not be reached within the full attempt budget. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
