Just getting started with the API? Let's take a look at how you can interact with it.
For all of our queries and mutations, you will be making a POST request to our
A great way to start exploring the API is using a tool such as Postman. If using Postman, be sure to set the body type to GraphQL.
Getting Your Access Token
Before you can make any queries, you will need to get your access token.
To get your token, you will use the
requestAccessToken mutation as shown below. The access tokens last 1 year so you should store this token so you do not need to request new tokens with each query.
Once you have your access token, you will use it as the Bearer Token when interacting with other parts of our API.
Making Your First Query
Now that you have your token, let's do a simple podcasts query to retrieve some recent podcasts. To do so, we will again submit a POST request to
https://api.podchaser.com/graphql. This time, we will use the podcasts query.
Many of our queries return a paginated list object that has the returned data inside the
data key. You can select any of our podcast attributes by selecting fields within the
data object. For now, let's select the title and description fields for some podcasts.
The query will look like this:
And, we will get a response like this (though shortened here for brevity):
Now that you have your token and a general idea how our queries work, you should review the documentation for some of our main queries in our API reference.
Once you created your queries, you will then want to start writing these in your language using a client-side library. You can find libraries over on the graphql.org language support page.