# Spotify Audiobooks Scraper (`codenest/spotify-audiobooks-scraper`) Actor

Input search keywords or Spotify audiobook URLs to extract complete metadata: title, authors, narrators, publisher, star ratings, price, duration, and detailed chapter breakdowns. Delivers a clean, null-free dataset ready for Excel, CSV, or JSON.

- **URL**: https://apify.com/codenest/spotify-audiobooks-scraper.md
- **Developed by:** [CodeNest](https://apify.com/codenest) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 audiobook result scrapeds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## 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

## 📚 Spotify Audiobooks Library & Chapters Scraper

The most reliable, fast, and comprehensive **Spotify Audiobooks Data Scraper** on the Apify Store. Search Spotify's entire audiobook library by keywords or paste direct audiobook URLs to extract rich book metadata, author profiles, narrator names, publishers, star ratings, retail pricing, high-resolution cover artwork, and **complete chapter-by-chapter breakdowns**.

No Spotify API key or developer account required. Includes built-in residential proxy management, Pay-Per-Event (PPE) cost efficiency, and clean dataset formatting ready for Excel, CSV, Google Sheets, or automated API pipelines.

***

### ⚡ Key Features

- 🔍 **Dual Discovery Modes**: Search audiobooks by keywords/titles or scrape exact titles using Spotify audiobook URLs (`open.spotify.com/show/...`) and URIs (`spotify:show:...`).
- 📖 **Full Chapter Breakdown**: Extracts structured chapter lists including chapter number, chapter title, duration (milliseconds & formatted `MM:SS`), playability status, and individual chapter Spotify URLs.
- 🎙️ **Narrator & Author Separation**: Distinct fields for authors, contributor IDs, and narrators (`Scott Brick`, `Stephen Fry`, etc.).
- ⭐ **Ratings & Pricing Intelligence**: Captures average listener star ratings, total review counts, retail list prices, discounted final prices, and currencies.
- 🖼️ **High-Resolution Cover Art**: Automatically extracts the highest quality 640×640 album artwork.
- 🧹 **Zero Bloat & Excel-Ready**: Strips internal Spotify GraphQL noise (180+ country market arrays, circular objects, empty audio URLs). All main columns are flat strings or numbers—no `[object Object]` corruption in CSV or Excel exports.
- 💰 **Pay-Per-Event (PPE) Supported**: Pay only for successful audiobooks scraped with transparent, predictable event pricing.

***

> \[!NOTE]
> **Market Availability**: Spotify Audiobooks are currently available in select regions (United States, United Kingdom, Australia, Canada, Ireland, and New Zealand). The scraper connects via optimized US residential proxies by default to ensure maximum catalog coverage.

***

### ⚙️ Input Configuration

| Parameter | Type | Default | Description |
|---|---|---|---|
| **Search Keyword(s)** (`keyword`) | Array of Strings | `["Harry Potter", "Stephen King"]` | One or more search terms to find audiobooks on Spotify. |
| **Spotify Audiobook URIs / URLs** (`spotifyUris`) | Array of Strings | `[]` | Direct Spotify show URLs or URIs (`spotify:show:ID` or `https://open.spotify.com/show/ID`). |
| **Search Limit** (`audiobooks_search_limit`) | Integer | `10` | Maximum number of audiobook results to scrape per keyword. |
| **Fetch Full Details** (`audiobooks_fetchDetails`) | Boolean | `false` | When enabled in Search mode, fetches complete chapter breakdowns, ratings, narrators, and pricing for each result. (Get Details mode always enriches automatically). |
| **Chapter List Limit** (`audiobooks_get_limit`) | Integer | `50` | Maximum number of chapters to retrieve per audiobook (e.g. 25, 50, 100). |

***

### 📊 Output Schema

Every exported record provides clean, standardized fields organized for instant analysis, CSV export, and database ingestion:

| Field | Data Type | Description |
|---|---|---|
| `id` | String | Unique Spotify audiobook ID (e.g. `4obJ7KjpHE34URlO6rLl6m`) |
| `name` | String | Full audiobook title |
| `author` | String | Primary author name |
| `authors` | String | Comma-separated list of all authors |
| `author_id` | String | Spotify author ID |
| `author_url` | String | Direct Spotify author profile URL |
| `narrator` | String | Primary voice narrator name |
| `narrators` | String | Comma-separated list of all narrators |
| `publisher` | String | Publishing house or audio imprint |
| `release_date` | String | Publication date (`YYYY-MM-DD`) |
| `duration_ms` | Integer | Total audio duration in milliseconds |
| `duration_formatted` | String | Human-readable duration (e.g. `14h 30m 55s`) |
| `rating_average` | Float | Average listener star rating out of 5.0 (e.g. `4.29`) |
| `rating_count` | Integer | Total number of user star ratings |
| `price` | Float | Final purchase price (e.g. `20.90`) |
| `price_formatted` | String | Formatted final price with currency symbol (e.g. `$20.90`) |
| `regular_price` | String | Original retail / list price (e.g. `$22.50`) |
| `currency` | String | Pricing currency code (e.g. `USD`) |
| `is_playable` | Boolean | Whether the audiobook is playable in the active region |
| `is_prerelease` | Boolean | `true` if the book is an upcoming pre-release |
| `total_chapters` | Integer | Total chapter count across the entire audiobook |
| `chapters_count` | Integer | Number of chapters scraped in this record |
| `genres` | String | Comma-separated literary categories and genres |
| `cover_image_url` | String | High-resolution cover artwork URL (640×640) |
| `description` | String | Clean editorial synopsis and book summary |
| `url` | String | Direct web URL on `open.spotify.com` |
| `share_url` | String | Official Spotify social sharing link |
| `uri` | String | Spotify URI (`spotify:show:ID`) |
| `search_query` | String | Keyword used to discover this audiobook (if search mode) |
| `trailer` | Object | Audio preview trailer details (`id`, `name`, `duration`, `url`) |
| `chapters` | Array of Objects | Clean list of chapters (see chapter object schema below) |

#### 📖 Chapter Object Schema

Each item inside the `chapters` array contains:

```json
{
  "chapter_number": 1,
  "id": "4mMxTCW9hohceV1XkuVKff",
  "name": "Opening Credits",
  "duration_ms": 33828,
  "duration_formatted": "00:33",
  "is_playable": false,
  "cover_art_url": "https://i.scdn.co/image/ab676663000022a882d8ca761674c93eae6a2a07",
  "url": "https://open.spotify.com/episode/4mMxTCW9hohceV1XkuVKff",
  "uri": "spotify:episode:4mMxTCW9hohceV1XkuVKff"
}
```

***

### 📋 Sample Output JSON

```json
[
  {
    "id": "4obJ7KjpHE34URlO6rLl6m",
    "name": "In Cold Blood",
    "author": "Truman Capote",
    "authors": "Truman Capote",
    "author_id": "195as8eK7uOpdRBA9nrNr9",
    "author_url": "https://open.spotify.com/author/195as8eK7uOpdRBA9nrNr9",
    "narrator": "Scott Brick",
    "narrators": "Scott Brick",
    "publisher": "Truman Capote",
    "release_date": "2006-01-03",
    "duration_ms": 52255094,
    "duration_formatted": "14h 30m 55s",
    "rating_average": 4.29,
    "rating_count": 129,
    "price": 20.9,
    "price_formatted": "$20.90",
    "regular_price": "$22.50",
    "currency": "USD",
    "is_playable": true,
    "is_prerelease": false,
    "total_chapters": 211,
    "chapters_count": 2,
    "genres": "Social Sciences, History, Non-fiction, True Crime",
    "cover_image_url": "https://i.scdn.co/image/ab676663000022a882d8ca761674c93eae6a2a07",
    "description": "Truman Capote’s masterpiece of true crime, intensely researched and vividly atmospheric—'as it if were happening before [the reader’s] very eyes' (Time)...",
    "url": "https://open.spotify.com/show/4obJ7KjpHE34URlO6rLl6m",
    "share_url": "https://open.spotify.com/show/4obJ7KjpHE34URlO6rLl6m?si=7ln4eTcjTZi-rml8pS3FXw",
    "uri": "spotify:show:4obJ7KjpHE34URlO6rLl6m",
    "search_query": "cold",
    "chapters": [
      {
        "chapter_number": 1,
        "id": "4mMxTCW9hohceV1XkuVKff",
        "name": "Opening Credits",
        "duration_ms": 33828,
        "duration_formatted": "00:33",
        "is_playable": false,
        "cover_art_url": "https://i.scdn.co/image/ab676663000022a882d8ca761674c93eae6a2a07",
        "url": "https://open.spotify.com/episode/4mMxTCW9hohceV1XkuVKff",
        "uri": "spotify:episode:4mMxTCW9hohceV1XkuVKff"
      },
      {
        "chapter_number": 2,
        "id": "1JBBYycnHbWwyMh7o5AQ7A",
        "name": "Chapter 1",
        "duration_ms": 297325,
        "duration_formatted": "04:57",
        "is_playable": false,
        "cover_art_url": "https://i.scdn.co/image/ab676663000022a882d8ca761674c93eae6a2a07",
        "url": "https://open.spotify.com/episode/1JBBYycnHbWwyMh7o5AQ7A",
        "uri": "spotify:episode:1JBBYycnHbWwyMh7o5AQ7A"
      }
    ]
  }
]
```

***

### 💳 Pay-Per-Event (PPE) Pricing

This Actor charges based on exact value delivered using Apify's Pay-Per-Event model:

| Event Name | Event Title | Price (USD) | Description |
|---|---|---|---|
| `apify-actor-start` | Actor Start | `$0.00005` | Synthetic startup charge covering initialization resources. |
| `result` | Audiobook Result Scraped | `$0.004` | Charged for each audiobook extracted and saved to the dataset. |
| `detail` | Full Chapters & Details Enrichment | `$0.004` | Charged when full chapter listings, narrators, star ratings, and publisher metadata are enriched. |

- **Basic Search**: `$0.004` per audiobook.
- **Full Audiobook Details + Chapter Breakdown**: `$0.008` per enriched audiobook.

***

### 🎁 Free Tier Limits

Free plan users can test the Actor with:

- **Max 5 audiobooks** per single run.
- **Max 20 audiobooks** lifetime across all runs.
- **Paid Apify users** enjoy unlimited scraping without restrictions.

# Actor input Schema

## `keyword` (type: `array`):

One or more search terms to find audiobooks on Spotify.
⚠️ Audiobooks are only available in US, GB, AU, CA markets.

💡 Leave empty and fill Spotify URIs below to use Get Details mode instead.

## `spotifyUris` (type: `array`):

One or more Spotify show URIs or URLs to fetch audiobook metadata.
Examples: spotify:show:ID · https://open.spotify.com/show/ID

⚠️ Only show URIs/URLs are accepted (audiobooks use spotify:show: prefix).
💡 Leave empty and fill Search Keywords above to use Search mode instead.

## `audiobooks_search_limit` (type: `integer`):

Maximum number of results per keyword.

## `audiobooks_fetchDetails` (type: `boolean`):

📌 Search mode only — Get Details mode always fetches full details.

✅ When ON — fetches full audiobook metadata for every search result. You get: complete chapter listings (paginated), narrator names, publisher, star ratings, accessibility data, pricing info, and content descriptions.

❌ When OFF — you only get basic search data: audiobook name, author, image, and URI. You will NOT get chapters, narrator info, ratings, or any detailed metadata.

⚠️ Slower — extra API calls per search result.

## `audiobooks_get_limit` (type: `integer`):

Maximum number of chapters to fetch per audiobook (e.g. 50).

## Actor input object example

```json
{
  "keyword": [
    "Harry Potter",
    "Stephen King"
  ],
  "spotifyUris": [
    "spotify:show:5j1loyWwAX3rriMYI2VLpF",
    "https://open.spotify.com/show/4AFdmpVC09311BTS8Fx7vQ"
  ],
  "audiobooks_search_limit": 10,
  "audiobooks_fetchDetails": false,
  "audiobooks_get_limit": 50
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset of Spotify audiobooks containing title, author, narrator, duration, rating, price, cover art, and detailed chapter listings.

# 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 = {
    "keyword": [
        "Harry Potter",
        "Stephen King"
    ],
    "spotifyUris": [
        "spotify:show:5j1loyWwAX3rriMYI2VLpF",
        "https://open.spotify.com/show/4AFdmpVC09311BTS8Fx7vQ"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("codenest/spotify-audiobooks-scraper").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 = {
    "keyword": [
        "Harry Potter",
        "Stephen King",
    ],
    "spotifyUris": [
        "spotify:show:5j1loyWwAX3rriMYI2VLpF",
        "https://open.spotify.com/show/4AFdmpVC09311BTS8Fx7vQ",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("codenest/spotify-audiobooks-scraper").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 '{
  "keyword": [
    "Harry Potter",
    "Stephen King"
  ],
  "spotifyUris": [
    "spotify:show:5j1loyWwAX3rriMYI2VLpF",
    "https://open.spotify.com/show/4AFdmpVC09311BTS8Fx7vQ"
  ]
}' |
apify call codenest/spotify-audiobooks-scraper --silent --output-dataset

```

## MCP server setup

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

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/JOQ2AJDqarg53gLjm/builds/XuoSbXkwQEeqVZhFc/openapi.json
