Skip to content

All API Endpoints

Novandev edited this page Apr 30, 2019 · 3 revisions

Song Emotions

  • [POST /song-emotions/]

Song Emotions Response Information

When queried by the URL endpoints above, The 5 emotions percent in decimal format of a song will be returned in the response body as a JSON object. Each object includes the following information:

  • anger
  • fear
  • joy
  • sadness
  • surprise

Example Song Emotions Post request format

['POST'] { "lyrics":"Listen to the song here in my heart A melody I start but can't complete Listen to the sound from deep within Its only beginning to find release... " }

Example Song Emotions response

Status: 200OK

{ "anger": 0.17771474332941883, "fear": 0.10931373285741239, "joy": 0.10823320304592757, "sadness": 0.3939631624724091, "surprise": 0.05257683244879963 }

Similar Songs

  • [POST /similar-songs/]

Similar Songs Response Information

When queried by the URL endpoints above, a list of similar songs to the emotions posted will be retuned as a list of JSON objects. Each JSON object includes the following information:

  • artist

  • title

Example Similar Songs Post request format

['POST'] { "joy":"0.65", "anger":"0.35", "sadness":"0.12", "fear":"0.36", "surprise":"0.45" }

Example Song Emotions response

Status: 200OK

[ { "artist": "Talking Heads", "title": "Artists Only" }, { "artist": "Blake Shelton", "title": "Neon Light" }, { "artist": "Keith Urban", "title": "All for You" }, { "artist": "Charlie Puth", "title": "How Long" }, { "artist": "The Hit Crew", "title": "Hamster Dance" } ]