Anchor Connector for Podcast Data
Project description
Anchor Connector
This is a simple library for connecting to the unofficial Spotify for Creators (formerly Anchor) API. It can be used to export analytics data from your podcast dashboard at https://podcasters.spotify.com.
API Notes
The API is undocumented, unofficial, and subject to change at any time. This library reverse-engineers the requests made by the Spotify for Creators web dashboard.
Base URL
As of early 2026, the active base URL is:
https://podcasters.spotify.com/pod/api/proxy/v3
Previous base URLs that are now defunct:
| URL | Status |
|---|---|
https://api-v5.anchor.fm/v3 |
❌ Dead (returns 401 for all requests) |
https://creators.spotify.com/pod/api/proxy/v3 |
✅ Still works as an alias |
Station and Episode IDs
The API previously used string-prefixed identifiers in URL path segments:
webStationId:<hex-id>for station-level endpointswebEpisodeId:<alphanumeric-id>for episode-level endpoints
These are now replaced by plain numeric IDs throughout all analytics
endpoints. The webStationId you have from your credentials is still useful
as a bootstrap — the episodePage endpoint still accepts it and returns the
numeric stationId in its response. This library handles the conversion
automatically: you only need to supply your webStationId and the numeric ID
is resolved and cached on the first API call.
Episode responses now also include spotifyEpisodeUri (e.g.
spotify:episode:4pvCXSIxpZLPaLlJ4KWiBa) and spotifyShowUri fields, but
the analytics endpoints use the plain numeric episodeId.
GraphQL
The library previously used a GraphQL endpoint
(https://creators-graph.spotify.com/v2/graph-pq) to fetch the full episode
list. This endpoint is no longer available (returns 401). The same data is
now fetched via the REST episodePage endpoint, which is paginated and returns
all fields needed (including episodeId, spotifyEpisodeUri, title, etc.).
The base_graphql_url parameter and ANCHOR_BASE_GRAPHQL_URL environment
variable have been removed from the connector accordingly.
Supported Endpoints
Station-level
podcast_episode— full episode list (wrapsepisodes)episodes— paginated episode iteratortotal_playstotal_plays_by_episodeunique_listenersaudience_sizeplaysplays_by_age_rangeplays_by_appplays_by_deviceplays_by_episodeplays_by_genderplays_by_geoplays_by_geo_cityimpressions
Episode-level
All episode-level endpoints take a numeric episodeId (available as
episode["episodeId"] from episodes()).
episode_playsepisode_performanceepisode_aggregated_performanceepisode_metadata(overview endpoint)
See __main__.py for a full working example of every endpoint.
Credentials
Before you can use the library, you must extract your Anchor/Spotify for Creators credentials from the dashboard; they are not exposed through your account settings.
You can use our web-extension to capture them automatically, or take a look at the code to see how to do it manually.
| Credential | Where to find it |
|---|---|
ANCHOR_BASE_URL |
Use https://podcasters.spotify.com/pod/api/proxy/v3 |
ANCHOR_WEBSTATION_ID |
The short hex ID in your podcast URL, e.g. fb37d7a4 |
ANCHOR_PW_S |
Value of the anchorpw_s cookie on podcasters.spotify.com |
The anchorpw_s cookie expires periodically — if you start getting 401
errors, you need to grab a fresh value from your browser's DevTools
(Application → Cookies → podcasters.spotify.com).
Installation
pip install anchorconnector
Usage
from anchorconnector import AnchorConnector
from datetime import datetime, timedelta
connector = AnchorConnector(
base_url="https://podcasters.spotify.com/pod/api/proxy/v3",
webstation_id=WEBSTATION_ID,
anchorpw_s=ANCHOR_PW_S,
)
end = datetime.now()
start = end - timedelta(days=30)
# Station-level analytics
total_plays = connector.total_plays()
plays_by_geo = connector.plays_by_geo()
plays = connector.plays(start, end)
plays_by_age_range = connector.plays_by_age_range(start, end)
plays_by_app = connector.plays_by_app(start, end)
plays_by_device = connector.plays_by_device(start, end)
plays_by_episode = connector.plays_by_episode(start, end)
plays_by_gender = connector.plays_by_gender(start, end)
# Iterate over all episodes and fetch per-episode analytics
for episode in connector.episodes():
episode_id = episode["episodeId"] # numeric ID, required by analytics endpoints
print(episode["title"])
print(episode["spotifyEpisodeUri"]) # e.g. "spotify:episode:4pvCX..."
plays = connector.episode_plays(episode_id, start, end)
performance = connector.episode_performance(episode_id)
aggregated = connector.episode_aggregated_performance(episode_id)
metadata = connector.episode_metadata(episode_id)
Development
We use Pipenv for virtualenv and dev dependency management. With Pipenv installed:
- Install your locally checked out code in development mode, including its dependencies, and all dev dependencies into a virtual environment:
pipenv sync --dev
- Create an environment file and fill in the required values:
cp .env.sample .env
- Run the script in the virtual environment, which will automatically load
your
.env:
pipenv run anchorconnector
To add a new dependency for use during the development of this library:
pipenv install --dev $package
To add a new dependency necessary for the correct operation of this library, add
the package to the install_requires section of ./setup.py, then:
pipenv install
To publish the package:
make publish
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file anchorconnector-0.6.3.tar.gz.
File metadata
- Download URL: anchorconnector-0.6.3.tar.gz
- Upload date:
- Size: 13.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0744a5c433ddf8b826ebe06d84dab567a9749ac5e5d611c2ef7db302097a8cd0
|
|
| MD5 |
414225856afa71c332a871a12388305e
|
|
| BLAKE2b-256 |
a21fde4943eb9ab17fedc44a4fc59e7275b2faa9aa8d964c782b7d169043a22a
|
File details
Details for the file anchorconnector-0.6.3-py3-none-any.whl.
File metadata
- Download URL: anchorconnector-0.6.3-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3bfab9c966f117148fceeba92b0d2798ef41eec315d57c5d85da708880f299a6
|
|
| MD5 |
65f4af1ec5e24a356f1097ee955cefc1
|
|
| BLAKE2b-256 |
815986cc41ff64d1b1b283607f243466c05c899d9cf679c0558d2f80989e8c23
|