> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scrapeunblocker.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Scrape Spotify artists, albums, tracks, playlists and search

> Returns Spotify catalog data as JSON, including the play counts and audience numbers the official Web API does not expose. `type=artist`: `artist` (`followers`, `monthlyListeners`, `worldRank`, `topCities`, `biography`, `externalLinks`, images, `verified`), `topTracks` with `playcount` (a top track's `album` carries `name` and `releaseDate` when Spotify lists that album among the artist's releases), `discography` groups (popular releases, albums, singles, compilations with totals), `relatedArtists`, `appearsOn`, `featuredOn` / `discoveredOn` playlists; `discography=true` adds the full `releases` list, paged. `type=album`: `album` (type, release date, label, copyright, artists, cover) and `tracks` with `playcount`, paged. `type=track`: `track` with `playcount`, duration, explicit flag, album and every credited artist. `type=playlist`: `playlist` (name, description, `followers`, owner, cover, `totalTracks`) and `tracks` with `playcount`, `addedAt`, `bpm` and `key`, paged. `type=search&query=`: `results` of `search_type` tracks, artists, albums or playlists, paged; a search with no match answers 200 with empty `results`. `playcount` comes only on artist, album, track and playlist lookups: Spotify's search does not return it, so search track results have no `playcount` key (look a track up with `type=track` for its count). `id` takes an open.spotify.com URL, a Spotify URI or a bare id. Lists page with `offset` / `max_results` and answer `hasMore` / `nextOffset`; each page fetched is one billed unit (`pagesFetched`).



## OpenAPI

````yaml /api-reference/openapi.json post /music/spotify
openapi: 3.1.0
info:
  title: ScrapeUnblocker API
  description: >-
    Public API for the ScrapeUnblocker proxy/anti-bot service. Authenticate
    every request with the `x-scrapeunblocker-key` header. Documented here:
    page-source extraction, Google SERP scraping, image fetch, and the dedicated
    plugin endpoints (search engines, marketplaces, reviews, travel, social and
    more). All other paths exist for internal operations and are intentionally
    hidden from this spec.
  version: 3.0.0
servers:
  - url: https://api.scrapeunblocker.com
    description: Production
security: []
paths:
  /music/spotify:
    post:
      tags:
        - Plugins
      summary: Scrape Spotify artists, albums, tracks, playlists and search
      description: >-
        Returns Spotify catalog data as JSON, including the play counts and
        audience numbers the official Web API does not expose. `type=artist`:
        `artist` (`followers`, `monthlyListeners`, `worldRank`, `topCities`,
        `biography`, `externalLinks`, images, `verified`), `topTracks` with
        `playcount` (a top track's `album` carries `name` and `releaseDate` when
        Spotify lists that album among the artist's releases), `discography`
        groups (popular releases, albums, singles, compilations with totals),
        `relatedArtists`, `appearsOn`, `featuredOn` / `discoveredOn` playlists;
        `discography=true` adds the full `releases` list, paged. `type=album`:
        `album` (type, release date, label, copyright, artists, cover) and
        `tracks` with `playcount`, paged. `type=track`: `track` with
        `playcount`, duration, explicit flag, album and every credited artist.
        `type=playlist`: `playlist` (name, description, `followers`, owner,
        cover, `totalTracks`) and `tracks` with `playcount`, `addedAt`, `bpm`
        and `key`, paged. `type=search&query=`: `results` of `search_type`
        tracks, artists, albums or playlists, paged; a search with no match
        answers 200 with empty `results`. `playcount` comes only on artist,
        album, track and playlist lookups: Spotify's search does not return it,
        so search track results have no `playcount` key (look a track up with
        `type=track` for its count). `id` takes an open.spotify.com URL, a
        Spotify URI or a bare id. Lists page with `offset` / `max_results` and
        answer `hasMore` / `nextOffset`; each page fetched is one billed unit
        (`pagesFetched`).
      operationId: spotify_music_spotify_post
      parameters:
        - name: type
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              What to fetch: artist, album, track, playlist, search. Optional
              when `id` is a Spotify URL or URI (they carry the type) or when
              only `query` is given (a search).
            title: Type
          description: >-
            What to fetch: artist, album, track, playlist, search. Optional when
            `id` is a Spotify URL or URI (they carry the type) or when only
            `query` is given (a search).
        - name: id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              The artist, album, track or playlist: an open.spotify.com URL
              (https://open.spotify.com/artist/06HL4z0CvFAxyc27GXpf02), a
              Spotify URI (spotify:artist:06HL4z0CvFAxyc27GXpf02) or a bare
              22-character id (then set `type`).
            title: Id
          description: >-
            The artist, album, track or playlist: an open.spotify.com URL
            (https://open.spotify.com/artist/06HL4z0CvFAxyc27GXpf02), a Spotify
            URI (spotify:artist:06HL4z0CvFAxyc27GXpf02) or a bare 22-character
            id (then set `type`).
        - name: query
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Search text for type=search, e.g. 'daft punk'.
            title: Query
          description: Search text for type=search, e.g. 'daft punk'.
        - name: search_type
          in: query
          required: false
          schema:
            type: string
            description: 'What a search returns: tracks, artists, albums, playlists.'
            default: tracks
            title: Search Type
          description: 'What a search returns: tracks, artists, albums, playlists.'
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            description: >-
              0-based position to start from in the list being paged: album
              tracks, playlist tracks, search results, or the full discography
              with discography=true. Use the `nextOffset` of a previous response
              to continue. Spotify serves search results up to position 1000.
            default: 0
            title: Offset
          description: >-
            0-based position to start from in the list being paged: album
            tracks, playlist tracks, search results, or the full discography
            with discography=true. Use the `nextOffset` of a previous response
            to continue. Spotify serves search results up to position 1000.
        - name: max_results
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            description: >-
              How many list items to collect. Album tracks: 1-1000 (default 100,
              100 per page). Playlist tracks: 1-2000 (default 100, 100 per
              page). Search: 1-1000 (default 20, 50 per page). Artist releases
              with discography=true: 1-1000 (default 50, 50 per page). Each page
              fetched is one billed unit.
            title: Max Results
          description: >-
            How many list items to collect. Album tracks: 1-1000 (default 100,
            100 per page). Playlist tracks: 1-2000 (default 100, 100 per page).
            Search: 1-1000 (default 20, 50 per page). Artist releases with
            discography=true: 1-1000 (default 50, 50 per page). Each page
            fetched is one billed unit.
        - name: discography
          in: query
          required: false
          schema:
            type: boolean
            description: >-
              type=artist only: also return the artist's full release list
              (albums, singles, compilations, newest first) in `releases`, paged
              by offset / max_results.
            default: false
            title: Discography
          description: >-
            type=artist only: also return the artist's full release list
            (albums, singles, compilations, newest first) in `releases`, paged
            by offset / max_results.
        - name: proxy_country
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Country the request is sent from (ISO-2, e.g. 'DE', 'GB').
              Spotify's market follows it, which can change `playable` and
              search order; play counts are the same everywhere. Leave blank for
              any.
            title: Proxy Country
          description: >-
            Country the request is sent from (ISO-2, e.g. 'DE', 'GB'). Spotify's
            market follows it, which can change `playable` and search order;
            play counts are the same everywhere. Leave blank for any.
      responses:
        '200':
          description: >-
            JSON with `type` and the entity (`artist`, `album`, `track` or
            `playlist`) plus its lists, or `results` for a search.
          content:
            application/json:
              schema: {}
        '400':
          description: Invalid parameters.
        '404':
          description: >-
            Spotify has no artist, album, track or playlist with that id (a
            private playlist reads as not found).
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '502':
          description: >-
            Spotify refused the request, returned no data, or did not answer in
            time.
      security:
        - ScrapeUnblockerKey: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ScrapeUnblockerKey:
      type: apiKey
      in: header
      name: x-scrapeunblocker-key
      description: Your ScrapeUnblocker API key. Apply on every request.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.