Get music recommendations for your videos and reels you post to Facebook and Instagram. Learn what music is performing well on Meta's apps.
You will need:
pages_read_engagementTo get a list of popular songs on Meta’s apps, send a GET request to the /audio/recommendations endpoint with the type parameter set to FACEBOOK_POPULAR_MUSIC.
curl -i -X GET "https://graph.facebook.com/v24.0/audio/recommendations
?type=FACEBOOK_POPULAR_MUSIC
&access_token=ACCESS_TOKEN"
To get a list of recent additions to Meta’s music library, send a GET request to the /audio/recommendations endpoint with the type parameter set to FACEBOOK_NEW_MUSIC.
curl -i -X GET "https://graph.facebook.com/v24.0/audio/recommendations
?type=FACEBOOK_NEW_MUSIC
&access_token=ACCESS_TOKEN"
To get personalized music recommendations for you, send a GET request to the /audio/recommendations endpoint with the type parameter set to FACEBOOK_FOR_YOU.
curl -i -X GET "https://graph.facebook.com/v24.0/audio/recommendations
?type=FACEBOOK_FOR_YOU
&access_token=ACCESS_TOKEN"
You can also get popular music for a specific country or countries by adding the available_countries parameter with a comma separated list of two letter Alpha-2 ISO Country Code abbreviations.
On success, your app receives a JSON response with a list of objects that contain the title of a song, the artist, and a link to the album artwork that has been uploaded to Facebook.
{
"data": [
{
"title": "Song Title A",
"artist": "Artist Name A",
"display_image_uri": "urlToAlbumArtA.com"
},
{
"title": "Song Title B",
"artist": "Artist Name B",
"display_image_uri": "urlToAlbumArtB.com"
},
{
"title": "Song Title C",
"artist": "Artist Name C",
"display_image_uri": "urlToAlbumArtC.com"
}
]
}| Code – Subcode | Description |
|---|---|
100 – 4138001 | Invalid country code, country code must be a valid alpha-2 ISO country code |