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 & limited to 200 elements.
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
[
{
"input": "example-word",
"song_name": "Example Song",
"spotify_song_id": "exampleSongId123",
"spotify_song_urls": {
"spotify": "https://open.spotify.com/track/exampleSongId123"
},
"artists": [
{
"name": "Example Artist",
"id": "exampleArtistId123",
"uri": "spotify:artist:exampleArtistId123",
"external_urls": {
"spotify": "https://open.spotify.com/artist/exampleArtistId123"
}
}
],
"images": [
{
"height": 640,
"width": 640,
"url": "https://example.com/image1.jpg"
},
]
}
]
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.