Skip to main content

API overview

The Product Hunt API provides programmatic access to Product Hunt data via a GraphQL interface, allowing you to build integrations and tools that interact with the platform.

What is the Product Hunt API

The Product Hunt API 2.0 is a GraphQL-based interface that provides access to public information on Product Hunt. The goal of the API is to enable developers to build integrations, tools, and applications that leverage Product Hunt data.

The API is reachable at https://api.producthunt.com/v2/api/graphql. All requests require an access token for authentication.

note

The Product Hunt API must not be used for commercial purposes. If you would like to use it for your business, please contact hello@producthunt.com.

Getting started

To use the Product Hunt API, you need to obtain an access token. There are two ways to authenticate:

OAuth 2.0 user authentication - Get a token on behalf of a user. This allows your application to access user-specific data and perform actions on behalf of the user.

OAuth 2.0 client-only authentication - Get a token without user context. This is useful for server-to-server integrations and accessing public data before a user logs in.

For quick scripts and testing, you can use a developer token linked to your account. Visit the API dashboard to generate a developer token.

Authentication methods

User authentication

To get a token on behalf of a user:

  1. Redirect the user to the OAuth authorize endpoint to request an access grant.
  2. The user grants permission, and you receive an authorization code.
  3. Exchange the authorization code for an access token.
  4. Add the access token to the Authorization header of your API requests.
Authorization: Bearer YOUR_ACCESS_TOKEN

Client-only authentication

To get a token without user context:

  1. Request a client-level token using your application credentials.
  2. Use the token for read-only API access to public endpoints.
  3. Add the token to the Authorization header of your API requests.

Note that client-only tokens limit you to public endpoints that don't require user context. You cannot access user-specific data with a client-only token.

Developer token

For quick scripts and testing, generate a developer token in the API dashboard. Developer tokens are linked to your account, don't expire, and can be used immediately without going through the OAuth flow.

# Example: Using a developer token with curl
curl -H "Authorization: Bearer YOUR_DEVELOPER_TOKEN" \
https://api.producthunt.com/v2/api/graphql \
-d '{"query": "{ viewer { id name } }"}'

API scopes

Applications can request three types of scopes:

ScopeDescription
publicAccess public information on Product Hunt. This is the default scope.
privateAccess Product Hunt on behalf of the authenticated user, such as reading user goals and preferences.
writeTake actions on Product Hunt on behalf of the user, such as marking goals as complete or creating posts.

By default, all apps are read-only and have the public scope. To request private or write access, contact hello@producthunt.com with details about your use case.

warning

Write access is only available for specific use cases and requires approval from the Product Hunt team. Contact hello@producthunt.com to request write access.

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. See Rate limits for details.

If you require faster access without rate limits, contact hello@producthunt.com.

GraphQL

The API uses GraphQL, a query language that allows you to request exactly the data you need. If you're not familiar with GraphQL, here are some resources to get started:

The Product Hunt API provides an interactive API explorer where you can test queries and explore the schema:

Attribution

If you build an application using the Product Hunt API, we kindly ask that you include attribution in your project, linking back to Product Hunt. We'd also appreciate those that include a Product Hunt logo.

You can download the Product Hunt brand assets here.

Getting help

If you have questions, feedback, ideas, or problems with the API, don't hesitate to reach out. You can:

See also

Docs by Docsio