Rate Limits

Headers

Rate limiting is applied per application. There are two types of rate limits for API V2 based on the endpoint being accessed.

1. Complexity based(applicable to '/v2/api/graphql' endpoint): The application has quota of 6250 complexity points for every 15 minutes. Complexity of each request is calculated based on the fields requested.

2. Request based(applicable to all other '/v2/*' endpoints): The application can make up to 450 requests every 15 minutes.

Once the rate limit is reached, the API will return status 429 (Too Many Requests) until the rate limiting period is reset.

Each API response includes 3 rate limit headers. You can use these headers to check your current rate limit status.

  • X-Rate-Limit-Limit: Your applications limit for the 15 minute period
  • X-Rate-Limit-Remaining: Remaining quota for the reset period
  • X-Rate-Limit-Reset: Seconds until the rate limit is reset
See the example request and response below for an example of the returned headers.

We may on occasion adjust the rate limit depending on API traffic. If your application requires a higher rate limit. Please contact us.

Request

Route

POST /v2/api/graphql

Headers

Accept: application/json
Content-Type: application/json
Authorization: Bearer your_access_token
Host: api.producthunt.com

Body

{
  "query": "query { posts(first: 1) { edges { node { id, name } } } }"
}

Response

Status

200 OK

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Rate-Limit-Limit: 6250
X-Rate-Limit-Remaining: 6010
X-Rate-Limit-Reset: 850
Content-Type: application/json; charset=utf-8
Cache-Control: max-age=0, private, must-revalidate
Content-Length: 12

Body

{
  "data": {
    "posts": {
      "edges": [
        {
          "node": {
            "id": 139993,
            "name": "Parla X"
          }
        }
      ]
    }
  }
}

Request

Route

GET /v2/oauth/token

Headers

Accept: application/json
Content-Type: application/json
Authorization: Bearer your_access_token
Host: api.producthunt.com

Response

Status

200 OK

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Rate-Limit-Limit: 900
X-Rate-Limit-Remaining: 899
X-Rate-Limit-Reset: 850
Content-Type: application/json; charset=utf-8
Cache-Control: max-age=0, private, must-revalidate
Content-Length: 12

Body

{
  "posts": []
}