Skip to content
AINSOFAPI Get API key

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_keyrequired
string
Exact playlist key or name, for example pop, Sports, noir-midnight or Noir After Midnight.
1 to 120 characters after trimming.
page_size
integer
Primary recordings per page; alternate version rows may add results.
Default: 20
1 to 40 primary recordings.
cursor
string
Pass the returned value unchanged with the same playlist selection.
At most 2000 characters.

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 use search.
  • playlist_key accepts 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_size measures primary recordings. Alternate versions remain separate rows and may make results longer than page_size; preserve the version on each row when requesting playback.
  • When has_more is true, send the returned opaque cursor with the same selection and page size. You can omit page_size on continuation to reuse the saved size. Never edit, decode or fabricate a cursor. Continue until has_more is false and cursor is null.
  • 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 results array is an empty selection. A 503 is 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