Last.fm · Capability

Last.fm — Music Discovery Workflow

Cross-package workflow capability that composes search, similar-entity, tag, and chart operations to drive end-to-end music discovery — find an artist or track, surface similars, fetch top tags, and follow into related artists or tag-based charts.

Run with Naftiko Last.fmMusicDiscoveryRecommendations

Capability Spec

music-discovery.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Last.fm — Music Discovery Workflow
  description: Cross-package workflow capability that composes search, similar-entity, tag, and chart operations to drive end-to-end music discovery — find an artist or track, surface similars, fetch top tags, and follow into related artists or tag-based charts.
  tags:
    - Last.fm
    - Music
    - Discovery
    - Recommendations
  created: '2026-05-29'
  modified: '2026-05-29'
binds:
  - namespace: env
    keys:
      LASTFM_API_KEY: LASTFM_API_KEY
capability:
  consumes:
    - type: http
      namespace: lastfm-discovery
      baseUri: https://ws.audioscrobbler.com/2.0
      description: Cross-package music discovery workflow.
      resources:
        - name: discover
          path: /
          operations:
            - name: searchArtist
              method: GET
              description: Step 1 — search for an artist by name.
              outputRawFormat: json
              inputParameters:
                - { name: method, in: query, type: string, value: artist.search }
                - { name: api_key, in: query, type: string }
                - { name: format, in: query, type: string, value: json }
                - { name: artist, in: query, type: string }
              outputParameters:
                - { name: matches, type: object, value: $.results.artistmatches }
            - name: similarArtists
              method: GET
              description: Step 2 — surface similar artists to the chosen one.
              outputRawFormat: json
              inputParameters:
                - { name: method, in: query, type: string, value: artist.getSimilar }
                - { name: api_key, in: query, type: string }
                - { name: format, in: query, type: string, value: json }
                - { name: artist, in: query, type: string }
              outputParameters:
                - { name: similar, type: object, value: $.similarartists }
            - name: artistTopTags
              method: GET
              description: Step 3 — fetch top tags to characterize the artist.
              outputRawFormat: json
              inputParameters:
                - { name: method, in: query, type: string, value: artist.getTopTags }
                - { name: api_key, in: query, type: string }
                - { name: format, in: query, type: string, value: json }
                - { name: artist, in: query, type: string }
              outputParameters:
                - { name: tags, type: object, value: $.toptags }
            - name: tagTopArtists
              method: GET
              description: Step 4 — pivot from tag to top artists in that tag.
              outputRawFormat: json
              inputParameters:
                - { name: method, in: query, type: string, value: tag.getTopArtists }
                - { name: api_key, in: query, type: string }
                - { name: format, in: query, type: string, value: json }
                - { name: tag, in: query, type: string }
              outputParameters:
                - { name: artists, type: object, value: $.topartists }
            - name: countryTopArtists
              method: GET
              description: "Step 5 — geo lens: top artists in a country."
              outputRawFormat: json
              inputParameters:
                - { name: method, in: query, type: string, value: geo.getTopArtists }
                - { name: api_key, in: query, type: string }
                - { name: format, in: query, type: string, value: json }
                - { name: country, in: query, type: string }
              outputParameters:
                - { name: artists, type: object, value: $.topartists }