Skip to main content

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

  1. User types a song name (e.g., "never gonna give")
  2. Search suggestions endpoint returns Spotify matches (e.g., "Never Gonna Give You Up - Rick Astley")
  3. User selects the Spotify suggestion
  4. Pass the Spotify URL to the search endpoint
  5. 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