{"openapi":"3.1.0","info":{"title":"Last.fm (BYOK) API","version":"0.1.0","description":"Last.fm (BYOK) lets an AI assistant read your own Last.fm data through the Last.fm API with a key you supply (API key). Read-only: 10 tools (get_recent_tracks, get_top_artists, get_top_tracks, get_top_albums, get_loved_tracks, get_user_info, get_artist_info, search_artists, get_chart_top_tracks, get_chart_top_artists). The BYOK key travels with each request, is used for that one call only and is...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-lastfm.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-lastfm/docs"},"termsOfService":"https://connectorbay.com/byok-lastfm/terms"},"servers":[{"url":"https://byok-lastfm.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-lastfm/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/get_recent_tracks":{"post":{"operationId":"get_recent_tracks","summary":"List a user's recently played (scrobbled) tracks, newest first; the track playing now is included when there is one. Ret","description":"List a user's recently played (scrobbled) tracks, newest first; the track playing now is included when there is one. Returns Last.fm's JSON as is. Use for \"What has the Last.fm user rj listened to recently\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"user":{"description":"Last.fm username, for example 'rj'.","maxLength":100,"title":"User","type":"string"},"method_name":{"anyOf":[{"const":"user.getrecenttracks","type":"string"},{"type":"null"}],"default":"user.getrecenttracks","description":"Last.fm method to call. Always 'user.getrecenttracks' for this tool; leave the default.","title":"Method Name"},"response_format":{"anyOf":[{"const":"json","type":"string"},{"type":"null"}],"default":"json","description":"Output format. Always 'json'; leave the default.","title":"Response Format"},"limit":{"anyOf":[{"maximum":50,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Results per page (1 to 50 in this connector).","title":"Limit"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"from_time":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Only scrobbles after this Unix timestamp (UTC).","title":"From Time"},"to_time":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Only scrobbles before this Unix timestamp (UTC).","title":"To Time"}},"required":["user"],"title":"get_recent_tracksArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_top_artists":{"post":{"operationId":"get_top_artists","summary":"List a user's most played artists over a time range with play counts. Returns Last.fm's JSON as is. Use for \"Who are the","description":"List a user's most played artists over a time range with play counts. Returns Last.fm's JSON as is. Use for \"Who are the top artists of Last.fm user rj this year\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"user":{"description":"Last.fm username, for example 'rj'.","maxLength":100,"title":"User","type":"string"},"method_name":{"anyOf":[{"const":"user.gettopartists","type":"string"},{"type":"null"}],"default":"user.gettopartists","description":"Last.fm method to call. Always 'user.gettopartists' for this tool; leave the default.","title":"Method Name"},"response_format":{"anyOf":[{"const":"json","type":"string"},{"type":"null"}],"default":"json","description":"Output format. Always 'json'; leave the default.","title":"Response Format"},"period":{"anyOf":[{"enum":["overall","7day","1month","3month","6month","12month"],"type":"string"},{"type":"null"}],"default":"overall","description":"Time range: overall, 7day, 1month, 3month, 6month or 12month.","title":"Period"},"limit":{"anyOf":[{"maximum":50,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Results per page (1 to 50 in this connector).","title":"Limit"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["user"],"title":"get_top_artistsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_top_tracks":{"post":{"operationId":"get_top_tracks","summary":"List a user's most played tracks over a time range with play counts. Returns Last.fm's JSON as is. Use for \"What are the","description":"List a user's most played tracks over a time range with play counts. Returns Last.fm's JSON as is. Use for \"What are the top tracks of Last.fm user rj in the last month\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"user":{"description":"Last.fm username, for example 'rj'.","maxLength":100,"title":"User","type":"string"},"method_name":{"anyOf":[{"const":"user.gettoptracks","type":"string"},{"type":"null"}],"default":"user.gettoptracks","description":"Last.fm method to call. Always 'user.gettoptracks' for this tool; leave the default.","title":"Method Name"},"response_format":{"anyOf":[{"const":"json","type":"string"},{"type":"null"}],"default":"json","description":"Output format. Always 'json'; leave the default.","title":"Response Format"},"period":{"anyOf":[{"enum":["overall","7day","1month","3month","6month","12month"],"type":"string"},{"type":"null"}],"default":"overall","description":"Time range: overall, 7day, 1month, 3month, 6month or 12month.","title":"Period"},"limit":{"anyOf":[{"maximum":50,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Results per page (1 to 50 in this connector).","title":"Limit"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["user"],"title":"get_top_tracksArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_top_albums":{"post":{"operationId":"get_top_albums","summary":"List a user's most played albums over a time range with play counts. Returns Last.fm's JSON as is. Use for \"What are the","description":"List a user's most played albums over a time range with play counts. Returns Last.fm's JSON as is. Use for \"What are the top albums of Last.fm user rj over the last 12 months\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"user":{"description":"Last.fm username, for example 'rj'.","maxLength":100,"title":"User","type":"string"},"method_name":{"anyOf":[{"const":"user.gettopalbums","type":"string"},{"type":"null"}],"default":"user.gettopalbums","description":"Last.fm method to call. Always 'user.gettopalbums' for this tool; leave the default.","title":"Method Name"},"response_format":{"anyOf":[{"const":"json","type":"string"},{"type":"null"}],"default":"json","description":"Output format. Always 'json'; leave the default.","title":"Response Format"},"period":{"anyOf":[{"enum":["overall","7day","1month","3month","6month","12month"],"type":"string"},{"type":"null"}],"default":"overall","description":"Time range: overall, 7day, 1month, 3month, 6month or 12month.","title":"Period"},"limit":{"anyOf":[{"maximum":50,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Results per page (1 to 50 in this connector).","title":"Limit"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["user"],"title":"get_top_albumsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_loved_tracks":{"post":{"operationId":"get_loved_tracks","summary":"List the tracks a user has marked as loved, newest first. Returns Last.fm's JSON as is. Use for \"Which tracks has Last.f","description":"List the tracks a user has marked as loved, newest first. Returns Last.fm's JSON as is. Use for \"Which tracks has Last.fm user rj loved\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"user":{"description":"Last.fm username, for example 'rj'.","maxLength":100,"title":"User","type":"string"},"method_name":{"anyOf":[{"const":"user.getlovedtracks","type":"string"},{"type":"null"}],"default":"user.getlovedtracks","description":"Last.fm method to call. Always 'user.getlovedtracks' for this tool; leave the default.","title":"Method Name"},"response_format":{"anyOf":[{"const":"json","type":"string"},{"type":"null"}],"default":"json","description":"Output format. Always 'json'; leave the default.","title":"Response Format"},"limit":{"anyOf":[{"maximum":50,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Results per page (1 to 50 in this connector).","title":"Limit"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["user"],"title":"get_loved_tracksArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_user_info":{"post":{"operationId":"get_user_info","summary":"Get a Last.fm user's public profile: name, real name, country, play count, registration date and profile URL. Returns La","description":"Get a Last.fm user's public profile: name, real name, country, play count, registration date and profile URL. Returns Last.fm's JSON as is. Use for \"When did Last.fm user rj join and how many tracks have they played\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"user":{"description":"Last.fm username, for example 'rj'.","maxLength":100,"title":"User","type":"string"},"method_name":{"anyOf":[{"const":"user.getinfo","type":"string"},{"type":"null"}],"default":"user.getinfo","description":"Last.fm method to call. Always 'user.getinfo' for this tool; leave the default.","title":"Method Name"},"response_format":{"anyOf":[{"const":"json","type":"string"},{"type":"null"}],"default":"json","description":"Output format. Always 'json'; leave the default.","title":"Response Format"}},"required":["user"],"title":"get_user_infoArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_artist_info":{"post":{"operationId":"get_artist_info","summary":"Get information about an artist: short biography, listener and play counts, similar artists and top tags. Returns Last.f","description":"Get information about an artist: short biography, listener and play counts, similar artists and top tags. Returns Last.fm's JSON as is. Use for \"Tell me about the artist Radiohead on Last.fm\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"method_name":{"anyOf":[{"const":"artist.getinfo","type":"string"},{"type":"null"}],"default":"artist.getinfo","description":"Last.fm method to call. Always 'artist.getinfo' for this tool; leave the default.","title":"Method Name"},"response_format":{"anyOf":[{"const":"json","type":"string"},{"type":"null"}],"default":"json","description":"Output format. Always 'json'; leave the default.","title":"Response Format"},"artist":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Artist name, for example 'Radiohead'. Required unless mbid is given.","title":"Artist"},"mbid":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"MusicBrainz id of the artist, as an alternative to the name.","title":"Mbid"},"lang":{"anyOf":[{"maxLength":2,"type":"string"},{"type":"null"}],"default":null,"description":"Two-letter ISO 639 language code for the biography, for example 'de'.","title":"Lang"},"autocorrect":{"anyOf":[{"maximum":1,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"1 to fix misspelled artist names, 0 to leave them.","title":"Autocorrect"},"username":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Also include this user's play count for the artist.","title":"Username"}},"title":"get_artist_infoArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/search_artists":{"post":{"operationId":"search_artists","summary":"Search Last.fm for artists by name; returns matching artists with listener counts. Returns Last.fm's JSON as is. Use for","description":"Search Last.fm for artists by name; returns matching artists with listener counts. Returns Last.fm's JSON as is. Use for \"Find artists on Last.fm called Cher\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"artist":{"description":"Artist name to search for.","maxLength":200,"title":"Artist","type":"string"},"method_name":{"anyOf":[{"const":"artist.search","type":"string"},{"type":"null"}],"default":"artist.search","description":"Last.fm method to call. Always 'artist.search' for this tool; leave the default.","title":"Method Name"},"response_format":{"anyOf":[{"const":"json","type":"string"},{"type":"null"}],"default":"json","description":"Output format. Always 'json'; leave the default.","title":"Response Format"},"limit":{"anyOf":[{"maximum":50,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"Results per page (1 to 50 in this connector).","title":"Limit"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["artist"],"title":"search_artistsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_chart_top_tracks":{"post":{"operationId":"get_chart_top_tracks","summary":"List the most played tracks across all of Last.fm right now with play and listener counts. Returns Last.fm's JSON as is.","description":"List the most played tracks across all of Last.fm right now with play and listener counts. Returns Last.fm's JSON as is. Use for \"What are the top tracks on Last.fm right now\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"method_name":{"anyOf":[{"const":"chart.gettoptracks","type":"string"},{"type":"null"}],"default":"chart.gettoptracks","description":"Last.fm method to call. Always 'chart.gettoptracks' for this tool; leave the default.","title":"Method Name"},"response_format":{"anyOf":[{"const":"json","type":"string"},{"type":"null"}],"default":"json","description":"Output format. Always 'json'; leave the default.","title":"Response Format"},"limit":{"anyOf":[{"maximum":50,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Results per page (1 to 50 in this connector).","title":"Limit"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"title":"get_chart_top_tracksArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_chart_top_artists":{"post":{"operationId":"get_chart_top_artists","summary":"List the most played artists across all of Last.fm right now with play and listener counts. Returns Last.fm's JSON as is","description":"List the most played artists across all of Last.fm right now with play and listener counts. Returns Last.fm's JSON as is. Use for \"Who are the top artists on Last.fm right now\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"method_name":{"anyOf":[{"const":"chart.gettopartists","type":"string"},{"type":"null"}],"default":"chart.gettopartists","description":"Last.fm method to call. Always 'chart.gettopartists' for this tool; leave the default.","title":"Method Name"},"response_format":{"anyOf":[{"const":"json","type":"string"},{"type":"null"}],"default":"json","description":"Output format. Always 'json'; leave the default.","title":"Response Format"},"limit":{"anyOf":[{"maximum":50,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Results per page (1 to 50 in this connector).","title":"Limit"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"title":"get_chart_top_artistsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}