Scrape Product Hunt leaderboard and export top products as JSON. Use when the user wants to scrape Product Hunt, export product rankings, or get a list of top products from today, this week, or this month. Also trigger if the user wants trending products analysis, startup leaderboard data, or wants to compare products across time periods on Product Hunt.
Scrapes top products from the Product Hunt leaderboard via the official GraphQL API. No browser automation needed — makes direct HTTP calls to the GraphQL endpoint.
.env file in the project root: PH_API_TOKEN=your_token_herePH_API_TOKEN=your_token_here--token your_token_hereRun from the project directory (/Users/zhangfeng/.openclaw/skills/producthunt-scraper/app):
pnpm start today # Today's top 10 (default)
pnpm start week # This week's top 10
pnpm start month -n 25 # This month's top 25
pnpm start today -n 50 # Today's top 50
pnpm start week --token TOKEN # Override token via flag
| Argument | Description | Default |
|---|---|---|
period | Time period: today, week, or month | Config default |
-n, --top <number> | Number of products to scrape | Config default |
You must report to the user using the exact format in the example below.
## 🏆 Product Hunt — This Week (3 products)
**1.** [Influcio](https://www.producthunt.com/products/influcio-2) — *462 votes*
AI marketing Agent for result-driven influencer campaign
**2.** [Panorama](https://www.producthunt.com/products/panorama) — *288 votes*
AI that finds your team's workflows and hidden structures
**3.** [Tiny Aya](https://www.producthunt.com/products/cohere-2) — *192 votes*
Local, open-weight AI designed for real-world languages
JSON File: Saved to output/{today|week|month}.json (relative to project root). Contains raw data with full fields including thumbnails.
config.ts - Default settings (root)
src/
├── index.ts - CLI entry (commander)
├── scraper.ts - GraphQL API client (https, no browser)
├── output.ts - Console printing & JSON save
└── types.ts - TypeScript types
.env - API token (do not commit)
https requests to api.producthunt.com/v2/api/graphql