# Spotify Podcast Guest Extractor (`devilscrapes/spotify-podcast-guest-graph`) Actor

Extract a structured guest-history log from Spotify podcast episodes — episode metadata plus NLP-detected guest names, roles, and confidence scores. Uses your own Spotify Developer credentials; metadata-only, no audio.

- **URL**: https://apify.com/devilscrapes/spotify-podcast-guest-graph.md
- **Developed by:** [DevilScrapes](https://apify.com/devilscrapes) (community)
- **Categories:** Lead generation, Other
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

<div align="center">
  <img src=".actor/icon.svg" width="160" alt="Devil Scrapes mark" />

## Spotify Podcast Guest Extractor

**💰 $5.05 / 1 000 results** &nbsp;·&nbsp; pay only for results &nbsp;·&nbsp; no credit card to try

_We do the dirty work so your dataset stays clean._ 😈

Extract a structured guest-history log from Spotify podcast episodes — episode metadata plus NLP-detected guest names, roles, and confidence scores. Uses your own Spotify Developer credentials; metadata-only, no audio.

</div>

---

### 🎯 What this scrapes

Spotify publishes every show's episode list at <code>api.spotify.com/v1/shows/{id}/episodes</code>. This Actor authenticates with your Spotify Developer credentials, pages through episodes for one or more shows, runs spaCy + regex over each episode description, and emits one row per <em>episode × guest</em> pair — name, inferred role (host / cohost / guest), and a confidence score.

### 🔥 What we handle for you

- 🛡️ **Browser fingerprint rotation** — `curl-cffi` impersonates real Chrome / Firefox / Safari TLS handshakes so the target sees a browser, not Python.
- 🌐 **Residential proxy rotation** via Apify Proxy — fresh session and exit IP on every block.
- 🔁 **Retries with exponential backoff** on `408 / 429 / 5xx` — up to 5 attempts per page, `Retry-After` honoured.
- 🧱 **Rate-limit-aware pacing** — when the target pushes back, we slow down instead of getting banned.
- 🧊 **Clean, typed dataset rows** — Pydantic-validated, ISO-8601 timestamps, stable IDs, JSON / CSV / Excel export straight from the Apify Console.
- 💰 **Pay-Per-Event pricing** — you only pay for results that hit your dataset. No data, no charge.

### 💡 Use cases

- **Podcast guest research** — build a database of who has appeared on which podcasts to find cross-show patterns.
- **Booking agencies** — surface guests that match a target podcast's profile to pitch your client into similar shows.
- **Media intel** — track when a public figure (CEO, author, researcher) makes podcast appearances.
- **Entity-graph AI training** — feed (person, show, date) triples into a knowledge graph for downstream ML.
- **Journalists** — quickly trace a person's recent podcast circuit to map their messaging and audience reach.

### ⚙️ How to use it

1. Click **Try for free** at the top of the page.
2. Fill in the input form — most fields have sensible defaults.
3. Click **Start**. Output streams into the run's dataset.
4. Export from **Storage → Dataset** as JSON, CSV, or Excel — or fetch via the API.

### 📥 Input

| Field | Type | Required | Default | Notes |
|---|---|:--:|---|---|
| `show_ids` | `array` | no | ['2MAi0BvDc6GTFvKFPXnkCL'] | List of 22-character Spotify show IDs (the bit after `/show/` in any open.spotify.com URL). Provide this OR `showSearchQ |
| `showSearchQuery` | `string` | no | '—' | Free-text query passed to /v1/search. The top-matching show is used. Ignored when `showIds` is set. |
| `maxEpisodesPerShow` | `integer` | no | 20 | Newest episodes first. Hard cap 200. |
| `clientId` | `string` | **yes** | '—' | From your Spotify Developer Dashboard application (https://developer.spotify.com/dashboard). Required. |
| `clientSecret` | `string` | **yes** | '—' | From the same Spotify Developer application. Required. Stored as an Apify Secret — never logged. |
| `market` | `string` | no | 'US' | Country code used for availability filtering on Spotify episode endpoints. |
| `proxyConfiguration` | `object` | no | {'useApifyProxy': False} | Optional — Spotify Web API does not IP-block at normal volumes. |

#### Example input

```json
{
  "show_ids": [
    "2MAi0BvDc6GTFvKFPXnkCL"
  ],
  "maxEpisodesPerShow": 3,
  "clientId": "",
  "clientSecret": "",
  "market": "US",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
````

### 📤 Output

Every row is one dataset item.

| Field | Type | Notes |
|---|---|---|
| `show_id` | `string` | Spotify show ID. |
| `show_name` | `string` | Show name as returned by /v1/shows/{id}. |
| `episode_id` | `string` | Spotify episode ID. |
| `episode_name` | `string` | Episode title. |
| `episode_release_date` | `['string', 'null']` | ISO date (YYYY-MM-DD). |
| `episode_duration_ms` | `['integer', 'null']` | Episode length in milliseconds. |
| `guest_name` | `['string', 'null']` | NLP-extracted guest name. Null when no guest could be identified (host-only row preserves episode metadata). |
| `guest_role` | `string` | One of `host`, `cohost`, `guest`. |
| `confidence` | `number` | Heuristic 0.0-1.0 — regex matches 0.85-1.00, bare NER 0.55-0.75, host-fallback 0.0. |
| `episode_url` | `string` | Public episode URL on open.spotify.com. |
| `scraped_at` | `string` | ISO 8601 UTC timestamp at row creation. |

#### Example output

```json
{
  "show_id": "2MAi0BvDc6GTFvKFPXnkCL",
  "show_name": "Lex Fridman Podcast",
  "episode_id": "5kF8w2Q9pNeLBxXxNH1mxJ",
  "episode_name": "#412 \u2014 Demis Hassabis: AGI and the Future of AI",
  "episode_release_date": "2026-04-30",
  "episode_duration_ms": 9384210,
  "guest_name": "Demis Hassabis",
  "guest_role": "guest",
  "confidence": 0.92,
  "episode_url": "https://open.spotify.com/episode/5kF8w2Q9pNeLBxXxNH1mxJ",
  "scraped_at": "2026-05-16T12:00:00Z"
}
```

### 💰 Pricing

Pay-Per-Event — you pay only when these events fire:

| Event | USD | What it is |
|---|---:|---|
| `actor-start` | $0.05 | One-off warm-up charge per run |
| `result` | $0.005 | Per dataset item |

Example: 1 000 results at the rates above ≈ **$5.05**. No subscription, no minimum, no card to start — Apify gives every new account $5 of free credit.

### 🚧 Limitations

Metadata-only: no audio, no transcripts. Guest extraction quality depends on episode description content — shows with sparse or non-English descriptions yield lower recall. Spotify catalog endpoints occasionally return 404 for regionally restricted episodes; these are logged and skipped.

### ❓ FAQ

**Why do I need a Spotify client\_id and client\_secret?**

Spotify's Web API requires OAuth 2.0 — even for public catalog data. Creating a free app on the Spotify Developer Dashboard takes 60 seconds: https://developer.spotify.com/dashboard. The Actor uses the `client_credentials` grant, which gives it read-only access to the public catalog and never touches any user account.

**Are episode transcripts included?**

No. Spotify does not expose transcripts via the public Web API; downloading episode audio would violate Spotify's ToS. This Actor is metadata-only — episode title, description, release date, plus extracted guest names from the description.

**How accurate is the guest extraction?**

The Actor first sweeps regex patterns common in podcast show notes (`with guest X`, `interview with X`, `#412 — X`, etc.) at confidence 0.85-1.00. It then falls back to spaCy's `en_core_web_sm` PERSON entity recognizer at confidence 0.55-0.75. Each row carries its confidence score — filter on `confidence >= 0.8` for high-precision use cases.

**What if a show is in a language other than English?**

Regex patterns are English-only in v1. The spaCy NER fallback still surfaces PERSON entities but with reduced accuracy. Multi-language NLP is planned for v2 — open an issue with your language to upvote.

**Why is one row sometimes emitted with `guest_name: null`?**

If no guest can be extracted (e.g. solo episode or sparse description), the Actor still emits a single host-role row so the episode metadata is preserved in your dataset — useful for downstream joins. The `confidence` is 0.0 in this case.

### 💬 Your feedback

Spotted a bug, hit a weird edge case, or need a new field? Open an
issue on the Actor's **Issues** tab on Apify Console — we ship
fixes weekly and we read every report.

***

<div align="center">

Built by **[Devil Scrapes](https://apify.com/DevilScrapes)** 😈 — a small fleet of
opinionated public-data Actors. Honest pricing, real engineering, zero fine print.

</div>

# Actor input Schema

## `show_ids` (type: `array`):

List of 22-character Spotify show IDs (the bit after `/show/` in any open.spotify.com URL). Provide this OR `showSearchQuery`.

## `showSearchQuery` (type: `string`):

Free-text query passed to /v1/search. The top-matching show is used. Ignored when `showIds` is set.

## `maxEpisodesPerShow` (type: `integer`):

Newest episodes first. Hard cap 200.

## `clientId` (type: `string`):

From your Spotify Developer Dashboard application (https://developer.spotify.com/dashboard). Required.

## `clientSecret` (type: `string`):

From the same Spotify Developer application. Required. Stored as an Apify Secret — never logged.

## `market` (type: `string`):

Country code used for availability filtering on Spotify episode endpoints.

## `proxyConfiguration` (type: `object`):

Optional — Spotify Web API does not IP-block at normal volumes.

## Actor input object example

```json
{
  "show_ids": [
    "2MAi0BvDc6GTFvKFPXnkCL"
  ],
  "maxEpisodesPerShow": 20,
  "market": "US",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `datasetItems` (type: `string`):

All dataset items as JSON.

## `datasetItemsCsv` (type: `string`):

Same data exported to CSV.

## `datasetView` (type: `string`):

Open the run dataset in the Console.

# 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 = {
    "show_ids": [
        "2MAi0BvDc6GTFvKFPXnkCL"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("devilscrapes/spotify-podcast-guest-graph").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 = {
    "show_ids": ["2MAi0BvDc6GTFvKFPXnkCL"],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("devilscrapes/spotify-podcast-guest-graph").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 '{
  "show_ids": [
    "2MAi0BvDc6GTFvKFPXnkCL"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call devilscrapes/spotify-podcast-guest-graph --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=devilscrapes/spotify-podcast-guest-graph",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Spotify Podcast Guest Extractor",
        "description": "Extract a structured guest-history log from Spotify podcast episodes — episode metadata plus NLP-detected guest names, roles, and confidence scores. Uses your own Spotify Developer credentials; metadata-only, no audio.",
        "version": "0.1",
        "x-build-id": "7B6PJg2osVta5kRPm"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/devilscrapes~spotify-podcast-guest-graph/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-devilscrapes-spotify-podcast-guest-graph",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/devilscrapes~spotify-podcast-guest-graph/runs": {
            "post": {
                "operationId": "runs-sync-devilscrapes-spotify-podcast-guest-graph",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/devilscrapes~spotify-podcast-guest-graph/run-sync": {
            "post": {
                "operationId": "run-sync-devilscrapes-spotify-podcast-guest-graph",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "clientId",
                    "clientSecret"
                ],
                "properties": {
                    "show_ids": {
                        "title": "Spotify show IDs",
                        "type": "array",
                        "description": "List of 22-character Spotify show IDs (the bit after `/show/` in any open.spotify.com URL). Provide this OR `showSearchQuery`.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "showSearchQuery": {
                        "title": "Show search query (alternative to IDs)",
                        "type": "string",
                        "description": "Free-text query passed to /v1/search. The top-matching show is used. Ignored when `showIds` is set."
                    },
                    "maxEpisodesPerShow": {
                        "title": "Max episodes per show",
                        "minimum": 1,
                        "maximum": 200,
                        "type": "integer",
                        "description": "Newest episodes first. Hard cap 200.",
                        "default": 20
                    },
                    "clientId": {
                        "title": "Spotify client_id",
                        "type": "string",
                        "description": "From your Spotify Developer Dashboard application (https://developer.spotify.com/dashboard). Required."
                    },
                    "clientSecret": {
                        "title": "Spotify client_secret",
                        "type": "string",
                        "description": "From the same Spotify Developer application. Required. Stored as an Apify Secret — never logged."
                    },
                    "market": {
                        "title": "Market (ISO 3166-1 alpha-2)",
                        "type": "string",
                        "description": "Country code used for availability filtering on Spotify episode endpoints.",
                        "default": "US"
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Optional — Spotify Web API does not IP-block at normal volumes.",
                        "default": {
                            "useApifyProxy": false
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
