Last.fm · Arazzo Workflow

Last.fm Now Playing Context

Version 1.0.0

Read a user's most recent track, resolve its full info, and surface the community tags that describe it.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub MusicAudioScrobblingRecommendationsChartsPublic APIsAudioScrobblerArazzoWorkflows

Provider

lastfm

Workflows

now-playing-context
Turn a user's latest scrobble into a track profile with descriptive top tags.
Reads recent tracks, resolves the latest track's info, and pulls its top community tags.
3 steps inputs: apiKey, user outputs: topTags, trackArtist, trackName, trackUrl, user
1
recentTracks
Read the user's most recent scrobbles, including any currently playing track.
2
trackInfo
Resolve the full info envelope for the user's most recent track.
3
trackTopTags
Pull the top community tags that describe the current track.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Last.fm Now Playing Context
  summary: Read a user's most recent track, resolve its full info, and surface the community tags that describe it.
  description: >-
    A context flow that explains what a listener is playing right now. It reads
    the user's recent tracks, takes the most recent one, resolves its full info
    envelope, and then pulls the top community tags for that track so a UI can
    label the current play with its genres and moods. Each request is written
    inline, including the required api_key and the format=json selector, so the
    chain is self-contained and replayable without the OpenAPI source.
  version: 1.0.0
sourceDescriptions:
- name: trackApi
  url: ../openapi/lastfm-track-api-openapi.yml
  type: openapi
- name: userApi
  url: ../openapi/lastfm-user-api-openapi.yml
  type: openapi
workflows:
- workflowId: now-playing-context
  summary: Turn a user's latest scrobble into a track profile with descriptive top tags.
  description: >-
    Reads recent tracks, resolves the latest track's info, and pulls its top
    community tags.
  inputs:
    type: object
    required:
    - apiKey
    - user
    properties:
      apiKey:
        type: string
        description: Your Last.fm API key.
      user:
        type: string
        description: The Last.fm username whose recent listening to inspect.
  steps:
  - stepId: recentTracks
    description: >-
      Read the user's most recent scrobbles, including any currently playing
      track.
    operationId: userGetRecentTracks
    parameters:
    - name: api_key
      in: query
      value: $inputs.apiKey
    - name: format
      in: query
      value: json
    - name: user
      in: query
      value: $inputs.user
    - name: limit
      in: query
      value: 5
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      latestTrackName: $response.body#/recenttracks/track/0/name
      latestTrackArtist: $response.body#/recenttracks/track/0/artist/name
  - stepId: trackInfo
    description: >-
      Resolve the full info envelope for the user's most recent track.
    operationId: trackGetInfo
    parameters:
    - name: api_key
      in: query
      value: $inputs.apiKey
    - name: format
      in: query
      value: json
    - name: artist
      in: query
      value: $steps.recentTracks.outputs.latestTrackArtist
    - name: track
      in: query
      value: $steps.recentTracks.outputs.latestTrackName
    - name: autocorrect
      in: query
      value: 1
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      trackName: $response.body#/track/name
      trackArtist: $response.body#/track/artist/name
      trackUrl: $response.body#/track/url
  - stepId: trackTopTags
    description: >-
      Pull the top community tags that describe the current track.
    operationId: trackGetTopTags
    parameters:
    - name: api_key
      in: query
      value: $inputs.apiKey
    - name: format
      in: query
      value: json
    - name: artist
      in: query
      value: $steps.trackInfo.outputs.trackArtist
    - name: track
      in: query
      value: $steps.trackInfo.outputs.trackName
    - name: autocorrect
      in: query
      value: 1
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      topTags: $response.body#/toptags/tag
      topTagName: $response.body#/toptags/tag/0/name
  outputs:
    user: $inputs.user
    trackName: $steps.trackInfo.outputs.trackName
    trackArtist: $steps.trackInfo.outputs.trackArtist
    trackUrl: $steps.trackInfo.outputs.trackUrl
    topTags: $steps.trackTopTags.outputs.topTags

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/lastfm-now-playing-context-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.