# Spotify Tracks Scraper – Basic Mode🎧 (`scrapearchitect/spotify-tracks-scraper-basic-mode`) Actor

🎤 Unlock the power of Spotify 🎧 with our Spotify Tracks Scraper! 🚀 Easily extract detailed track info 📊 from Spotify using keywords 🔍 or direct track URLs 🌐. Get rich data like track titles 🎵, artists 👩‍🎤, release dates 📅, duration ⏱️, popularity 🌟, available markets 🌍, and more!

- **URL**: https://apify.com/scrapearchitect/spotify-tracks-scraper-basic-mode.md
- **Developed by:** [Scrape Architect](https://apify.com/scrapearchitect) (community)
- **Categories:** Integrations, Social media, Automation
- **Stats:** 67 total users, 0 monthly users, 100.0% runs succeeded, 5 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period.You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#rental-actors

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Spotify Tracks Scraper - Basic Mode Track Metadata Scraper

### What Is the Spotify Tracks Scraper?

The **Spotify Tracks Scraper** (Basic Mode) is a lightweight Apify actor for extracting track metadata from Spotify. This Spotify Tracks Scraper returns essential track information including title, artist, duration, cover image, release date, and direct Spotify URLs. The Spotify Tracks Scraper supports both keyword search and direct Spotify track URLs as input.

This Spotify Tracks Scraper is the fastest option for simple track data extraction. The Spotify Tracks Scraper paginates search results automatically with no hidden limits - request as many tracks as you need.

***

### Why Use This Spotify Tracks Scraper?

- **Lightweight and fast** - the Spotify Tracks Scraper focuses on essential metadata without heavy detail fetching.
- **Unlimited results** - the Spotify Tracks Scraper has no hidden caps on the number of tracks returned.
- **Full pagination** - search results are paginated by the Spotify Tracks Scraper until all requested results are fetched.
- **Keyword and URL input** - the Spotify Tracks Scraper accepts both search keywords and direct Spotify track URLs.
- **Clean output** - the Spotify Tracks Scraper delivers well-structured JSON with all essential track fields.
- **Low resource usage** - the Spotify Tracks Scraper uses fewer API calls per track than advanced alternatives.

***

### Input Options for the Spotify Tracks Scraper

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `searchMode` | string | `"keyword"` | Choose `"keyword"`, `"url"`, or `"both"` for the Spotify Tracks Scraper input. |
| `keywords` | array | `[]` | Search terms for the Spotify Tracks Scraper to query. |
| `urls` | array | `[]` | Direct Spotify track URLs for the Spotify Tracks Scraper to process. |
| `maxResults` | integer | `3` | Maximum tracks per keyword. The Spotify Tracks Scraper has no hidden cap. |
| `fetchDetails` | boolean | `true` | Enable detailed metadata extraction in the Spotify Tracks Scraper. |
| `proxyCountry` | string | `"US"` | Proxy exit country for the Spotify Tracks Scraper. |

***

### Output Fields from the Spotify Tracks Scraper

The Spotify Tracks Scraper returns these fields for each track:

| Field | Type | Description |
|-------|------|-------------|
| `track_id` | string | Unique Spotify track ID. |
| `track_title` | string | Track title. |
| `track_creator` | string | Primary artist name. |
| `track_creator_profile` | string | Spotify profile URL of the primary artist. |
| `track_cover` | string | Album cover image URL. |
| `track_creation_date` | string | Release date of the track. |
| `track_url` | string | Direct Spotify URL to the track. |
| `duration` | string | Formatted duration (e.g., `"4m 12s"`). |
| `duration_ms` | integer | Duration in milliseconds. |
| `track_artists` | array | All artist names on this track. |
| `tracks_artists_url` | array | Spotify URLs for all artists. |
| `artist_profile_pic` | string | Profile image URL of the primary artist. |

#### Nested `track_details` Object from the Spotify Tracks Scraper

When `fetchDetails` is enabled, the Spotify Tracks Scraper also returns:

| Field | Type | Description |
|-------|------|-------------|
| `track_details.track_title` | string | Track title (from detailed API). |
| `track_details.track_artists` | array | Artist names on this track. |
| `track_details.track_duration` | string | Formatted duration. |
| `track_details.tracks_artists_url` | array | Spotify URLs for each artist. |
| `track_details.playcount` | string | Total play count for this track. |
| `track_details.album` | string | Album name containing this track. |
| `track_details.artist_profile_pic` | string | Primary artist profile image URL. |

#### Nested `popular_tracks` Array from the Spotify Tracks Scraper

| Field | Type | Description |
|-------|------|-------------|
| `popular_tracks[].name` | string | Track name. |
| `popular_tracks[].url` | string | Spotify URL to this popular track. |
| `popular_tracks[].playcount` | string | Play count for this popular track. |
| `popular_tracks[].duration_ms` | integer | Duration in milliseconds. |
| `popular_tracks[].artists` | array | Artists on this popular track. |

***

### Example Output from the Spotify Tracks Scraper

```json
{
  "track_id": "4cOdK2wGLETKBW3PvgPWqT",
  "track_title": "Levitating",
  "track_creator": "Dua Lipa",
  "track_creator_profile": "https://open.spotify.com/artist/6M2wZ9GZgrQXHCFfjv46we",
  "track_cover": "https://i.scdn.co/image/...",
  "track_creation_date": "2020-03-27",
  "track_url": "https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT",
  "duration": "3m 23s",
  "duration_ms": 203064,
  "track_artists": ["Dua Lipa"],
  "tracks_artists_url": ["https://open.spotify.com/artist/6M2wZ9GZgrQXHCFfjv46we"],
  "artist_profile_pic": "https://i.scdn.co/image/...",
  "popular_tracks": [
    {
      "name": "Levitating",
      "url": "https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT",
      "playcount": "2345678901",
      "duration_ms": 203064,
      "artists": ["Dua Lipa"]
    }
  ],
  "track_details": {
    "track_title": "Levitating",
    "track_artists": ["Dua Lipa"],
    "track_duration": "3m 23s",
    "tracks_artists_url": ["https://open.spotify.com/artist/6M2wZ9GZgrQXHCFfjv46we"],
    "playcount": "2345678901",
    "album": "Future Nostalgia",
    "artist_profile_pic": "https://i.scdn.co/image/..."
  }
}
```

***

### How the Spotify Tracks Scraper Works

1. **Search or Load** - The Spotify Tracks Scraper either searches Spotify for tracks matching your keywords or loads tracks directly from URLs.
2. **Basic Metadata** - The Spotify Tracks Scraper extracts track ID, title, artist, cover image, release date, and duration.
3. **Detail Enrichment** - When `fetchDetails` is enabled, the Spotify Tracks Scraper makes additional API calls per track to get play counts, album info, and artist data.
4. **Popular Tracks** - The Spotify Tracks Scraper also fetches the primary artist's popular tracks for context.
5. **Pagination** - Search results are fully paginated by the Spotify Tracks Scraper.
6. **Data Output** - Each track record is pushed to the Apify dataset as structured JSON.

***

### Spotify Tracks Scraper: Basic Mode vs Advanced Mode

This is the **Basic Mode** Spotify Tracks Scraper - ideal for straightforward track metadata extraction. For advanced sorting, filtering, and more detailed output control, see the Advanced Filtering Spotify Tracks Scraper listed below. The Basic Mode Spotify Tracks Scraper is recommended when you need simple, fast track data without complex filtering.

***

### Use Cases for the Spotify Tracks Scraper

- **Track metadata collection** - Use the Spotify Tracks Scraper to build datasets of track information for analysis.
- **Music research** - The Spotify Tracks Scraper provides essential data for academic and industry research.
- **Play count monitoring** - Run the Spotify Tracks Scraper periodically to track play count changes over time.
- **Catalog building** - Use the Spotify Tracks Scraper to catalog tracks from search results or specific URLs.
- **Data pipeline integration** - The Spotify Tracks Scraper delivers clean JSON compatible with any data pipeline.

***

### Related Spotify Scrapers and Tools by ScrapeArchitect

| Actor | Description | Link |
|-------|-------------|------|
| All-in-One Spotify Scraper | The ultimate Spotify scraper with 6 operation modes | [View on Apify](https://apify.com/scrapearchitect/all-in-one-spotify-scraper-downloader) |
| Spotify Tracks Scraper - Advanced Filtering | Spotify track scraper with sorting and filtering | [View on Apify](https://apify.com/scrapearchitect/spotify-track-scraper-with-advanced-filtering) |
| Spotify Artist Scraper | Dedicated Spotify artist profile scraper | [View on Apify](https://apify.com/scrapearchitect/spotify-artist-scraper) |
| Spotify Album Scraper | Dedicated Spotify album scraper with full track listings | [View on Apify](https://apify.com/scrapearchitect/spotify-album-scraper) |
| Spotify Playlist Scraper | Dedicated Spotify playlist scraper | [View on Apify](https://apify.com/scrapearchitect/Spotify-Playlists-Scraper) |
| Spotify Tracks Downloader - Advanced Filters | Download Spotify tracks with advanced filter options | [View on Apify](https://apify.com/scrapearchitect/spotify-tracks-downloader-advanced-filters-unlocked) |
| Spotify Music Downloader - Fast Mode | Standalone fast-mode Spotify downloader | [View on Apify](https://apify.com/scrapearchitect/spotify-tracks-music-downloader-Fast) |
| Spotify Music Downloader - Accurate Mode | Standalone accurate-mode Spotify downloader | [View on Apify](https://apify.com/scrapearchitect/spotify-music-downloader-Accurate) |
| Spotify Tracks Downloader | Simple fast Spotify tracks downloader | [View on Apify](https://apify.com/scrapearchitect/spotify-tracks-downloader) |

***

### Notes

- This Spotify Tracks Scraper runs on the Apify platform. No Spotify API key or login is required.
- The Spotify Tracks Scraper uses public Spotify web endpoints exclusively.
- Output from the Spotify Tracks Scraper is available in JSON, CSV, Excel, or via the Apify dataset API.
- For advanced filtering and sorting options, use the Spotify Tracks Scraper - Advanced Filtering.

# Actor input Schema

## `searchMode` (type: `string`):

Select whether to search by keywords, process direct track URLs, or both.

## `keywords` (type: `array`):

Enter track-related keywords (e.g. 'love', 'rock') to search for tracks by title.

## `track_urls` (type: `array`):

Provide direct Spotify track URLs.

## `maxResults` (type: `integer`):

Maximum number of tracks per keyword (no limit)

## `fetchDetails` (type: `boolean`):

When enabled, fetches comprehensive track details (play count, artist overview with top tracks, album info) via additional API calls per result. Provides richer data but takes significantly longer for large result sets. When disabled (default), returns search-only data for maximum speed.

## `proxyCountry` (type: `string`):

Residential proxy exit country — Spotify sees your requests as coming from this location.

⭐ US recommended — widest catalog and most reliable.

If results are empty, try switching to US. If US still returns empty, it is a script or API issue — create an issue for confirmation.

## Actor input object example

```json
{
  "searchMode": "both",
  "keywords": [
    "love",
    "rock"
  ],
  "track_urls": [
    {
      "url": "https://open.spotify.com/track/3n3Ppam7vgaVa1iaRUc9Lp",
      "method": "GET"
    }
  ],
  "maxResults": 5,
  "fetchDetails": false,
  "proxyCountry": "US"
}
```

# 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 = {
    "keywords": [
        "love",
        "rock"
    ],
    "track_urls": [
        {
            "url": "https://open.spotify.com/track/3n3Ppam7vgaVa1iaRUc9Lp",
            "method": "GET"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapearchitect/spotify-tracks-scraper-basic-mode").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 = {
    "keywords": [
        "love",
        "rock",
    ],
    "track_urls": [{
            "url": "https://open.spotify.com/track/3n3Ppam7vgaVa1iaRUc9Lp",
            "method": "GET",
        }],
}

# Run the Actor and wait for it to finish
run = client.actor("scrapearchitect/spotify-tracks-scraper-basic-mode").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "keywords": [
    "love",
    "rock"
  ],
  "track_urls": [
    {
      "url": "https://open.spotify.com/track/3n3Ppam7vgaVa1iaRUc9Lp",
      "method": "GET"
    }
  ]
}' |
apify call scrapearchitect/spotify-tracks-scraper-basic-mode --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=scrapearchitect/spotify-tracks-scraper-basic-mode",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/eCKKhLQE8vMrE0f9M/builds/hc6QEK5bMd0yr6kNI/openapi.json
