Each query executed on the Podchaser GraphQL API has an associated cost based on the complexity of the query and the amount of data that might be returned. The cost of a query is measured in points.
You have a set number of points per month; once exceeded you will need to either upgrade your API tier or wait until the 1st of the month for your points to reset.
Headers are included in the response from all queries to the API to allow you to track your points usage:
X-Podchaser-Points-Remaining: The number of points you have remaining (after the execution of this query, if successful)
X-Podchaser-Query-Cost: The number of points this query used or would have used
If you query the
/graphql endpoint with a query that would exceed the number of points you have remaining you will receive an HTTP 400 error and the query will not be executed. The response will still contain the Cost Headers described above.
Before executing a query you can
POST the same payload to
https://api.podchaser.com/graphql/cost to determine how many points the query will use. The cost will be returned in a JSON payload as well as the standard cost headers described above.