GuidesBrowse a playlist
Browse a playlist
Open a named playlist from the website, such as Pop or Noir After Midnight, and continue through its full ordered selection. Send its exact key or display name.
MCP toolbrowse_playlistRESTaction: "browse_playlist"
Try it
curl https://mcp.ainsof.io/ \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $AINSOF_API_KEY" \
-d '{"action": "browse_playlist", "playlist_key": "noir-midnight", "page_size": 20}'Continue through the results
Keep the returned order. When has_more is true, pass the returned cursor with the same selection and page_size. Stop when has_more is false and cursor is null. Alternate versions are separate rows and can make a page longer than its primary-recording page size.
curl https://mcp.ainsof.io/ \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $AINSOF_API_KEY" \
-d '{"action": "browse_playlist", "playlist_key": "noir-midnight", "page_size": 20, "cursor": "<cursor from the previous response>"}'What you send
playlist_keyrequiredstring
Exact playlist key or name, for example
pop, Sports, noir-midnight or Noir After Midnight.page_sizeinteger
Primary recordings per page; alternate version rows may add results.
cursorstring
Pass the returned value unchanged with the same playlist selection.
Good to know
- Use this operation for a named editorial playlist from the website. For a genre/mood category use
browse_tag; for a written creative brief usesearch. playlist_keyaccepts an exact playlist key or display name, ignoring case and extra whitespace. It does not infer a playlist from a description. On continuation, repeat the same supplied string; do not switch between the display name and key midway.- Keep the order returned by the service. Equally suitable tracks can come from different albums; do not shuffle a page on refresh.
page_sizemeasures primary recordings. Alternate versions remain separate rows and may makeresultslonger thanpage_size; preserve theversionon each row when requesting playback.- When
has_moreistrue, send the returned opaquecursorwith the same selection and page size. You can omitpage_sizeon continuation to reuse the saved size. Never edit, decode or fabricate a cursor. Continue untilhas_moreisfalseandcursorisnull. - Cursors expire after 24 hours. If a continuation returns a changed-library error, discard that cursor and start the selection again; do not append a restarted first page to the old list.
- An empty successful
resultsarray is an empty selection. A503is a temporary failure and must not be displayed as no matching music. - Calls use the existing API allowance. This operation does not initiate a license purchase or grant publication rights.
Every field it returns, and its errors, in the API Reference
