# How to Automate Spotify Playlist Curation using the API

- Tool: API Automations
- Difficulty: Beginner
- Fix time: 15-30 minutes
- Compatibility: OAuth 2.0 app — Development Mode (max 5 authorized users, app owner must have Spotify Premium)
- Last updated: May 2026

## TL;DR

Automate Spotify playlist curation by searching tracks via GET /v1/search?type=track, creating playlists via POST /v1/users/{user_id}/playlists, and adding tracks via POST /v1/playlists/{id}/tracks. Requires OAuth 2.0 Authorization Code flow with playlist-modify-public or playlist-modify-private scopes. Rate limits use a rolling 30-second window with undisclosed thresholds — batch track adds in groups of 100 with 1-second delays to stay safe.

## Best practices

- Always dedup track URIs before adding to a playlist — Spotify allows duplicate tracks and will add them without error
- Use PUT /v1/playlists/{id}/tracks (replace) instead of POST (append) for weekly refreshes to avoid accumulating hundreds of tracks
- Sort search results by popularity descending before selecting tracks — Spotify's search ranking isn't always quality-ordered
- Check response snapshot_id after each add to confirm the operation succeeded before moving to the next batch
- Handle eventual consistency: tracks added via API may take a few seconds to appear on Spotify clients — don't interpret this as an error
- Test in Development Mode with your own account before requesting Extended Quota — the 5-user limit is sufficient for personal automation
- Log the playlist URL from external_urls.spotify after creation — useful for quick manual verification runs

## Frequently asked questions

### Is the Spotify API free?

Yes — the Spotify Web API is free to use. In Development Mode, you can make API calls at no cost but are limited to 5 authorized users per Client ID (as of February 11, 2026), and the app owner must have Spotify Premium. For production apps serving more than 5 users, Extended Quota Mode is required, which since May 2025 is only available to legally registered organizations with 250,000+ monthly active users.

### Can I use the /recommendations endpoint to curate playlists?

No — GET /recommendations was permanently deprecated for apps created after November 27, 2024 and returns HTTP 403. The working alternative is GET /v1/search with genre and year filters to discover tracks, combined with GET /v1/me/top/tracks to understand the user's taste. See our song recommendations page for a detailed migration guide.

### What happens when I hit the rate limit?

You receive HTTP 429 with a Retry-After header indicating how many seconds to wait. The exact threshold is undisclosed by Spotify and uses a rolling 30-second window. Always read Retry-After and sleep exactly that duration before retrying. Proactively add 1-second delays between batch operations to avoid hitting the limit in the first place.

### Why does my playlist creation return 403 even though my token is valid?

The most common cause is missing OAuth scopes. Playlist creation requires playlist-modify-public for public playlists or playlist-modify-private for private ones — Client Credentials flow cannot create playlists at all since it has no user identity. Re-authorize the user with the correct scope in your authorization URL. If the scope is correct, check that you're using the Authorization Code flow token, not a Client Credentials token.

### How many tracks can I add to a playlist per request?

The API accepts a maximum of 100 track URIs per POST /v1/playlists/{id}/tracks request. For larger lists, split them into batches of 100 and add 1-second delays between each batch. Use PUT instead of POST when you want to replace all existing tracks in one operation (also limited to 100 URIs, so use POST for the rest).

### Can RapidDev help me build a custom Spotify playlist automation?

Yes — RapidDev has built 600+ integrations and can set up a production Spotify curation pipeline with OAuth flow, scheduled curation, and a management dashboard. Reach out for a free consultation at rapidevelopers.com.

### Does Spotify have webhooks so I can react to events in real time?

No — Spotify has no webhook system for the Web API. The only event-driven primitive is the Web Playback SDK's in-browser player events, which only work while the user is actively playing. For any background automation (new releases, updated playlists), you must poll on a schedule using cron or a task queue.

---

Source: https://www.rapidevelopers.com/api-automations/how-to-automate-spotify-playlist-curation-using-the-api
© RapidDev — https://www.rapidevelopers.com/api-automations/how-to-automate-spotify-playlist-curation-using-the-api
