# SPOTIFY Extractor (`jupri/spotify`) Actor

💫 All-in-One SPOTIFY.COM Scraper

- **URL**: https://apify.com/jupri/spotify.md
- **Developed by:** [cat](https://apify.com/jupri) (community)
- **Categories:** Videos, Social media
- **Stats:** 310 total users, 1 monthly users, 89.7% runs succeeded, 12 bookmarks
- **User rating**: 1.00 out of 5 stars

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Welcome to Spotify Scraper

<img height="32" src="https://apify.com/actor-badge?actor=jupri~spotify" align="right">

![don't be sad readme is here](https://raw.githubusercontent.com/JupriGH/resources/main/cats/catframe.png)

### 🛜 About Spotify.com

<img src="https://upload.wikimedia.org/wikipedia/commons/2/26/Spotify_logo_with_text.svg" width="320">

**Spotify**  ([/ˈspɒtɪfaɪ/](https://en.wikipedia.org/wiki/Help:IPA/English "Help:IPA/English");  Swedish:  [\[ˈspɔ̂tːɪfaj\]](https://en.wikipedia.org/wiki/Help:IPA/Swedish "Help:IPA/Swedish")) is a  [Swedish](https://en.wikipedia.org/wiki/List_of_companies_of_Sweden "List of companies of Sweden")[\[6\]](https://en.wikipedia.org/wiki/Spotify#cite_note-spotify1-6)  [audio streaming](https://en.wikipedia.org/wiki/Streaming_media "Streaming media")  and media service provider founded on 23 April 2006 by  [Daniel Ek](https://en.wikipedia.org/wiki/Daniel_Ek "Daniel Ek")  and  [Martin Lorentzon](https://en.wikipedia.org/wiki/Martin_Lorentzon "Martin Lorentzon").[\[7\]](https://en.wikipedia.org/wiki/Spotify#cite_note-7)  It is one of the largest  [music streaming service](https://en.wikipedia.org/wiki/Music_streaming_service "Music streaming service")  providers, with over 602 million monthly  [active users](https://en.wikipedia.org/wiki/Active_users "Active users"), including 236 million paying subscribers, as of December 2023.[\[4\]](https://en.wikipedia.org/wiki/Spotify#cite_note-QFR-4)[\[8\]](https://en.wikipedia.org/wiki/Spotify#cite_note-Spotify_company_info2-8)  Spotify is listed (through a  [Luxembourg City](https://en.wikipedia.org/wiki/Luxembourg_City "Luxembourg City")-domiciled  [holding company](https://en.wikipedia.org/wiki/Holding_company "Holding company"),  **Spotify Technology S.A.**[\[1\]](https://en.wikipedia.org/wiki/Spotify#cite_note-sec-1)) on the  [New York Stock Exchange](https://en.wikipedia.org/wiki/New_York_Stock_Exchange "New York Stock Exchange")  in the form of  [American depositary receipts](https://en.wikipedia.org/wiki/American_depositary_receipt "American depositary receipt").

Spotify offers  [digital copyright restricted](https://en.wikipedia.org/wiki/Digital_rights_management "Digital rights management")  recorded audio content, including more than 100 million songs and five million podcasts, from record labels and media companies.[\[8\]](https://en.wikipedia.org/wiki/Spotify#cite_note-Spotify_company_info2-8)  As a  [freemium](https://en.wikipedia.org/wiki/Freemium "Freemium")  service, basic features are free with advertisements and limited control, while additional features, such as offline listening and commercial-free listening, are offered via paid  [subscriptions](https://en.wikipedia.org/wiki/Subscription_business_model "Subscription business model"). Users can search for music based on  [artist](https://en.wikipedia.org/wiki/Musician "Musician"),  [album](https://en.wikipedia.org/wiki/Album "Album"), or  [genre](https://en.wikipedia.org/wiki/Music_genre "Music genre"), and can create, edit, and share  [playlists](https://en.wikipedia.org/wiki/Playlist "Playlist").

### 🛜 About This Actor

Extract data from Spotify, including playlists, tracks, and artists. Download desired data in HTML, JSON, CSV, Excel, or XML.

### 🛜 Parameters

| Name | Type | Description |
|-|-|-|
| `query` | **array** | List of `KEYWORD`, `QUERY` or `URL` |
| `limit` | **integer** | Number of results (`per-query`) |
| `filters` | **object** | Query filters |

### 🛜 Basic Usage

Search for Songs

```yaml
{ "query": ["indonesia raya"], "filters.kind": "track", "limit": 10 }
```

Search for Artists

```yaml
{ "query": ["Lana Del Ray"], "filters.kind": "artist", "limit": 10 }
```

`URL` Start URL

```yaml
{ "query": ["https://open.spotify.com/artist/00FQb4jTyendYWaN8pK0wa"] }
```

`QUERY` Using Query

```yaml
{ "query": ["artist:00FQb4jTyendYWaN8pK0wa/albums"] }
```

### 🛜 Advanced Usage

#### Spotify Query Language (SQL)

```html
[ <COMMAND:> | # | @ ] [ <NAME> | <ID> | <KEYWORD> | <URL> ] [ /<SECTION> ]  
```

#### Possible `QUERY` Values

| Format | Examples | Description |
|-|-|-|
| **https:<*URL*>**| `https://open.spotify.com/...` | **Start URL** |
| `/artist/<ARTIST_ID>` | | Artist URL |
| `/album/<ALBUM_ID>` | | Album URL |
| `/playlist/<PLAYLIST_ID>` | | Playlist URL |
| `/show/<SHOW_ID>` | | Show/Podcast URL |
| `/track/<TRACK_ID>` | | Track/Song URL |
| `/episode/<EPISODE_ID>` | | Podcast Episode URL |
| **<*KEYWORDS*>** | `any text` | **Search Anything** |
| **artist:<*ARTIST_ID*>** | `artist:00FQb4jTyendYWaN8pK0wa` | **Artist Data** |
| `/info` | `artist:00FQb4jTyendYWaN8pK0wa/info` |Artist info (short)|
| `/overview` | `artist:00FQb4jTyendYWaN8pK0wa/overview` |Artist info (full)|
| `/discography` | `artist:00FQb4jTyendYWaN8pK0wa/discography` | Artist discography |
| `/albums` | `artist:00FQb4jTyendYWaN8pK0wa/albums` | Artist albums |
| `/singles` | `artist:00FQb4jTyendYWaN8pK0wa/singles` | Artist singles |
| `/compilation` | `artist:00FQb4jTyendYWaN8pK0wa/compilation` | Artist compilations |
| `/playlists` | | Artist playlists |
| `/featuring` | | Songs featuring the artist |
| `/appears` | | Songs which artist appears-on |
| `/discovered`||Songs which artist discovered-on|
| **album:<*ALBUM_ID*>** | `album:5HOHne1wzItQlIYmLXLYfZ` | **Album Data**|
| `/info`|`album:5HOHne1wzItQlIYmLXLYfZ/info`|Album info|
| `/tracks`|`album:5HOHne1wzItQlIYmLXLYfZ/tracks`|Album tracks|
| **playlist:<*PLAYLIST_ID*>** | `playlist:37i9dQZF1DZ06evNZVVBPG` | **Playlist Data** |
| `/info` | `playlist:37i9dQZF1DZ06evNZVVBPG/info` | Playlist info |
| `/tracks` | `playlist:37i9dQZF1DZ06evNZVVBPG/tracks` | Playlist tracks |
| **show:<*SHOW_ID*>** | `show:4cgtIN1XGTYpjx96LkTQwW` | **Show/Podcast Data** |
| `/info`|`show:4cgtIN1XGTYpjx96LkTQwW/info`|Podcast info|
| `/episodes`|`show:4cgtIN1XGTYpjx96LkTQwW/episodes`|Podcast episodes|
| **track:<*TRACK_ID*>**| `track:4YJteYsiHPtjwMclESUa0k` | **Track/Audio data** |
| `/credits`|`track:4YJteYsiHPtjwMclESUa0k/info`| Track info |
| `/credits`|`track:4YJteYsiHPtjwMclESUa0k/credits`| Track credits |
| **episode:<*EPISODE_ID*>**|| **Episode data** |

### 🛜 Examples

#### Example #1: Search for artists

```yaml
{ "query": ["Lana Del Ray"], "kind": "artist", "limit": 20 }
```

#### Example #2: Scrape artist info

```yaml
{ "query": ["artist:00FQb4jTyendYWaN8pK0wa/info"] }
```

#### Example #3: Scrape artist albums

```yaml
{ "query": ["artist:00FQb4jTyendYWaN8pK0wa/album"] }
```

#### Example #4: Scrape album tracks

```yaml
{ "query": ["album:5HOHne1wzItQlIYmLXLYfZ/tracks"] }
```

#### Example #5: Scrape playlist tracks

```yaml
{ "query": ["playlist:37i9dQZF1DZ06evNZVVBPG/tracks"] }
```

### 🛜 Output Samples

#### ARTIST (OVERVIEW)

```yaml
{
    "discography": {
        "albums": {
            "items": [
                {
                    "copyright": [
                        {
                            "text": "(C) 2024 Rimas Entertainment LLC.",
                            "type": "C"
                        },
                        {
                            "text": "(P) 2024 Rimas Entertainment LLC.",
                            "type": "P"
                        }
                    ],
                    "coverArt": {
                        "sources": [
                            {
                                "height": 300,
                                "url": "https://i.scdn.co/image/ab67616d00001e02bbd45c8d36e0e045ef640411",
                                "width": 300
                            },
                            {
                                "height": 64,
                                "url": "https://i.scdn.co/image/ab67616d00004851bbd45c8d36e0e045ef640411",
                                "width": 64
                            },
                            {
                                "height": 640,
                                "url": "https://i.scdn.co/image/ab67616d0000b273bbd45c8d36e0e045ef640411",
                                "width": 640
                            }
                        ]
                    },
                    "date": {
                        "day": 5,
                        "month": 1,
                        "precision": "DAY",
                        "year": 2025
                    },
                    "id": "5K79FLRUCSysQnVESLcTdb",
                    "label": "Rimas Entertainment LLC.",
                    "name": "DeBÍ TiRAR MáS FOToS",
                    "playability": {
                        "playable": true,
                        "reason": "PLAYABLE"
                    },
                    "tracks": {
                        "totalCount": 17
                    },
                    "type": "ALBUM",
                    "url": "https://open.spotify.com/album/5K79FLRUCSysQnVESLcTdb?si=TGaVI4JoQvSg2XfkMYEs9g"
                }
            ],
            "totalCount": 8
        },
        "compilations": {
            "items": [],
            "totalCount": 0
        },
        "latest": {
            "copyright": [
                {
                    "text": "(C) 2024 Rimas Entertainment LLC.",
                    "type": "C"
                },
                {
                    "text": "(P) 2024 Rimas Entertainment LLC.",
                    "type": "P"
                }
            ],
            "coverArt": {
                "sources": [
                    {
                        "height": 300,
                        "url": "https://i.scdn.co/image/ab67616d00001e02bbd45c8d36e0e045ef640411",
                        "width": 300
                    },
                    {
                        "height": 64,
                        "url": "https://i.scdn.co/image/ab67616d00004851bbd45c8d36e0e045ef640411",
                        "width": 64
                    },
                    {
                        "height": 640,
                        "url": "https://i.scdn.co/image/ab67616d0000b273bbd45c8d36e0e045ef640411",
                        "width": 640
                    }
                ]
            },
            "date": {
                "day": 5,
                "month": 1,
                "precision": "DAY",
                "year": 2025
            },
            "id": "5K79FLRUCSysQnVESLcTdb",
            "label": "Rimas Entertainment LLC.",
            "name": "DeBÍ TiRAR MáS FOToS",
            "playability": {
                "playable": true,
                "reason": "PLAYABLE"
            },
            "tracks": {
                "totalCount": 17
            },
            "type": "ALBUM",
            "url": "https://open.spotify.com/album/5K79FLRUCSysQnVESLcTdb?si=TGaVI4JoQvSg2XfkMYEs9g"
        },
        "popularReleasesAlbums": {
            "items": [
                {
                    "copyright": [
                        {
                            "text": "(C) 2024 Rimas Entertainment LLC.",
                            "type": "C"
                        },
                        {
                            "text": "(P) 2024 Rimas Entertainment LLC.",
                            "type": "P"
                        }
                    ],
                    "coverArt": {
                        "sources": [
                            {
                                "height": 300,
                                "url": "https://i.scdn.co/image/ab67616d00001e02bbd45c8d36e0e045ef640411",
                                "width": 300
                            },
                            {
                                "height": 64,
                                "url": "https://i.scdn.co/image/ab67616d00004851bbd45c8d36e0e045ef640411",
                                "width": 64
                            },
                            {
                                "height": 640,
                                "url": "https://i.scdn.co/image/ab67616d0000b273bbd45c8d36e0e045ef640411",
                                "width": 640
                            }
                        ]
                    },
                    "date": {
                        "day": 5,
                        "month": 1,
                        "precision": "DAY",
                        "year": 2025
                    },
                    "id": "5K79FLRUCSysQnVESLcTdb",
                    "label": "Rimas Entertainment LLC.",
                    "name": "DeBÍ TiRAR MáS FOToS",
                    "playability": {
                        "playable": true,
                        "reason": "PLAYABLE"
                    },
                    "tracks": {
                        "totalCount": 17
                    },
                    "type": "ALBUM",
                    "url": "https://open.spotify.com/album/5K79FLRUCSysQnVESLcTdb?si=TGaVI4JoQvSg2XfkMYEs9g"
                }
            ],
            "totalCount": 20
        },
        "singles": {
            "items": [
                {
                    "copyright": [
                        {
                            "text": "(C) 2024 Rimas Entertainment LLC",
                            "type": "C"
                        },
                        {
                            "text": "(P) 2024 Rimas Entertainment LLC",
                            "type": "P"
                        }
                    ],
                    "coverArt": {
                        "sources": [
                            {
                                "height": 300,
                                "url": "https://i.scdn.co/image/ab67616d00001e025efa26bea478e40e6dd4a9fd",
                                "width": 300
                            },
                            {
                                "height": 64,
                                "url": "https://i.scdn.co/image/ab67616d000048515efa26bea478e40e6dd4a9fd",
                                "width": 64
                            },
                            {
                                "height": 640,
                                "url": "https://i.scdn.co/image/ab67616d0000b2735efa26bea478e40e6dd4a9fd",
                                "width": 640
                            }
                        ]
                    },
                    "date": {
                        "day": 26,
                        "month": 12,
                        "precision": "DAY",
                        "year": 2024
                    },
                    "id": "0K1PZ5xlzj8VctBaoAtTly",
                    "label": "Rimas Entertainment LLC",
                    "name": "PIToRRO DE COCO",
                    "playability": {
                        "playable": true,
                        "reason": "PLAYABLE"
                    },
                    "tracks": {
                        "totalCount": 1
                    },
                    "type": "SINGLE",
                    "url": "https://open.spotify.com/album/0K1PZ5xlzj8VctBaoAtTly?si=pWElKLu6RbmlBHJK8Ck1zg"
                }
            ],
            "totalCount": 91
        },
        "topTracks": [
            {
                "track": {
                    "albumOfTrack": {
                        "coverArt": {
                            "sources": [
                                {
                                    "url": "https://i.scdn.co/image/ab67616d00001e02bbd45c8d36e0e045ef640411"
                                },
                                {
                                    "url": "https://i.scdn.co/image/ab67616d00004851bbd45c8d36e0e045ef640411"
                                },
                                {
                                    "url": "https://i.scdn.co/image/ab67616d0000b273bbd45c8d36e0e045ef640411"
                                }
                            ]
                        },
                        "id": "5K79FLRUCSysQnVESLcTdb"
                    },
                    "artists": [
                        {
                            "id": "4q3ewBCX7sLwd24euuV69X",
                            "profile": {
                                "name": "Bad Bunny"
                            }
                        }
                    ],
                    "associations": {
                        "videoAssociations": {
                            "totalCount": 0
                        }
                    },
                    "contentRating": {
                        "label": "EXPLICIT"
                    },
                    "discNumber": 1,
                    "duration": {
                        "totalMilliseconds": 237117
                    },
                    "id": "3sK8wGT43QFpWrvNQsrQya",
                    "name": "DtMF",
                    "playability": {
                        "playable": true,
                        "reason": "PLAYABLE"
                    },
                    "playcount": "736953579"
                },
                "uid": "9cbe5e7718b7f863df3f"
            }
        ]
    },
    "goods": {
        "concerts": {
            "items": [
                {
                    "festival": false,
                    "id": "1NpMTOZfiidBJ99tu1fq4o",
                    "location": {
                        "city": "Santo Domingo",
                        "name": "Estadio Olímpico Félix Sánchez"
                    },
                    "startDateIsoString": "2025-11-21T20:00-04:00",
                    "title": "Bad Bunny"
                },
                {
                    "festival": false,
                    "id": "42mlxHJcSYndV2QYAhZC7o",
                    "location": {
                        "city": "San José",
                        "name": "Estadio Nacional de Costa Rica"
                    },
                    "startDateIsoString": "2025-12-05T20:00-06:00",
                    "title": "Bad Bunny"
                }
            ],
            "totalCount": 11
        },
        "merch": []
    },
    "headerImage": {
        "sources": [
            {
                "maxHeight": 1140,
                "maxWidth": 2660,
                "url": "https://image-cdn-ak.spotifycdn.com/image/ab676186000010162b440403a6dd8816bd59447e"
            },
            {
                "maxHeight": 1080,
                "maxWidth": 1920,
                "url": "https://i2o.scdn.co/image/ab676186000016662b440403a6dd8816bd59447e"
            },
            {
                "maxHeight": 640,
                "maxWidth": 1494,
                "url": "https://image-cdn-ak.spotifycdn.com/image/ab6761860000660e2b440403a6dd8816bd59447e"
            },
            {
                "maxHeight": 641,
                "maxWidth": 1495,
                "url": "https://image-cdn-ak.spotifycdn.com/image/ab67618600006fba2b440403a6dd8816bd59447e"
            }
        ]
    },
    "id": "4q3ewBCX7sLwd24euuV69X",
    "preRelease": null,
    "profile": {
        "biography": {
            "text": "Bad Bunny is a young urban music singer, rapper and producer originally from Puerto Rico. This talented artist has demonstrated his already overwhelming power, influence and demand with completely sold-out concerts all over Europe, Latin America and the U.S.\n
\nSome of his most recognized singles include “Soy Peor,\" \"Diles,\" \"Tu No Metes Cabra,\" \"Chambea\" and Mia thats out with Drake. Bad Bunny has had a short but stunning career with colossal amounts of success",
            "type": "AUTOBIOGRAPHY"
        },
        "externalLinks": [
            {
                "name": "FACEBOOK",
                "url": "https://facebook.com/BadBunnyOfficial"
            },
            {
                "name": "INSTAGRAM",
                "url": "https://instagram.com/badbunnypr"
            },
            {
                "name": "TWITTER",
                "url": "https://twitter.com/sanbenito"
            }
        ],
        "name": "Bad Bunny",
        "pinnedItem": null,
        "playlists": {
            "items": [],
            "totalCount": 0
        },
        "verified": true
    },
    "relatedContent": {
        "appearsOn": {
            "items": [
                {
                    "items": [
                        {
                            "artists": [
                                {
                                    "id": "1mcTU81TzQhprhouKaTkpq",
                                    "profile": {
                                        "name": "Rauw Alejandro"
                                    }
                                }
                            ],
                            "coverArt": {
                                "sources": [
                                    {
                                        "height": 300,
                                        "url": "https://i.scdn.co/image/ab67616d00001e02ed432d7df981360768dd5856",
                                        "width": 300
                                    },
                                    {
                                        "height": 64,
                                        "url": "https://i.scdn.co/image/ab67616d00004851ed432d7df981360768dd5856",
                                        "width": 64
                                    },
                                    {
                                        "height": 640,
                                        "url": "https://i.scdn.co/image/ab67616d0000b273ed432d7df981360768dd5856",
                                        "width": 640
                                    }
                                ]
                            },
                            "date": {
                                "year": 2024
                            },
                            "id": "0aX0UXrHG2ceYIxTQcqJdA",
                            "name": "Cosa Nuestra",
                            "type": "ALBUM",
                            "url": "https://open.spotify.com/album/0aX0UXrHG2ceYIxTQcqJdA?si=CKMDcbiLSb2-jUuX_MFEKQ"
                        }
                    ],
                    "totalCount": 1
                }
            ],
            "totalCount": 1449
        },
        "discoveredOn": {
            "items": [
                {
                    "description": "Benito's greatest hits, los mejores hits del conejo.",
                    "id": "37i9dQZF1DX2apWzyECwyZ",
                    "images": {
                        "items": [
                            {
                                "sources": [
                                    {
                                        "height": null,
                                        "url": "https://i.scdn.co/image/ab67706f00000002b5c87a0cb63c40dfe1ffd68e",
                                        "width": null
                                    }
                                ]
                            }
                        ],
                        "totalCount": 1
                    },
                    "name": "This Is Bad Bunny",
                    "owner": {
                        "name": "Spotify",
                        "type": "USER"
                    },
                    "type": "PLAYLIST",
                    "url": "https://open.spotify.com/playlist/37i9dQZF1DX2apWzyECwyZ"
                }
            ],
            "totalCount": 100
        },
        "featuring": {
            "items": [
                {
                    "description": "Benito's greatest hits, los mejores hits del conejo.",
                    "id": "37i9dQZF1DX2apWzyECwyZ",
                    "images": {
                        "items": [
                            {
                                "sources": [
                                    {
                                        "height": null,
                                        "url": "https://i.scdn.co/image/ab67706f00000002b5c87a0cb63c40dfe1ffd68e",
                                        "width": null
                                    }
                                ]
                            }
                        ],
                        "totalCount": 1
                    },
                    "name": "This Is Bad Bunny",
                    "owner": {
                        "name": "Spotify",
                        "type": "USER"
                    },
                    "type": "PLAYLIST",
                    "url": "https://open.spotify.com/playlist/37i9dQZF1DX2apWzyECwyZ"
                }
            ],
            "totalCount": 8
        },
        "relatedArtists": {
            "items": [
                {
                    "id": "1mcTU81TzQhprhouKaTkpq",
                    "profile": {
                        "name": "Rauw Alejandro"
                    },
                    "visuals": {
                        "avatarImage": {
                            "sources": [
                                {
                                    "height": 640,
                                    "url": "https://i.scdn.co/image/ab6761610000e5eb5b50fae60980240b4ebd7808",
                                    "width": 640
                                },
                                {
                                    "height": 160,
                                    "url": "https://i.scdn.co/image/ab6761610000f1785b50fae60980240b4ebd7808",
                                    "width": 160
                                },
                                {
                                    "height": 320,
                                    "url": "https://i.scdn.co/image/ab676161000051745b50fae60980240b4ebd7808",
                                    "width": 320
                                }
                            ]
                        }
                    }
                }
            ],
            "totalCount": 40
        }
    },
    "relatedMusicVideos": {
        "items": [],
        "totalCount": 0
    },
    "saved": false,
    "stats": {
        "followers": 95289827,
        "monthlyListeners": 82575157,
        "topCities": [
            {
                "city": "Mexico City",
                "country": "MX",
                "numberOfListeners": 3098864,
                "region": "CMX"
            },
            {
                "city": "Santiago",
                "country": "CL",
                "numberOfListeners": 2530573,
                "region": "RM"
            },
            {
                "city": "Bogotá",
                "country": "CO",
                "numberOfListeners": 2485449,
                "region": "DC"
            },
            {
                "city": "Madrid",
                "country": "ES",
                "numberOfListeners": 2169195,
                "region": "MD"
            },
            {
                "city": "Buenos Aires",
                "country": "AR",
                "numberOfListeners": 1986806,
                "region": "C"
            }
        ],
        "worldRank": 10
    },
    "type": "ARTIST",
    "unmappedMusicVideos": {
        "items": [],
        "totalCount": 0
    },
    "url": "https://open.spotify.com/artist/4q3ewBCX7sLwd24euuV69X?si=RtsIgk8RQGKQpTZ7Nvj6yg",
    "visualIdentity": {
        "wideFullBleedImage": {
            "extractedColorSet": {
                "encoreBaseSetTextColor": {
                    "alpha": 255,
                    "blue": 253,
                    "green": 194,
                    "red": 115
                },
                "highContrast": {
                    "backgroundBase": {
                        "alpha": 255,
                        "blue": 138,
                        "green": 85,
                        "red": 0
                    },
                    "backgroundTintedBase": {
                        "alpha": 255,
                        "blue": 98,
                        "green": 49,
                        "red": 0
                    },
                    "textBase": {
                        "alpha": 255,
                        "blue": 255,
                        "green": 255,
                        "red": 255
                    },
                    "textBrightAccent": {
                        "alpha": 255,
                        "blue": 255,
                        "green": 255,
                        "red": 255
                    },
                    "textSubdued": {
                        "alpha": 255,
                        "blue": 255,
                        "green": 214,
                        "red": 143
                    }
                },
                "higherContrast": {
                    "backgroundBase": {
                        "alpha": 255,
                        "blue": 101,
                        "green": 52,
                        "red": 0
                    },
                    "backgroundTintedBase": {
                        "alpha": 255,
                        "blue": 140,
                        "green": 87,
                        "red": 40
                    },
                    "textBase": {
                        "alpha": 255,
                        "blue": 255,
                        "green": 255,
                        "red": 255
                    },
                    "textBrightAccent": {
                        "alpha": 255,
                        "blue": 96,
                        "green": 215,
                        "red": 30
                    },
                    "textSubdued": {
                        "alpha": 255,
                        "blue": 255,
                        "green": 214,
                        "red": 143
                    }
                },
                "minContrast": {
                    "backgroundBase": {
                        "alpha": 255,
                        "blue": 192,
                        "green": 136,
                        "red": 56
                    },
                    "backgroundTintedBase": {
                        "alpha": 255,
                        "blue": 163,
                        "green": 109,
                        "red": 21
                    },
                    "textBase": {
                        "alpha": 255,
                        "blue": 255,
                        "green": 255,
                        "red": 255
                    },
                    "textBrightAccent": {
                        "alpha": 255,
                        "blue": 255,
                        "green": 255,
                        "red": 255
                    },
                    "textSubdued": {
                        "alpha": 255,
                        "blue": 255,
                        "green": 255,
                        "red": 255
                    }
                }
            }
        }
    },
    "visuals": {
        "avatarImage": {
            "extractedColors": {
                "colorRaw": {
                    "hex": "#38B048"
                }
            },
            "sources": [
                {
                    "height": 640,
                    "url": "https://i.scdn.co/image/ab6761610000e5eb81f47f44084e0a09b5f0fa13",
                    "width": 640
                },
                {
                    "height": 160,
                    "url": "https://i.scdn.co/image/ab6761610000f17881f47f44084e0a09b5f0fa13",
                    "width": 160
                },
                {
                    "height": 320,
                    "url": "https://i.scdn.co/image/ab6761610000517481f47f44084e0a09b5f0fa13",
                    "width": 320
                }
            ]
        },
        "gallery": [
            {
                "sources": [
                    {
                        "height": 640,
                        "url": "https://i.scdn.co/image/ab6761670000ecd4a1b2c9183be1d6f8a05ec448",
                        "width": 640
                    }
                ]
            },
            {
                "sources": [
                    {
                        "height": 640,
                        "url": "https://i.scdn.co/image/ab6761670000ecd44b2ca3d0208fdce32f5d6363",
                        "width": 640
                    }
                ]
            },
            {
                "sources": [
                    {
                        "height": 640,
                        "url": "https://i.scdn.co/image/ab6761670000ecd4ee4c4db1ce6c9261561782c4",
                        "width": 640
                    }
                ]
            },
            {
                "sources": [
                    {
                        "height": 640,
                        "url": "https://i.scdn.co/image/ab6761670000ecd43662052fe9755aa1c291f312",
                        "width": 640
                    }
                ]
            }
        ]
    },
    "watchFeedEntrypoint": null
}
```

#### PLAYLIST (INFO)

```yaml
{
    "attributes": [
        {
            "key": "request_id",
            "value": "ssp~0634f9283330e238c6fab02c37a6c7d64526"
        },
        {
            "key": "uri",
            "value": "spotify:user:spotify:playlist:37i9dQZF1DXcBWIGoYBM5M"
        },
        {
            "key": "status",
            "value": "PUBLISHED"
        },
        {
            "key": "isAlgotorial",
            "value": "false"
        },
        {
            "key": "moveFollowersJobId",
            "value": "f4e857d1-a699-47fe-b5ea-d3d036ebc357"
        },
        {
            "key": "primary_color",
            "value": "#FFFFFF"
        },
        {
            "key": "clips_header_entrypoint",
            "value": "enabled"
        },
        {
            "key": "recs.hasArtists",
            "value": "spotify:artist:0fTSzq9jAh4c36UVb4V7CB,spotify:artist:4q3ewBCX7sLwd24euuV69X,spotify:artist:1HY2Jd0NmPuamShAr6KMms,spotify:artist:6qqNVTkY8uBg9cP3Jd7DAH,spotify:artist:4E2rKHVDssGJm2SCDOMMJB"
        },
        {
            "key": "autoplay",
            "value": "spotify:playlist:37i9dQZF1DX0kbJZpiYdZl"
        },
        {
            "key": "header_image_url_desktop",
            "value": "https://i.scdn.co/image/ab6768640000fe89ba0dedd8e5c99eef66aae69c"
        },
        {
            "key": "image_url",
            "value": "https://i.scdn.co/image/ab67686d00003ae096703cdbac087474d9872b39"
        },
        {
            "key": "episode_description",
            "value": "The hottest 50. Cover: Bad Bunny"
        },
        {
            "key": "is_video_first",
            "value": "false"
        },
        {
            "key": "correlation-id",
            "value": "ssp~0634f9283330e238c6fab02c37a6c7d64526"
        }
    ],
    "basePermission": "VIEWER",
    "content": {
        "items": [
            {
                "addedAt": {
                    "isoString": "2025-02-14T05:00:50.973Z"
                },
                "addedBy": null,
                "attributes": [
                    {
                        "key": "decision_id",
                        "value": "ssp~0634f88555c59c078b412ccb18ccbc6e1069"
                    }
                ],
                "item": {
                    "albumOfTrack": {
                        "artists": [
                            {
                                "id": "0fTSzq9jAh4c36UVb4V7CB",
                                "profile": {
                                    "name": "Alex Warren"
                                }
                            }
                        ],
                        "coverArt": {
                            "sources": [
                                {
                                    "height": 300,
                                    "url": "https://i.scdn.co/image/ab67616d00001e02000bd02e24b42b372007a785",
                                    "width": 300
                                },
                                {
                                    "height": 64,
                                    "url": "https://i.scdn.co/image/ab67616d00004851000bd02e24b42b372007a785",
                                    "width": 64
                                },
                                {
                                    "height": 640,
                                    "url": "https://i.scdn.co/image/ab67616d0000b273000bd02e24b42b372007a785",
                                    "width": 640
                                }
                            ]
                        },
                        "id": "6xomx5ekO7qHDvDh57rZ5S",
                        "name": "Ordinary"
                    },
                    "artists": [
                        {
                            "id": "0fTSzq9jAh4c36UVb4V7CB",
                            "profile": {
                                "name": "Alex Warren"
                            }
                        }
                    ],
                    "associations": {
                        "audioAssociations": [],
                        "videoAssociations": {
                            "totalCount": 1
                        }
                    },
                    "contentRating": {
                        "label": "NONE"
                    },
                    "discNumber": 1,
                    "id": "6qqrTXSdwiJaq8SO0X2lSe",
                    "mediaType": "UNKNOWN",
                    "name": "Ordinary",
                    "playability": {
                        "playable": true,
                        "reason": "PLAYABLE"
                    },
                    "playcount": "372846559",
                    "trackDuration": {
                        "totalMilliseconds": 186964
                    },
                    "trackNumber": 1,
                    "type": "TRACK",
                    "url": "https://open.spotify.com/track/6qqrTXSdwiJaq8SO0X2lSe"
                },
                "uid": "61313139636333646438326666333466"
            }
        ],
        "pagingInfo": {
            "limit": 10,
            "offset": 0
        },
        "totalCount": 50
    },
    "currentUserCapabilities": {
        "canAdministratePermissions": false,
        "canCancelMembership": false,
        "canEditItems": false,
        "canView": true
    },
    "description": "The hottest 50. Cover: Bad Bunny",
    "followers": 35304787,
    "following": false,
    "format": "format-shows-shuffle",
    "id": "37i9dQZF1DXcBWIGoYBM5M",
    "images": [
        {
            "extractedColors": {
                "colorRaw": {
                    "hex": "#00A858",
                    "isFallback": false
                }
            },
            "sources": [
                {
                    "height": null,
                    "url": "https://i.scdn.co/image/ab67706f00000002f02bf8efa822b70ff1147fff",
                    "width": null
                }
            ]
        }
    ],
    "members": {
        "items": [
            {
                "isOwner": true,
                "permissionLevel": "CONTRIBUTOR",
                "user": {
                    "avatar": {
                        "sources": [
                            {
                                "height": 64,
                                "url": "https://i.scdn.co/image/ab67757000003b8255c25988a6ac314394d3fbf5",
                                "width": 64
                            },
                            {
                                "height": 300,
                                "url": "https://i.scdn.co/image/ab6775700000ee8555c25988a6ac314394d3fbf5",
                                "width": 300
                            }
                        ]
                    },
                    "id": "spotify",
                    "name": "Spotify",
                    "type": "USER",
                    "url": "https://open.spotify.com/user/spotify",
                    "username": "spotify"
                }
            }
        ],
        "totalCount": 1
    },
    "name": "Today’s Top Hits",
    "owner": {
        "avatar": {
            "sources": [
                {
                    "height": 64,
                    "url": "https://i.scdn.co/image/ab67757000003b8255c25988a6ac314394d3fbf5",
                    "width": 64
                },
                {
                    "height": 300,
                    "url": "https://i.scdn.co/image/ab6775700000ee8555c25988a6ac314394d3fbf5",
                    "width": 300
                }
            ]
        },
        "id": "spotify",
        "name": "Spotify",
        "type": "USER",
        "url": "https://open.spotify.com/user/spotify",
        "username": "spotify"
    },
    "revisionId": "aB191gAAAACKNuEa9JrEsG/fonsx0D41",
    "type": "PLAYLIST",
    "url": "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M?si=10pBReVnQ26ZVfCywJjqYA",
    "watchFeedEntrypoint": null
}
```

#### PLAYLIST (CONTENT)

```yaml
[
    {
        "addedAt": {
            "isoString": "2025-02-14T05:00:50.973Z"
        },
        "addedBy": null,
        "albumOfTrack": {
            "artists": [
                {
                    "id": "0fTSzq9jAh4c36UVb4V7CB",
                    "profile": {
                        "name": "Alex Warren"
                    }
                }
            ],
            "coverArt": {
                "sources": [
                    {
                        "height": 300,
                        "url": "https://i.scdn.co/image/ab67616d00001e02000bd02e24b42b372007a785",
                        "width": 300
                    },
                    {
                        "height": 64,
                        "url": "https://i.scdn.co/image/ab67616d00004851000bd02e24b42b372007a785",
                        "width": 64
                    },
                    {
                        "height": 640,
                        "url": "https://i.scdn.co/image/ab67616d0000b273000bd02e24b42b372007a785",
                        "width": 640
                    }
                ]
            },
            "id": "6xomx5ekO7qHDvDh57rZ5S",
            "name": "Ordinary"
        },
        "artists": [
            {
                "id": "0fTSzq9jAh4c36UVb4V7CB",
                "profile": {
                    "name": "Alex Warren"
                }
            }
        ],
        "associations": {
            "associatedVideos": {
                "totalCount": 1
            }
        },
        "attributes": [
            {
                "key": "decision_id",
                "value": "ssp~0634f88555c59c078b412ccb18ccbc6e1069"
            }
        ],
        "contentRating": {
            "label": "NONE"
        },
        "discNumber": 1,
        "id": "6qqrTXSdwiJaq8SO0X2lSe",
        "name": "Ordinary",
        "playability": {
            "playable": true,
            "reason": "PLAYABLE"
        },
        "playcount": "372846559",
        "trackDuration": {
            "totalMilliseconds": 186964
        },
        "trackNumber": 1,
        "type": "TRACK",
        "uid": "61313139636333646438326666333466",
        "url": "https://open.spotify.com/track/6qqrTXSdwiJaq8SO0X2lSe"
    },
    {
        "addedAt": {
            "isoString": "2025-01-31T05:00:49.278Z"
        },
        "albumOfTrack": {
            "artists": [
                {
                    "id": "4q3ewBCX7sLwd24euuV69X",
                    "profile": {
                        "name": "Bad Bunny"
                    }
                }
            ],
            "coverArt": {
                "sources": [
                    {
                        "height": 300,
                        "url": "https://i.scdn.co/image/ab67616d00001e02bbd45c8d36e0e045ef640411",
                        "width": 300
                    },
                    {
                        "height": 64,
                        "url": "https://i.scdn.co/image/ab67616d00004851bbd45c8d36e0e045ef640411",
                        "width": 64
                    },
                    {
                        "height": 640,
                        "url": "https://i.scdn.co/image/ab67616d0000b273bbd45c8d36e0e045ef640411",
                        "width": 640
                    }
                ]
            },
            "id": "5K79FLRUCSysQnVESLcTdb",
            "name": "DeBÍ TiRAR MáS FOToS"
        },
        "artists": [
            {
                "id": "4q3ewBCX7sLwd24euuV69X",
                "profile": {
                    "name": "Bad Bunny"
                }
            }
        ],
        "attributes": [
            {
                "key": "decision_id",
                "value": "ssp~0634f88555c59c078b412ccb18ccbc6e1069"
            }
        ],
        "contentRating": {
            "label": "EXPLICIT"
        },
        "discNumber": 1,
        "id": "3sK8wGT43QFpWrvNQsrQya",
        "name": "DtMF",
        "playability": {
            "playable": true,
            "reason": "PLAYABLE"
        },
        "playcount": "736953579",
        "trackDuration": {
            "totalMilliseconds": 237117
        },
        "trackNumber": 16,
        "type": "TRACK",
        "uid": "37353033646439613832323361626261",
        "url": "https://open.spotify.com/track/3sK8wGT43QFpWrvNQsrQya"
    },
    {
        "addedAt": {
            "isoString": "2025-01-31T05:00:49.278Z"
        },
        "albumOfTrack": {
            "artists": [
                {
                    "id": "1HY2Jd0NmPuamShAr6KMms",
                    "profile": {
                        "name": "Lady Gaga"
                    }
                },
                {
                    "id": "0du5cEVh5yTK9QJze8zA0C",
                    "profile": {
                        "name": "Bruno Mars"
                    }
                }
            ],
            "coverArt": {
                "sources": [
                    {
                        "height": 300,
                        "url": "https://i.scdn.co/image/ab67616d00001e0282ea2e9e1858aa012c57cd45",
                        "width": 300
                    },
                    {
                        "height": 64,
                        "url": "https://i.scdn.co/image/ab67616d0000485182ea2e9e1858aa012c57cd45",
                        "width": 64
                    },
                    {
                        "height": 640,
                        "url": "https://i.scdn.co/image/ab67616d0000b27382ea2e9e1858aa012c57cd45",
                        "width": 640
                    }
                ]
            },
            "id": "10FLjwfpbxLmW8c25Xyc2N",
            "name": "Die With A Smile"
        },
        "artists": [
            {
                "id": "1HY2Jd0NmPuamShAr6KMms",
                "profile": {
                    "name": "Lady Gaga"
                }
            },
            {
                "id": "0du5cEVh5yTK9QJze8zA0C",
                "profile": {
                    "name": "Bruno Mars"
                }
            }
        ],
        "associations": {
            "associatedVideos": {
                "totalCount": 1
            }
        },
        "attributes": [
            {
                "key": "decision_id",
                "value": "ssp~0634f88555c59c078b412ccb18ccbc6e1069"
            }
        ],
        "contentRating": {
            "label": "NONE"
        },
        "discNumber": 1,
        "id": "2plbrEY59IikOBgBGLjaoe",
        "name": "Die With A Smile",
        "playability": {
            "playable": true,
            "reason": "PLAYABLE"
        },
        "playcount": "2448740345",
        "trackDuration": {
            "totalMilliseconds": 251667
        },
        "trackNumber": 1,
        "type": "TRACK",
        "uid": "66316565666635626138333863623939",
        "url": "https://open.spotify.com/track/2plbrEY59IikOBgBGLjaoe"
    }
]
```

### 🍂 Support

<img src="https://apify-uploads-prod.s3.us-east-1.amazonaws.com/5SxZhwYwpknFk8ek9-cat.gif" width="240">

Feel free to [reach out](https://console.apify.com/actors/XD6mekdMpbuy5aqiI/issues) to the developer for any issues or suggestions for improvement.

# Actor input Schema

## `query` (type: `array`):

Search Terms

## `filters.kind` (type: `string`):

No description

## `limit` (type: `integer`):

Number of results

## `dev_proxy_config` (type: `object`):

💡 <b>Supported protocol:</b><br><br><b>HTTP(S), SOCKS5</b><br><code>{http|socks5}://{user:pass}@{hostname|ip-address}:port</code><br><br><b>Example</b>: <code>socks5://example.com:9000</code>

## `dev_custom_headers` (type: `array`):

💡 Additional HTTP Headers

## `dev_custom_cookies` (type: `array`):

💡 Additional HTTP Cookies

## `dev_transform_fields` (type: `array`):

💡 <b>Transform the resulting output. Select only needed fields.</b><br><br>For nested object use <b>DOT</b>. For example: <pre>address.streetAddress</pre><br>For nested array use <b>NUMBER</b> <i>(index of array element starting from index=0)</i>. For example: <pre>images.0.url</pre>

## `dev_dataset_name` (type: `string`):

💡 <b>Save results into custom named Dataset, use mask to customize dataset name</b><br><br><code>{ACTOR} = actor name<br>{DATE} = date (YYYYMMDD)<br>{TIME} = time (HHMMSS)</code><br><br>This masks can be used to autogenerate Dataset Name.<br><br>example: <i><code>data-{DATE}</code></i><br>Depending on today date the dataset name will be: <code>data-20230603</code><i><br><br>default: <code>data-{ACTOR}-{DATE}-{TIME}</code></i>

## `dev_dataset_clear` (type: `boolean`):

Clear Dataset before insert/update.

## `dev_no_strip` (type: `boolean`):

💡 Keep/Save empty values <i><code>(NULL, FALSE, empty ARRAY, empty OBJECT, empty STRING)</code></i>

## Actor input object example

```json
{
  "query": [
    "iwan fals"
  ],
  "limit": 5
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "query": [
        "iwan fals"
    ],
    "limit": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("jupri/spotify").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "query": ["iwan fals"],
    "limit": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("jupri/spotify").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "query": [
    "iwan fals"
  ],
  "limit": 5
}' |
apify call jupri/spotify --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,jupri/spotify"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/XD6mekdMpbuy5aqiI/builds/wiwN5GjZzfVfOaDsq/openapi.json
