Information

Beta support for GraphQL is rolling out starting April 2021

A free rate-limited endpoint is available at beta.pokeapi.co/graphql/v1beta. This endpoint can be subject to changes in future. Only POST requests are allowed.

To ease learning and developing, a GraphiQL interface is hosted at beta.pokeapi.co/graphql/console. This console loads PokeAPI's GraphQL schema and offers a handy Explorer that can be used to create GraphQL queries. GraphQL queries are still HTTP queries so you can use your favorite tool/library to query the GraphQL endpoint. Follows an example using Curl.

# This curl retrieves all items and relative costs curl 'https://beta.pokeapi.co/graphql/v1beta' \ -H 'content-type: application/json' \ -H 'accept: */*' \ --compressed \ --data-binary @- << EOF { "query": "query getItems{pokemon_v2_item{name,cost}}", "variables": null, "operationName":"getItems" } EOF

A Node example and some GQL queries are available here.

Fair Use Policy

PokéAPI is free and open to use. It is also very popular. Because of this, we ask every developer to abide by our fair use policy. People not complying with the fair use policy will have their IP address permanently banned.

PokéAPI is primarily an educational tool, and we will not tolerate denial of service attacks preventing people from learning.

Rules:

  • Locally cache resources whenever you request them.
  • Be nice and friendly to your fellow PokéAPI developers.