To start using the API, you need to generate an API key.
https://song.speakinsongs.com/api/v1/songs
x-api-key: <add-api-key-here>
{
"words": ["hello", "world"]
}
NOTE 1: The words array CANNOT be empty. Must contain ONLY strings.
NOTE 2: All punctuation is stripped from strings to provide the best matching results.
curl
:curl -X POST https://song.speakinsongs.com/api/v1/songs \
-H "Content-Type: application/json" \
-H "x-api-key: <add-api-key-here>" \
-d '{"words": ["hello", "world"]}'
The API returns an array of objects, where each object provides detailed information about a matched song. Below is the structure of the response:
NOTE: If a word cannot be matched to a song then the object will be returned with NULL values
{
"songs": [
{
"input": "hello",
"song_name": "Hello",
"spotify_song_id": "1Yk0cQdMLx5RzzFTYwmuld",
"spotify_song_urls": {
"spotify": "https://open.spotify.com/track/1Yk0cQdMLx5RzzFTYwmuld"
},
"artists": [
{
"name": "Adele",
"id": "4dpARuHxo51G3z768sgnrY",
"uri": "spotify:artist:4dpARuHxo51G3z768sgnrY",
"href": "https://api.spotify.com/v1/artists/4dpARuHxo51G3z768sgnrY",
"external_urls": {
"spotify": "https://open.spotify.com/artist/4dpARuHxo51G3z768sgnrY"
}
}
],
"images": [
{
"height": 640,
"width": 640,
"url": "https://i.scdn.co/image/ab67616d0000b2737b9888dc365b8f957c63df14"
},
{
"height": 300,
"width": 300,
"url": "https://i.scdn.co/image/ab67616d00001e027b9888dc365b8f957c63df14"
},
{
"height": 64,
"width": 64,
"url": "https://i.scdn.co/image/ab67616d000048517b9888dc365b8f957c63df14"
}
],
"popularity": 73
},
{
"input": "world",
"song_name": "world",
"spotify_song_id": "4hFZF8l3pJfFOtXs7K0nUJ",
"spotify_song_urls": {
"spotify": "https://open.spotify.com/track/4hFZF8l3pJfFOtXs7K0nUJ"
},
"artists": [
{
"name": "Zeph",
"id": "502gYHkFCtLzBIcU4ctPLd",
"uri": "spotify:artist:502gYHkFCtLzBIcU4ctPLd",
"href": "https://api.spotify.com/v1/artists/502gYHkFCtLzBIcU4ctPLd",
"external_urls": {
"spotify": "https://open.spotify.com/artist/502gYHkFCtLzBIcU4ctPLd"
}
}
],
"images": [
{
"height": 640,
"width": 640,
"url": "https://i.scdn.co/image/ab67616d0000b2735ec850e5d828e40f03f4588c"
},
{
"height": 300,
"width": 300,
"url": "https://i.scdn.co/image/ab67616d00001e025ec850e5d828e40f03f4588c"
},
{
"height": 64,
"width": 64,
"url": "https://i.scdn.co/image/ab67616d000048515ec850e5d828e40f03f4588c"
}
],
"popularity": 43
}
]
}
The images array may contain multiple sizes of the same image, useful for responsive design. Use the spotify_song_urls and artists.external_urls fields to link directly to Spotify resources.