producthunt.leaderboard
Get the ranked launches of a day, week, month or year, each with its rank, tagline, launch date and product.
At a glance
- Endpoint ID
producthunt.leaderboard- Price
- 1 credit per call; failed calls are free
- Runs for up to
- 30 seconds
Request
Send the endpoint ID as capability and its fields as input. Set UPSCRAPE_API_KEY to your key first.
curl --request POST \ --url https://data.upscrape.com/execute \ --header "Authorization: Bearer $UPSCRAPE_API_KEY" \ --header "Content-Type: application/json" \ --header "Prefer: wait=30" \ --data '{ "capability": "producthunt.leaderboard", "input": { "date": "2024-03", "period": "monthly" }}'
import jsonimport osimport requestspayload = json.loads(r'''{ "capability": "producthunt.leaderboard", "input": { "date": "2024-03", "period": "monthly" }}''')response = requests.post( "https://data.upscrape.com/execute", headers={ "Authorization": f"Bearer {os.environ['UPSCRAPE_API_KEY']}", "Content-Type": "application/json", "Prefer": "wait=30", }, json=payload,)response.raise_for_status()print(json.dumps(response.json(), indent=2))
const response = await fetch("https://data.upscrape.com/execute", { method: "POST", headers: { "Authorization": `Bearer ${process.env.UPSCRAPE_API_KEY}`, "Content-Type": "application/json", "Prefer": "wait=30", }, body: JSON.stringify({ "capability": "producthunt.leaderboard", "input": { "date": "2024-03", "period": "monthly" }}),});if (!response.ok) { throw new Error(`Upscrape request failed: ${response.status}`);}console.log(JSON.stringify(await response.json(), null, 2));
Input
| Field | Type | Required | What it does | Example |
|---|---|---|---|---|
period |
string | yes | daily, weekly, monthly or yearly. | monthly |
date |
string | no | Which day, week, month or year: 2024-03-12, 2024-11 (ISO week), 2024-03 or 2024. Leave it out for yesterday or the current week, month or year. | 2024-03 |
Response
A finished call answers with HTTP 200; the data is in results[0].data, and billing.credits_charged is what it cost. A call still running after the wait answers 202: see jobs and results.
This is results[0].data from a real run:
{ "title": "Best of Product Hunt: March 2024", "url": "https://www.producthunt.com/leaderboard/monthly/2024/3", "launches": [ { "name": "Dub.co", "id": "444791", "rank": 1, "scheduled_at": "2024-03-21T00:01:00-07:00", "slug": "dub", "tagline": "Short links with superpowers", "url": "https://www.producthunt.com/posts/dub", "product": { "name": "Dub.co", "id": "521361", "slug": "dub", "tagline": "Short links with superpowers", "url": "https://www.producthunt.com/products/dub" } }, { "name": "vidyo.ai", "id": "442314", "rank": 2, "scheduled_at": "2024-03-05T00:26:41-08:00", "slug": "vidyo-ai", "tagline": "Your AI social video co-pilot", "url": "https://www.producthunt.com/posts/vidyo-ai", "product": { "name": "vidyo.ai", "id": "573239", "slug": "vidyo-ai", "tagline": "Your AI social video co-pilot", "url": "https://www.producthunt.com/products/vidyo-ai" } } ], "products": [ { "name": "Dub.co", "id": "521361", "slug": "dub", "tagline": "Short links with superpowers", "url": "https://www.producthunt.com/products/dub" }, { "name": "vidyo.ai", "id": "573239", "slug": "vidyo-ai", "tagline": "Your AI social video co-pilot", "url": "https://www.producthunt.com/products/vidyo-ai" } ]}
Fields
| Field | Type | What it is | Example |
|---|---|---|---|
launches[].rank |
integer | Its place on the leaderboard. | 1 |
launches[].name |
string | The product's name. | Dub.co |
launches[].tagline |
string | The product's one-line pitch. | Short links with superpowers |
launches[].scheduled_at |
string | When the launch was scheduled to go live. | 2024-03-21T00:01:00-07:00 |
launches[].product.name |
string | The product's name. | Dub.co |
launches[].id |
string | Product Hunt's ID for the item. | 444791 |
launches[].product |
object | The product the launch belongs to. | 5 fields |
launches[].product.id |
string | Product Hunt's ID for the item. | 521361 |
launches[].product.slug |
string | The name in the product's Product Hunt address. | dub |
launches[].product.tagline |
string | The product's one-line pitch. | Short links with superpowers |
launches[].product.url |
string | The page on Product Hunt. | https://www.producthunt.com/products/dub |
launches[].slug |
string | The name in the product's Product Hunt address. | dub |
launches[].url |
string | The page on Product Hunt. | https://www.producthunt.com/posts/dub |
title |
string | The launch's title. | Best of Product Hunt: March 2024 |
launches |
array | The launches on that day. | 17 records |
products |
array | The products listed. | 16 records |
products[].id |
string | Product Hunt's ID for the item. | 521361 |
products[].name |
string | The product's name. | Dub.co |
products[].slug |
string | The name in the product's Product Hunt address. | dub |
products[].tagline |
string | The product's one-line pitch. | Short links with superpowers |
products[].url |
string | The page on Product Hunt. | https://www.producthunt.com/products/dub |
url |
string | The page on Product Hunt. | https://www.producthunt.com/leaderboard/monthly/2024/3 |
If a call fails
A failed call costs nothing. The response carries an error.code you can branch on; Errors and retries lists every code and which ones to retry.
Other Product Hunt endpoints
Something missing or unclear? Ask the team that builds the Product Hunt endpoints.