Search by reference
Reference-Based Search
Let users search by typing a song they already know. The API finds Epidemic Sound tracks that sound similar to any Spotify track.
Users often think in references: "I want something that sounds like Never Gonna Give You Up". This feature lets them search that way—no music vocabulary needed.
How it works
- User types a song name (e.g., "never gonna give")
- Search suggestions endpoint returns Spotify matches (e.g., "Never Gonna Give You Up - Rick Astley")
- User selects the Spotify suggestion
- Pass the Spotify URL to the search endpoint
- User gets Epidemic Sound tracks with a similar vibe
Example autosuggest response
The search suggestions endpoint returns suggestions of type external/spotify alongside regular TEXT suggestions:
{
"suggestions": [
{
"value": "https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT",
"title": "Never Gonna Give You Up - Rick Astley",
"type": "external/spotify"
}
]
}
When the user selects this suggestion, use the value (the Spotify URL) as the term parameter in your search request.
Implementation tips
- Show a Spotify icon next to Spotify suggestions so users know what they're selecting
- Debounce autosuggest calls (e.g., 300ms delay) to avoid excessive API requests
- Users can also paste Spotify URLs directly into your search field