Spotify podcast
Beta GET /v1/spotify/podcast
GET /v1/spotify/podcast
A show's details (kind "podcast").
- Cost: 1 credit
- Status: Beta. Built and tested against recorded responses; the shape may still gain fields.
- Cache: Results are kept up to 30 days; send
max_age_daysto reuse them for free. - Timeout: A request still running after about 25 seconds answers
202with a job to poll (Batch and jobs).
Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
url | URL | one of | Spotify show URL. Accepted hosts: open.spotify.com, spotify.com, spotify.link. |
id | string | one of | Spotify show id. |
Send at least one of url, id. If you send several, the first listed is used and the rest are ignored.
Every request also accepts:
trim:truefor a smaller response withoutnullfields andextra.raw:trueto also get the platform's original object asraw.max_age_days: accept a cached result up to this many days old, for 0 credits (Caching).
Example request#
Set your key in the environment first (see Authentication).
curl
curl -G "https://api.socialscrape.io/v1/spotify/podcast" \
-H "x-api-key: $SOCIALSCRAPE_API_KEY" \
--data-urlencode "id=4rOoJ6Egrf8K2IrywzwOMk"Python
import os
import requests
params = {
"id": "4rOoJ6Egrf8K2IrywzwOMk",
}
res = requests.get(
"https://api.socialscrape.io/v1/spotify/podcast",
headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},
params=params,
)
body = res.json()
if body["ok"]:
print(body["data"])
else:
print(body["error"]["code"], body["error"]["message"])TypeScript
const url = new URL("https://api.socialscrape.io/v1/spotify/podcast");
url.search = new URLSearchParams({
"id": "4rOoJ6Egrf8K2IrywzwOMk"
}).toString();
const res = await fetch(url, {
headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },
});
const body = await res.json();
if (body.ok) {
console.log(body.data);
} else {
console.error(body.error.code, body.error.message);
}n8n
{
"nodes": [
{
"name": "SocialScrape Spotify podcast",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
0,
0
],
"parameters": {
"method": "GET",
"url": "https://api.socialscrape.io/v1/spotify/podcast",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "id",
"value": "4rOoJ6Egrf8K2IrywzwOMk"
}
]
},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "x-api-key",
"value": "={{ $env.SOCIALSCRAPE_API_KEY }}"
}
]
}
}
}
],
"connections": {}
}Example response#
This is a sample from a recorded response. Status 200.
{
"ok": true,
"credits_charged": 1,
"credits_remaining": 4999,
"cached": false,
"cached_at": null,
"request_id": "req_44130f2976d35f42a0ab9452",
"data": {
"object": "collection",
"platform": "spotify",
"id": "4rOoJ6Egrf8K2IrywzwOMk",
"url": "https://open.spotify.com/show/4rOoJ6Egrf8K2IrywzwOMk",
"kind": "podcast",
"title": "The Joe Rogan Experience",
"description": "The official podcast of comedian Joe Rogan.",
"owner": {
"id": null,
"handle": null,
"name": "Joe Rogan",
"url": null,
"avatar_url": null,
"verified": null
},
"item_count": 2772,
"cover_url": "https://i.scdn.co/image/ab6765630000ba8ae7c95712f4940a9bf439467e",
"updated_at": null,
"extra": {
"consumption_order": "EPISODIC",
"content_ratings": [
"EXPLICIT"
],
"explicit": true,
"html_description": "<p>The official podcast of comedian Joe Rogan.</p>",
"media_type": "MIXED",
"playable": true,
"rating_average": 4.651203877848647,
"rating_count": 955994,
"show_types": [
"SHOW_TYPE_EXCLUSIVE"
],
"topics": [
"Comedy"
],
"uri": "spotify:show:4rOoJ6Egrf8K2IrywzwOMk"
}
},
"cursor": null,
"has_more": null
}Response#
A Collection object in data.
See Data models for every field. The envelope around data is described in Responses.
Errors#
Failures are free: credits_charged is 0. Branch on error.code, never on the message.
| Code | HTTP | Retry | Meaning |
|---|---|---|---|
invalid_params | 400 | no | A parameter is missing, unknown or has the wrong type. |
unsupported_url | 400 | no | The URL is not one this endpoint accepts (wrong platform or form). |
not_found | 404 | no | The platform says this profile, post or item does not exist. |
Every request can also fail with the account and platform errors listed on the Errors page.
Example error:
{
"ok": false,
"error": {
"code": "not_found",
"message": "The platform says this profile, post or item does not exist.",
"retryable": false
},
"credits_charged": 0,
"request_id": "req_c685be94d4e0de75c51bda20"
}Related endpoints#
- Spotify artist (
GET /v1/spotify/artist) - Spotify album (
GET /v1/spotify/album) - Spotify track (
GET /v1/spotify/track) - Spotify playlist (
GET /v1/spotify/playlist) - Spotify podcast episodes (
GET /v1/spotify/podcast/episodes) - Spotify search (
GET /v1/spotify/search)