{
    "ok" : true,
    "name" : "Magnatune catalog API",
    "description" : "Read-only data for Magnatune's music catalog: albums, artists, tracks with free preview streams, genres and collections (moods, instruments, composers), and how to buy and download an album.",
    "endpoints" : ["GET /api/albums?q=&genre=&collection=&artist=&sort=&offset=&limit=  (album summaries; at most 100 per page; sort = popular (default), new or name)","GET /api/albums/{sku}  (one album in full: tracks with free preview links, covers, genres, collections, buy link and related albums)","GET /api/albums/{sku}/downloads?key=  (after buying: one zip download link per format and one WAV link per track, for the album's download key)","GET /api/albums/{sku}/similar  (albums listeners play alongside this one, then popular albums in its genres)","GET /api/albums/{sku}/tracks/{n}  (one track: its free and clean download links, a credit line and the licence terms)","GET /api/albums/{sku}/tracks/{n}/file?format=&key=  (one song's audio file. No key: the free version (with a short spoken Magnatune voice overlaid on the music every 30 seconds; mp3, aac, ogg or opus). The clean file (format=wav, aac, mp3, ogg or opus) for members (HTTP Basic), album buyers (key=), or an agent paying right there with MPP (402 -> pay -> the file))","GET /api/tracks?q=&genre=&collection=&artist=&vocals=&mood=&use=&energy=&key=&instrument=&min_bpm=&max_bpm=&min_seconds=&max_seconds=&sort=  (single songs with free previews and credit lines, e.g. for a video edit; sort = popular (default), new, name or duration)","GET /api/artists?q=&offset=&limit=  (artist summaries)","GET /api/artists/{page}  (one artist with all their albums)","GET /api/genres  (genres with album counts)","GET /api/collections  (collections (the player's tags: moods, instruments, styles, composers) with album counts)","GET /api/collections/{slug}?songs=  (one collection: its albums, or its songs with songs=1)","GET /api/vocabulary  (the moods and uses albums are described with (for mood= and use=), and energy levels, with album counts)","GET /api/featured  (Featured: playlists hand-picked by Magnatune (moods and styles from across the catalog))","GET /api/featured/{slug}  (one Featured playlist: its songs in order, with free previews and credit lines)","GET /api/sql?q=SELECT...  (any read-only SQL query on the whole catalog (SQLite); with no query: the schema, limits and examples)","POST /api/member-pass?offer=month (or year, lifetime)  (buy a Magnatune membership from an agent with MPP (HTTP 402, card/Link via Stripe): $10 for a month, $99 for a year, $299 for life; returns the new login)","GET /api/openapi.json  (OpenAPI 3 description)","GET /api/magnatune-login.mjs  (ready-made OAuth sign-in command for members (Node 18+, no dependencies): prints a token or downloads clean songs; no password passes through it)"],
    "buying" : {
        "price" : 8,
        "currency" : "USD",
        "steps" : ["Find an album: GET https://magnatune.com/api/albums?q=... (or genre=, collection=, artist=), then GET /api/albums/{sku} to check its tracks and previews.","Give the person the album's buy_url (https://magnatune.com/buy/album?sku=SKU). They pay $8 on PayPal (card or PayPal account); the money goes straight to the musician. The agent never handles payment details.","After paying, the person sees a download key (also emailed to them). Lost keys: https://magnatune.com/buy/album/lostkey emails every key bought with an email address.","With the key, GET https://magnatune.com/api/albums/{sku}/downloads?key=KEY lists one download link per format (MP3, AAC, ALAC, FLAC, OGG, WAV), each a zip of the whole album, and one link per song. A single song: GET /api/albums/{sku}/tracks/{n}/file?format=wav&key=KEY (also aac, mp3, ogg, opus)."]
    },
    "data_feeds" : "https://magnatune.com/info/api (the whole catalog as SQLite, XML or CSV; https://magnatune.com/info/changed.txt changes whenever there are new releases)",
    "sql" : {
        "endpoint" : "https://magnatune.com/api/sql?q=SELECT...",
        "schema" : "https://magnatune.com/api/sql",
        "about" : "any read-only SQLite query on the whole catalog; GET /api/sql for the schema and examples"
    },
    "membership" : {
        "join" : "https://magnatune.com/member/signup",
        "agent_purchase" : "https://magnatune.com/api/member-pass?offer=month (MPP: HTTP 402, card/Link via Stripe)",
        "offers" : [{
            "offer" : "month",
            "amount_cents" : 1000,
            "currency" : "usd",
            "description" : "Magnatune membership for 1 month (one-off, does not renew)"
        },{
            "offer" : "year",
            "amount_cents" : 9900,
            "currency" : "usd",
            "description" : "Magnatune membership for 1 year (one-off, does not renew)"
        },{
            "offer" : "lifetime",
            "amount_cents" : 29900,
            "currency" : "usd",
            "description" : "Magnatune lifetime membership"
        }],
        "includes" : "clean songs (no voice overlay), album downloads in every format, and the Magnatune Project Licence"
    },
    "auth" : {
        "none" : "Searching, all catalog data and the free song versions need no sign-in.",
        "members" : "Acting for a Magnatune member: sign them in with OAuth 2.1 (authorization code + PKCE S256; never ask for their password) and send Authorization: Bearer <access_token>. No password needed. Step by step: https://magnatune.com/api/#oauth. Terminals and cloud agents: device sign-in (device_authorization_endpoint, client_id magnatune-cli). Ready-made: https://magnatune.com/api/magnatune-login.mjs",
        "oauth" : {
            "resource" : "https://magnatune.com/api",
            "scope" : "member",
            "scopes" : ["member","download"],
            "protected_resource_metadata" : "https://magnatune.com/.well-known/oauth-protected-resource/api",
            "authorization_server_metadata" : "https://magnatune.com/.well-known/oauth-authorization-server",
            "registration_endpoint" : "https://magnatune.com/oauth/register",
            "authorization_endpoint" : "https://magnatune.com/oauth/authorize",
            "token_endpoint" : "https://magnatune.com/oauth/token",
            "revocation_endpoint" : "https://magnatune.com/oauth/revoke",
            "device_authorization_endpoint" : "https://magnatune.com/oauth/device_authorization",
            "device_client_id" : "magnatune-cli",
            "device_page" : "https://magnatune.com/device",
            "login_command" : "https://magnatune.com/api/magnatune-login.mjs"
        },
        "mcp" : {
            "open" : "https://magnatune.com/mcp",
            "members" : "https://magnatune.com/mcp/account"
        }
    },
    "openapi" : "https://magnatune.com/api/openapi.json",
    "llms_txt" : "https://magnatune.com/llms.txt",
    "rate_limit" : "120 requests per minute per IP",
    "license" : {
        "music_license" : "Creative Commons Attribution-NonCommercial-ShareAlike 1.0 (CC BY-NC-SA 1.0)",
        "music_license_url" : "https://creativecommons.org/licenses/by-nc-sa/1.0/",
        "listening" : "Stream the free previews, or buy an album for $8 to download it in MP3, AAC, ALAC, FLAC, OGG or WAV. 100% of the price goes to the musician.",
        "non_commercial" : "Non-commercial projects may use the music under CC BY-NC-SA 1.0: credit the artist and Magnatune, and share alike.",
        "projects" : "Magnatune members may use any Magnatune music in their projects, commercial or not (videos, films, podcasts, games, apps, websites, adverts), including work for clients, under the Magnatune Project Licence. Projects released while a member stay licensed for good; new projects need an active membership. Credit is required. TV or radio broadcast, cinema, and background music in shops, restaurants or on-hold lines are not included: license those from the musician. Membership: $10/month, $99/year or $299 lifetime; agents can buy one themselves with MPP at /api/member-pass ($10 month, $99 year, $299 lifetime, one-off).",
        "projects_status" : "available",
        "projects_signup" : "https://magnatune.com/member/signup",
        "royalty_free" : "Membership is royalty-free licensing: no per-video, per-download or per-view fees, for every project created and released while a member.",
        "youtube" : "YouTube, Instagram, TikTok, podcasts: members may use the clean songs in monetized videos. Members register their YouTube channel (the set_youtube_channel MCP tool, or their account page) so YouTube's Content ID doesn't claim their videos. The free versions carry a spoken Magnatune voice and are non-commercial (CC BY-NC-SA), so they're not for monetized channels or client work.",
        "details" : "https://magnatune.com/info/licensing",
        "how_to_credit" : "Name the artist and \"Magnatune\", with a link to the album's web_url."
    }
}