# 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, 0 monthly users, 33.3% 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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Product Hunt Scraper",
        "description": "Scrape Product Hunt posts by category and sort order. Get product names, taglines, upvotes, makers, topics, and comment counts via the GraphQL API.",
        "version": "0.0",
        "x-build-id": "6oafSCPo6diFAbbvf"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/ef12~product-hunt-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-ef12-product-hunt-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/ef12~product-hunt-scraper/runs": {
            "post": {
                "operationId": "runs-sync-ef12-product-hunt-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/ef12~product-hunt-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-ef12-product-hunt-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "sort_order": {
                        "title": "Sort Order",
                        "enum": [
                            "newest",
                            "top",
                            "featured"
                        ],
                        "type": "string",
                        "description": "How to sort the posts",
                        "default": "newest"
                    },
                    "category": {
                        "title": "Category (Topic Slug)",
                        "type": "string",
                        "description": "Filter by topic slug, e.g. artificial-intelligence, developer-tools, design, productivity. Leave empty for all.",
                        "default": ""
                    },
                    "days": {
                        "title": "Lookback Days",
                        "minimum": 1,
                        "maximum": 30,
                        "type": "integer",
                        "description": "How many days back to fetch (only applies to 'top' sort)",
                        "default": 7
                    },
                    "max_results": {
                        "title": "Max Results",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum number of posts to return",
                        "default": 25
                    },
                    "min_upvotes": {
                        "title": "Minimum Upvotes",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only return posts with at least this many upvotes (0 = no filter)",
                        "default": 0
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
