GraphQL API: Podcast
Get a podcast and/or its episodes
Podcast programs and podcast episodes are popular types in the Pandora library. It also has a rich set of metadata available. This query can be used to query a specific podcast by providing an id.
The two important sections are episodes and episode groups.
- Episodes will give you a full list of all the episodes of the podcast program. You can limit the results of this list, paginate and sort as needed.
- Episode groups are dynamic by default, and may be grouped by season, year, etc (depending on a given podcast). Some other features available are
- You can filter the results if a podcast has more that one group type (e.g., year and season), or if you only want a set of groups,
- Sort by release date in ascending or descending order,
- Limit the number of episodes returned in a group.
Request
{
podcast(id: "PC:196") {
totalEpisodeCount
publisherName
episodes(pagination: { limit: 3, sortBy: RELEASE_DATE, sortOrder: DESC }) {
totalCount
items {
... on PodcastEpisode {
duration
releaseDate
name
}
}
}
episodeGroups {
name
}
}
}
* Add your OAuth bearer token to the Authorization
header
curl 'https://ce.pandora.com/api/v1/graphql/graphql' \
-H 'Authorization: Bearer ' \
-H 'Content-Type: application/json' \
-d '{"operationName":null,"variables":{},"query":"{ podcast(id: \"PC:196\") { totalEpisodeCount publisherName episodes(pagination: {limit: 3, sortBy: RELEASE_DATE, sortOrder: DESC}) { totalCount items { ... on PodcastEpisode { duration releaseDate name } } } episodeGroups { name } } } "}'
Response
{
"data": {
"podcast": {
"totalEpisodeCount": 298,
"publisherName": "NPR",
"episodes": {
"totalCount": 298,
"items": [
{
"duration": 3177,
"releaseDate": "2019-11-22T16:07:00.000Z",
"name": "Robert Earl Keen: Texas Troubadour"
},
{
"duration": 3192,
"releaseDate": "2019-11-15T13:57:00.000Z",
"name": "Josh Gondelman And Catherine Cohen: Brooklyn Famous"
},
{
"duration": 3168,
"releaseDate": "2019-11-08T16:00:00.000Z",
"name": "Alejandro Escovedo: Punk Rock Roots In Texas"
}
]
},
"episodeGroups": [
{
"name": "2019"
},
{
"name": "2018"
},
{
"name": "2017"
},
{
"name": "2016"
},
{
"name": "2015"
},
{
"name": "2014"
}
]
}
}
}