Reference

API Reference

Pokédex API is based on a single layer, a HTTPS/REST consumption-only API that only allows the GET method to consume all the Pokémon information you’ll ever need.

Base URL

The base URL for all API requests is:

https://ex.traction.one/pokedex

Authentication

No authentication is required to access this API. All the resources are and available to everyone. However, we will implement authentication methods in the future that will give authenticated users higher rate limits or no rate limits at all (more on rate limits later).

User Agent

Applications and websites using the API must provide a valid User Agent which specifies information about the app and website, in the following format:

User-Agent: AppName ($url, $version)

Applications and websites may append more information and metadata to the end of this string as they wish.

Example User Agent Header

User-Agent: BastionDiscordBot (https://bastion.traction.one, v10.12)

Rate Limiting

This API implements a process for limiting and preventing excessive requests in accordance with RFC 6585.

This API rate limits requests in order to prevent abuse and overload of our services. Rate limits are applied on a global basis, spanning across the entire API.

Because we may change rate limits at any time and rate limits can be different per application, rate limits should not be hard coded into your application or website. In order to properly support our dynamic rate limits, your application or website should parse for our rate limits in response headers and locally prevent exceeding of the limits as they change.

Current rate limit is 50 API calls in 10 minutes. And we will increase the rate limits every time we upgrade our server for better performance.

We recommend that your application or website should locally cache the data that you receive to save the number of API calls consumed for the same resource.

Header Format

For every API request made, we return optional HTTP response headers containing the rate limit encountered during your request.

Retry-After: 1301000
RateLimit-Limit: 500
RateLimit-Remaining: 201
RateLimit-Reset: 905212800000

Retry-After - The number of milliseconds after which the rate limit will reset. It is returned only if you’ve been rate limited.

RateLimit-Limit - The number of requests that can be made

RateLimit-Remaining - The number of remaining requests that can be made

RateLimit-Reset - Epoch time (seconds since 00:00:00 UTC on January 1, 1970) at which the rate limit resets. It is returned only if you’ve been rate limited.

Exceeding A Rate Limit

In the case that a rate limit is exceeded, the API will return a HTTP 429 response code with a JSON body.

Note that the normal rate-limiting headers will be sent in this response.

API users that regularly hit and ignore rate limits will be banned (by their IP address) from using the API again.

Example Rate Limit Response

The rate-limiting response will look something like the following:

< HTTP/1.1 429 TOO MANY REQUESTS
< Content-Type: application/json
< Retry-After: 14400000
< RateLimit-Limit: 500
< RateLimit-Remaining: 0
< RateLimit-Reset: 905212800000
{
  "error": 429,
  "message": "Too many requests, please try again later."
}

Last updated

@iamtraction