# Product Hunt Scraper (`ef12/product-hunt-scraper`) Actor

Scrape Product Hunt posts by category and sort order. Get product names, taglines, upvotes, makers, topics, and comment counts via the GraphQL API.

- **URL**: https://apify.com/ef12/product-hunt-scraper.md
- **Developed by:** [Daniel Wilson](https://apify.com/ef12) (community)
- **Categories:** Developer tools
- **Stats:** 1 total users, 1 monthly users, 88.9% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Product Hunt Scraper

**Product Hunt Scraper** lets you pull fresh product launches, trending tools, and top-voted posts from [Product Hunt](https://www.producthunt.com/) using the official GraphQL API — no browser emulation, no HTML parsing, no CAPTCHAs. You get clean JSON with every field that matters: name, tagline, upvotes, maker, topics, comments, and dates.

Built as an [Apify Actor](https://apify.com/actors), it runs on a serverless platform with built-in scheduling, proxy-free API access, data export to JSON/CSV/Excel, and integration with Zapier, Make, and REST webhooks. One API call, structured data back.

### Why use Product Hunt Scraper?

- **Market research** — Track which products in your category are gaining traction. See what taglines and positioning resonate.
- **Competitor monitoring** — Watch your competitors' launches: when they ship, how many upvotes they get, what topics they target.
- **Investor sourcing** — Identify early-stage products with strong community traction. Upvote velocity and comment activity are leading indicators.
- **Content inspiration** — Product Hunt is a firehose of startup ideas, feature announcements, and product positioning examples.
- **Data pipeline feed** — Pull daily batches into a warehouse for trend analysis, dashboards, or ML models trained on product-market fit signals.
- **Tool discovery** — Filter by category like `developer-tools` or `artificial-intelligence` to find new tools worth trying.

### How to use Product Hunt Scraper

#### 1. Get a Product Hunt API token

1. Go to [Product Hunt Developer Settings](https://www.producthunt.com/v2/oauth/applications).
2. Create a new OAuth application (it's free).
3. Generate a **Personal Access Token**.
4. Copy the token — you'll need it to authenticate API calls.

#### 2. Set the token as a secret

Run this locally:

```bash
apify secrets add PRODUCTHUNT_TOKEN your_token_here
```

When you push to the Apify Cloud, the secret travels with your Actor automatically.

#### 3. Configure your run

Open the **Input** tab and set:

| Field | Description | Default |
| ------- | ------------- | --------- |
| Sort Order | How posts are sorted: `newest`, `top`, or `featured` | `newest` |
| Category | Topic slug filter (e.g. `developer-tools`) — leave empty for all | — |
| Lookback Days | How many days to scan (top sort) | 7 |
| Max Results | Total posts to return (max 100) | 25 |
| Min Upvotes | Filter out posts below this threshold | 0 |

#### 4. Run it

```bash
apify run --input-file=test-input.json
```

Or in the Apify Console, click **Run** after filling in the input form.

### Output

Each run pushes structured JSON to the Actor's default dataset. You can download the dataset in JSON, HTML, CSV, or Excel.

```json
[
  {
    "name": "Example Product",
    "tagline": "AI-powered tool for developers",
    "url": "https://www.producthunt.com/posts/example-product",
    "website_url": "https://example.com",
    "upvotes": 342,
    "maker": "Jane Developer",
    "topics": ["Developer Tools", "AI"],
    "created_at": "2025-06-15T12:00:00Z",
    "comment_count": 28
  }
]
```

#### Data table

| Field | Type | Description |
| ------- | ------ | ------------- |
| `name` | string | Product name |
| `tagline` | string | One-line description |
| `url` | string | Product Hunt post URL |
| `website_url` | string | Product's own website |
| `upvotes` | integer | Total upvotes |
| `maker` | string | Creator / submitter name |
| `topics` | array of strings | Tags / categories |
| `created_at` | string (ISO 8601) | Post date |
| `comment_count` | integer | Number of comments |

### How much does it cost to scrape Product Hunt?

This Actor uses pay-per-event (PPE) billing:

| Event | Price |
|-------|-------|
| `apify-actor-start` | $0.00005 |
| `result` (per result, after 10 free) | $0.003 |

The first **10 results per run are free**. After that, each result costs $0.003. A run of 50 results costs about $0.00005 + (40 × $0.003) = **$0.12**. A run of 100 results costs about $0.00005 + (90 × $0.003) = **$0.27**.

There are no hidden infrastructure costs — the Apify free tier includes 10 free platform usage hours per month.

### Tips & advanced options

- **Category slugs**: Common topics include `artificial-intelligence`, `developer-tools`, `design`, `productivity`, `marketing`, `saas`, `open-source`, `api`, `data-analytics`, `security`, `mobile`, `chrome-extensions`. Browse [Product Hunt topics](https://www.producthunt.com/topics) to find the exact slug.
- **Limiting compute units**: Set `max_results` as low as your use case allows. Filtering with `min_upvotes` also reduces wasted results.
- **Scheduling**: In the Apify Console, set a daily or weekly schedule to keep a rolling dataset of recent launches.
- **No proxy needed**: This Actor calls the official API — no IP rotation or residential proxies required.
- **Accuracy**: API returns un-filtered data. Post-scrape filtering with `min_upvotes` happens on results the API already returned, so requesting slightly more than your target can help if your upvote threshold is high.

### FAQ, disclaimers, and support

**Is scraping Product Hunt legal?**\
This Actor uses Product Hunt's official GraphQL API with proper authentication. You are accessing the same data the API is designed to serve. Always review Product Hunt's [Terms of Service](https://www.producthunt.com/terms) before use.

**What if my token doesn't work?**\
Make sure the token is set as the `PRODUCTHUNT_TOKEN` environment variable / Apify secret. The Actor expects the token in the `Authorization: Bearer <token>` header.

**Known limitations**

- The Product Hunt API may rate-limit high-frequency requests. The Actor respects this by fetching in moderate page sizes.
- Topic slug availability depends on Product Hunt's taxonomy — unknown slugs return empty results rather than an error.

**Need help?**\
Open an issue in this repository for bug reports or feature requests. For custom scraping solutions or enterprise needs, reach out via the Apify platform.

### Technical details

This Actor calls `https://api.producthunt.com/v2/api/graphql` with an `Authorization: Bearer` header. It uses `httpx` for async HTTP and the Apify Python SDK for dataset storage and PPE metering. No browser, no crawling — just GraphQL queries and structured JSON output.

# Actor input Schema

## `sort_order` (type: `string`):

How to sort the posts

## `category` (type: `string`):

Filter by topic slug, e.g. artificial-intelligence, developer-tools, design, productivity. Leave empty for all.

## `days` (type: `integer`):

How many days back to fetch (only applies to 'top' sort)

## `max_results` (type: `integer`):

Maximum number of posts to return

## `min_upvotes` (type: `integer`):

Only return posts with at least this many upvotes (0 = no filter)

## Actor input object example

```json
{
  "sort_order": "newest",
  "category": "",
  "days": 7,
  "max_results": 25,
  "min_upvotes": 0
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("ef12/product-hunt-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 = {}

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

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

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

```

## CLI example

```bash
echo '{}' |
apify call ef12/product-hunt-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=ef12/product-hunt-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/HPx77z32Nuga6juUk/builds/6oafSCPo6diFAbbvf/openapi.json
