# Producthunt — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Access Product Hunt's daily leaderboards, detailed product pages, and search functionality. Retrieve ranked product launches for any date or date range, including upvote counts, descriptions, maker information, tags, and external links.

**Category:** Developer Tools | **Website:** [producthunt.com/](https://producthunt.com/) | **Docs:** [parse.bot/marketplace/3e66647d-0e3c-418d-a749-0297619601a4/producthunt-com-api](https://parse.bot/marketplace/3e66647d-0e3c-418d-a749-0297619601a4/producthunt-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-producthunt-com-api-3e66647d/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_daily_leaderboard

Fetch all product launches from the daily leaderboard for a given date. Returns products ranked by community votes for that day. Each item includes rank, name, slug, tagline, topics, and upvote count. Only the top ~8 featured products are returned per day.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `day` | integer | No | Day (1-31). Omitting defaults to current UTC day. |
| `month` | integer | No | Month (1-12). Omitting defaults to current UTC month. |
| `year` | integer | No | Year (YYYY). Omitting defaults to current UTC year. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-producthunt-com-api-3e66647d/get_daily_leaderboard \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"day":"<integer>","month":"<integer>","year":"<integer>"}'
```

### get_leaderboard_date_range

Aggregate leaderboard entries over a date range. Fetches each day's leaderboard within the range and returns the top products by upvotes, deduplicated by slug. Each day's fetch is a separate page load, so keep ranges short (1-7 days recommended).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `end_date` | string | Yes | End date in ISO format YYYY-MM-DD. |
| `limit` | integer | No | Maximum number of items to return. |
| `start_date` | string | Yes | Start date in ISO format YYYY-MM-DD. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-producthunt-com-api-3e66647d/get_leaderboard_date_range \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"end_date":"<string>","limit":"<integer>","start_date":"<string>"}'
```

### get_product_details

Fetch full details for a product by its slug. Returns structured product information including description, makers, reviews, topics, media screenshots, and external links. A separate fetch per product; use search_products or get_daily_leaderboard to discover slugs.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `slug` | string | Yes | Product slug as it appears in Product Hunt URLs (e.g. 'claude', 'ollama', 'notion'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-producthunt-com-api-3e66647d/get_product_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"slug":"<string>"}'
```

### search_products

Search for products by keyword via Product Hunt's GraphQL search. Returns paginated results with 10 items per page. Each result includes id, name, slug, tagline, reviews rating and count.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination (1-based). |
| `query` | string | Yes | Search keyword. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-producthunt-com-api-3e66647d/search_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","query":"<string>"}'
```
