Search
spotify.search
ActionBusiness appsconnection required
Calls the Spotify API with the connection's credentials.
Search Spotify's catalogue for tracks, albums, artists or playlists.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- OAuth 2.0
- Providers
- Spotify
- Secret shape
- {"client_id": "…", "client_secret": "…", "refresh_token": "…"}
- Config it needs
- market, device_id
- Resolved by
- config.connection_id, else node.connection_id
Configuration
5 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
query The search query. Spotify's field filters work here too, such as 'artist:Miles Davis year:1959'. | string | Yes | — | — | remaster track:Doxy artist:Miles Davis |
types Comma-separated item types to search across. Spotify accepts track, album, artist, playlist, show, episode and audiobook. | string | No | track | — | track |
market ISO 3166-1 alpha-2 country code deciding which catalogue is visible, such as 'US'. Left blank, the connection's default market is used, and the market on the authorised account takes priority over both. | string | No | — | — | US |
limit How many items to return in one page. This endpoint accepts at most 10. | number | No | 5 | 1–10 | — |
offset Index of the first item to return, for paging through a large result. | number | No | 0 | ≥ 0 | — |
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"limit": 5,
"market": "US",
"offset": 0,
"query": "remaster track:Doxy artist:Miles Davis",
"types": "track"
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
tracks.items Matching tracks, when 'track' was searched. | array | — |
tracks.total How many tracks matched in total. | number | — |
albums.items Matching albums, when 'album' was searched. | array | — |
albums.total How many albums matched in total. | number | — |
artists.items Matching artists, when 'artist' was searched. | array | — |
artists.total How many artists matched in total. | number | — |
playlists.items Matching playlists, when 'playlist' was searched. | array | — |
playlists.total How many playlists matched in total. | number | — |
{
"albums": {
"items": [],
"total": 0
},
"artists": {
"items": [],
"total": 0
},
"playlists": {
"items": [],
"total": 0
},
"tracks": {
"items": [],
"total": 0
}
}See Search run in a workflow.
In a technical demo we add the Spotify connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.