# Product Hunt Scraper (Official API) (`wbeaman86/product-hunt-api-scraper`) Actor

Product Hunt launches, rankings, votes and full comment threads via the official GraphQL API — no fragile HTML parsing. Bring your own free token and get a private rate-limit budget instead of queuing behind a shared one. Personal data pseudonymised by default.

- **URL**: https://apify.com/wbeaman86/product-hunt-api-scraper.md
- **Developed by:** [Will Morgan](https://apify.com/wbeaman86) (community)
- **Categories:** Social media, Lead generation, Developer tools
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.16 / 1,000 posts

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Product Hunt Scraper — Official API, Your Own Rate Limit

Pull Product Hunt launches and their comment threads as clean, structured JSON.

Unlike scrapers that hammer the public website, this Actor runs entirely on
**Product Hunt's official GraphQL API** using **a developer token you supply**.
That single design choice is why it finishes runs that other Product Hunt
scrapers fail.

### Why runs fail elsewhere — and not here

Product Hunt enforces a quota of **6,250 points per 15 minutes, applied per
application token**. Measured against the live API, every request costs a
**flat 100 points** regardless of size, and the posts page size is **capped at
20**. That works out at:

| | |
|---|---|
| Requests per 15 minutes | **62** |
| Posts per request | **20** (hard cap) |
| Ceiling | **~1,240 posts per 15 minutes** |

An Actor that ships one shared token makes every customer on the platform
compete for those 62 requests, so runs return HTTP 429 and die partway
through. Pulling 10,000 posts takes 500 requests — eight full windows — and on
a shared token you are fighting everyone else for every one of them.

You bring your own token, so you get your own private budget. On top of that
this Actor:

- reads `X-Rate-Limit-Remaining` and **slows down before** the budget runs out,
- honours `X-Rate-Limit-Reset` on a 429 instead of blind-retrying into the wall,
- retries network errors and 5xx with exponential backoff,
- fails fast and clearly on a bad token rather than burning your run,
- requests **only the fields you tick** — unused fields still cost you points.

### What you can do with it

- **Competitor and launch tracking** — watch every launch in a topic and alert on traction.
- **Market research** — what shipped in `artificial-intelligence` last quarter, ranked by votes.
- **Feedback mining** — pull comment threads to see what users actually praise or complain about.
- **Trend analysis** — daily/weekly/monthly/yearly ranks are included on every post.

### Try it without a token

Leave `phToken` empty and the Actor returns a handful of frozen example
records so you can see the shape of the output before signing up for anything.
No post or comment events are charged for a sample run. Every sample row
carries `"isSampleData": true`, and the run log says plainly that the data
is not live.

Sample mode exists so a first run succeeds rather than erroring. For real data
you need your own token, which takes about two minutes:

### Getting your token (free, two minutes)

1. Go to <https://www.producthunt.com/v2/oauth/applications>
2. Create an application (any name; the redirect URI can be `https://example.com`)
3. Open it and click **Create Token**
4. Paste it into the `phToken` field

The token doesn't expire and only needs the default `public` scope.

### Output

Posts and comments go to the same dataset. Every record carries an
**`itemType`** of either `post` or `comment`, so you can split them in one pass:

```python
posts    = [r for r in rows if r["itemType"] == "post"]
comments = [r for r in rows if r["itemType"] == "comment"]
```

Comments also carry `postId`, `postName` and `postSlug`, so they join straight
back onto their parent launch.

```json
{
  "itemType": "post",
  "id": "512345",
  "name": "Product 1",
  "tagline": "The thing that does the thing",
  "slug": "product-1",
  "url": "https://producthunt.com/posts/product-1",
  "website": "https://example.com",
  "votesCount": 420,
  "commentsCount": 37,
  "reviewsCount": 12,
  "reviewsRating": 4.8,
  "createdAt": "2026-09-01T00:00:00Z",
  "featuredAt": "2026-09-01T12:00:00Z",
  "dailyRank": 1, "weeklyRank": 3, "monthlyRank": 11, "yearlyRank": 240,
  "topics": ["artificial-intelligence", "developer-tools"],
  "user": { "idHash": "b42e42cf533c3108" }
}
```

```json
{
  "itemType": "comment",
  "postId": "512345",
  "postName": "Product 1",
  "postSlug": "product-1",
  "commentId": "900123",
  "body": "Been waiting for this.",
  "createdAt": "2026-09-01T09:14:00Z",
  "url": "https://producthunt.com/comments/900123",
  "votesCount": 6,
  "parentId": null,
  "isReply": false,
  "user": { "idHash": "7f1c0a9b2d4e6a83" }
}
```

### Privacy by default

Product Hunt exposes real people — hunters, makers and commenters. This Actor
**omits their personal data unless you explicitly ask for it**.

With `includeUserIdentity` off (the default), each person is reduced to a
stable `idHash`. You can still group and count by author, but the output holds
no names, usernames, profile images, Twitter handles or profile URLs.

**Commenters are anonymous regardless.** Product Hunt redacts comment authors
at source — it returns `id: "0"` and `[REDACTED]` for their name, username and
profile URL no matter what you request. Only an opaque numeric `userId` is
real, so this Actor uses that (and hashes it by default). Comment data is
therefore inherently low-risk; the identity switch only affects post hunters
and makers.

Turn it on only if you have a lawful basis for processing that personal data
under UK/EU GDPR. "It was publicly available" is not one on its own.

### Notes and limits

- **Product Hunt defaults to the last month.** If you don't set `postedAfter`,
  the API only returns roughly the previous month of posts. Set it explicitly
  to reach further back.
- **Individual reviews are not available.** Product Hunt's API exposes
  `reviewsCount` and `reviewsRating` aggregates on a post, but there is no
  Review object in its GraphQL schema. Comments are fully available.
- **Page size is capped at 20.** Ask for more and Product Hunt quietly returns
  20 anyway. The Actor clamps to 20 so your expectations match reality.
- **Comments are effectively free.** Because each request costs a flat 100
  points whatever it contains, fetching comments inline costs nothing extra in
  rate-limit terms. Turn them on when you need them.
- **URLs carry your application's UTM tags.** Product Hunt appends
  `utm_source=Application: <your app name>` to every `url` and `website` it
  returns. That is your own application name, since it is your token.

### Pricing events

| Event | Fires |
|---|---|
| `post-scraped` | once per post written to the dataset |
| `comment-scraped` | once per comment written to the dataset |

### Local development

```bash
python3 -m venv .venv && .venv/bin/pip install -r requirements.txt
.venv/bin/python tests_local.py     # GraphQL validity + privacy guarantees
.venv/bin/python tests_client.py    # rate limiting, auth, retries (HTTP mocked)
.venv/bin/python tests_e2e.py && .venv/bin/python tests_e2e_assert.py
```

### Legal and acceptable use

**Not affiliated with Product Hunt.** This Actor is an independent client for
Product Hunt's public GraphQL API. It is not endorsed by, sponsored by or
connected to Product Hunt in any way. "Product Hunt" is the trademark of its
owner and is used here only to describe what the Actor connects to.

**You run it on your own credentials.** The Actor uses the developer token you
supply, under your own agreement with Product Hunt. Their API terms of service
govern your use, including what you may store and republish. Read them.

**Personal data.** Product Hunt data describes real people — hunters, makers
and commenters. This Actor pseudonymises personal fields by default. If you
switch `includeUserIdentity` on, you become responsible for having a lawful
basis to process that data. Under UK and EU GDPR, "it was publicly available"
is not one. Scraping at scale for marketing lists is the use most likely to
get you in trouble.

**No warranty.** Product Hunt can change or withdraw its API at any time. The
Actor is provided as-is. Issues are fixed promptly on a best-effort basis, but
no uptime or continuity is guaranteed.

# Actor input Schema

## `phToken` (type: `string`):

Your own Product Hunt API developer token. Create one free at https://www.producthunt.com/v2/oauth/applications - create an application, open it, and click Create Token. The token does not expire and only needs the default public scope. Using your own token means you get Product Hunt's full rate-limit budget to yourself instead of sharing one with every other user of this Actor. LEAVE THIS EMPTY to get a few frozen sample records instead, free of charge, so you can see the output shape before signing up.

## `order` (type: `string`):

How to order the posts returned by Product Hunt.

## `postedAfter` (type: `string`):

ISO date, e.g. 2026-01-01. NOTE: Product Hunt defaults this to one month ago. Set it explicitly to reach older posts.

## `postedBefore` (type: `string`):

ISO date, e.g. 2026-06-30.

## `topic` (type: `string`):

Only posts carrying this topic slug, e.g. 'artificial-intelligence' or 'developer-tools'.

## `featuredOnly` (type: `boolean`):

Restrict to posts Product Hunt has featured.

## `maxPosts` (type: `integer`):

Stop after this many posts. Set 0 for no limit (bounded by your rate-limit budget).

## `postsPerPage` (type: `integer`):

Page size. Product Hunt caps this at 20 — higher values are silently reduced. Each request costs a flat 100 rate-limit points regardless of size, so 20 is almost always right.

## `includeComments` (type: `boolean`):

Fetch comments alongside each post. Costs nothing extra in rate-limit terms — Product Hunt charges a flat 100 points per request regardless of size.

## `maxCommentsPerPost` (type: `integer`):

How many comments to fetch per post. Only used when comments are included.

## `includeMakers` (type: `boolean`):

Include the makers credited on each post. With personal data off (the default) they appear as pseudonymous hashes.

## `includeTopics` (type: `boolean`):

Include the topic slugs attached to each post, e.g. 'artificial-intelligence'.

## `includeMedia` (type: `boolean`):

Include the post's media items (images and video thumbnails). Off by default as most users don't need them.

## `includeUserIdentity` (type: `boolean`):

OFF by default. When off, people (hunters, makers, commenters) are returned as a stable pseudonymous hash with no name, username, profile image, Twitter handle or profile URL. Turn this on only if you have a lawful basis under UK/EU GDPR for processing their personal data.

## Actor input object example

```json
{
  "order": "RANKING",
  "postedAfter": "2026-01-01",
  "postedBefore": "2026-12-31",
  "topic": "artificial-intelligence",
  "featuredOnly": false,
  "maxPosts": 100,
  "postsPerPage": 20,
  "includeComments": true,
  "maxCommentsPerPost": 20,
  "includeMakers": true,
  "includeTopics": true,
  "includeMedia": false,
  "includeUserIdentity": false
}
```

# Actor output Schema

## `all` (type: `string`):

Every row, posts and comments together.

## `posts` (type: `string`):

Launches only, as the Posts table view.

## `comments` (type: `string`):

Comments only, as the Comments table view.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "maxPosts": 100,
    "includeComments": true,
    "maxCommentsPerPost": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("wbeaman86/product-hunt-api-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "maxPosts": 100,
    "includeComments": True,
    "maxCommentsPerPost": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("wbeaman86/product-hunt-api-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "maxPosts": 100,
  "includeComments": true,
  "maxCommentsPerPost": 20
}' |
apify call wbeaman86/product-hunt-api-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,wbeaman86/product-hunt-api-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/CkKy9bbUfpOW8xpNt/builds/ndCcdeNC0fpRG0FS4/openapi.json
