Search Spotify
search_musicSearch Spotify for tracks, albums, artists, or playlists by query. Filter results by year, genre, artist, or album, and paginate with offset.
Instructions
Search Spotify for tracks, albums, artists, or playlists.
Args:
query: Search query
qtype: Type ('track', 'album', 'artist', 'playlist')
limit: Max results per page (1-50, default 10). Spotify caps search at 10
per page for restricted apps and rejects anything larger; a larger
limit is retried at the cap rather than failing. Check the returned
`limit` for what was actually served, and use `offset` to go deeper.
offset: Number of results to skip for pagination (default 0)
year: Filter by year (e.g., '2024')
year_range: Filter by year range (e.g., '2020-2024')
genre: Filter by genre (e.g., 'electronic', 'hip-hop')
artist: Filter by artist name
album: Filter by album name
Returns:
SearchResults with 'items' (list of tracks) and pagination info ('total', 'limit', 'offset')
Note: Filters use Spotify's search syntax. For large result sets, use offset to paginate.
Example: query='love', year='2024', genre='pop' searches for 'love year:2024 genre:pop'
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| year | No | ||
| album | No | ||
| genre | No | ||
| limit | No | ||
| qtype | No | track | |
| query | Yes | ||
| artist | No | ||
| offset | No | ||
| year_range | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| next | No | ||
| items | Yes | ||
| limit | Yes | ||
| total | Yes | ||
| offset | Yes | ||
| previous | No |