Skip to main content

Rate limits

The Product Hunt API enforces rate limits to ensure fair use and platform stability. Rate limit information is included in the response headers of every API request.

Understanding rate limits

Rate limits control how many API requests you can make in a given time period. The Product Hunt API uses a fair-use policy to prevent abuse while allowing legitimate applications to function normally.

Rate limit information is provided in the HTTP response headers of every API request. You can check these headers to understand your current usage and remaining quota.

Response headers

Every API response includes rate limit headers that show your current usage:

HeaderDescription
RateLimit-LimitThe maximum number of requests allowed in the current time window
RateLimit-RemainingThe number of requests remaining in the current time window
RateLimit-ResetThe Unix timestamp when the rate limit window resets

Example response headers:

RateLimit-Limit: 1000
RateLimit-Remaining: 999
RateLimit-Reset: 1234567890

Handling rate limits

When you reach your rate limit, the API returns a 429 Too Many Requests response. At this point, you should stop making requests and wait until the rate limit window resets.

To handle rate limits gracefully in your application:

  1. Check the headers - Before making requests, check the RateLimit-Remaining header to see if you have quota available.
  2. Implement backoff - If you receive a 429 response, wait until the RateLimit-Reset time before retrying.
  3. Batch requests - Combine multiple queries into a single GraphQL request to reduce the number of API calls.
# Example: Checking rate limit headers with curl
curl -i https://api.producthunt.com/v2/api/graphql \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{"query": "{ viewer { id } }"}'

# Response includes:
# RateLimit-Limit: 1000
# RateLimit-Remaining: 999
# RateLimit-Reset: 1234567890

Best practices

Batch your queries - Use GraphQL's ability to request multiple resources in a single query. This reduces the number of API calls and helps you stay within rate limits.

Cache results - Cache API responses locally to avoid making redundant requests for the same data.

Implement exponential backoff - If you receive a rate limit error, wait before retrying. Start with a short wait time and increase it exponentially with each retry.

Monitor your usage - Keep track of your API usage and adjust your application's behavior if you're approaching the rate limit.

tip

GraphQL allows you to request exactly the data you need in a single query. Use this to your advantage to minimize the number of API calls your application makes.

Increasing your rate limit

By default, the Product Hunt API applies fair-use rate limits to all applications. If your application requires faster access without rate limits, contact hello@producthunt.com with details about your use case.

warning

Attempting to circumvent rate limits through multiple accounts or other means may result in your application being blocked from the API.

See also

Docs by Docsio