This document provides essential technical specifications for AI agents, LLMs, and automated tools attempting to integrate with the SoundCloud API.
The SoundCloud API is defined via Swagger/OpenAPI. Agents should use the following specification for endpoint discovery and schema validation:
Developers can request API credentials (client IDs) through their SoundCloud account settings.
- Request URL: https://soundcloud.com/you/apps/
- Policy: Currently, SoundCloud limits credentials to one application per person.
SoundCloud requires OAuth 2.1 for all authenticated requests.
⚠️ IMPORTANT: Do not use the legacy endpointapi.soundcloud.com/oauth2/token. This endpoint is deprecated and does not support OAuth 2.1 requirements.
Agents must follow the Authorization Code Flow with PKCE (Proof Key for Code Exchange) as mandated by the OAuth 2.1 standard.
- Authorization: Direct the user to the SoundCloud authorization page.
- Token Exchange: Exchange the code for an access token via compliant endpoints.
- Security: Always verify the
stateparameter to prevent CSRF.
For detailed logic, refer to the SoundCloud Authentication Guide.
Do not use the legacy /stream endpoint.
- New Standard: Use the
/tracks/{track_urn}/streamsendpoint as it only returns 30sec snippets - Format: This endpoint provides modern AAC-based HLS transcodings (e.g.,
hls_aac_160_url), which offer superior quality and reliability compared to legacy streams.
AI Agents should prioritize cursor-based pagination over static page numbers. * Why: Cursors are more resilient to real-time data changes and offer better performance for deep-scrolling large datasets.
- Implementation: Look for the
next_hreforcursorfield in the API response. Use this entire URL or token for the subsequent request rather than manually incrementing an `offset