Datasets API endpoint
Returns distribution counts over the Product Hunt products dataset (dataset id enum value `producthunt-products`), honoring the same filters as search. Facet enum: `topic`, `launch_year`, `pricing_type`, `product_state`.
/datasets/producthunt-products/facetsDataset id enum:
producthunt-productsQuery parameters:
facet: required facet to aggregate. Allowed values: topic, launch_year, pricing_type, product_state.q: optional full-text query over product name and tagline, max 256 characters.topic: optional exact topic-slug filter, e.g. artificial-intelligence, max 128 characters.maker: optional exact maker-username filter, max 128 characters.launched_after: optional lower bound on first-launch date, an ISO-8601 date (YYYY-MM-DD).launched_before: optional upper bound on first-launch date, an ISO-8601 date (YYYY-MM-DD).min_votes: optional minimum upvotes, 0 or greater.min_rating: optional minimum review rating, from 0 through 5.pricing_type: optional exact pricing-type filter, e.g. free, paid, freemium.has_website: optional website presence filter.is_online: optional lifecycle filter; true keeps only products still online, false only retired products.Response behavior:
{ value, count } bucket. For facet=topic, value is a topic slug; for facet=launch_year, a four-digit year; for facet=pricing_type/product_state, the token value.items array (not an error) when nothing matches or the dataset has no data yet.| Field | Filled in, of 50 checked | Values in the sample |
|---|---|---|
| value | 50 | |
| count | 50 | 639 to 15,626, median 1,131 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| facet | string | Yes | Facet enum: topic, launch_year, pricing_type, product_state Allowed values: topic, launch_year, pricing_type, product_state. | topic | |
| q | string | No | Full-text query over product name and tagline, max 256 characters | ||
| topic | string | No | Exact topic-slug filter, e.g. artificial-intelligence, max 128 characters | ||
| maker | string | No | Exact maker-username filter (populated by hydration), max 128 characters | ||
| launched_after | string | No | Lower bound on first-launch date, an ISO-8601 date (YYYY-MM-DD) | ||
| launched_before | string | No | Upper bound on first-launch date, an ISO-8601 date (YYYY-MM-DD) | ||
| min_votes | integer | No | Minimum upvotes, 0 or greater | ||
| min_rating | number | No | Minimum review rating, from 0 through 5 | ||
| pricing_type | string | No | Exact pricing-type filter, e.g. free, paid, freemium | ||
| has_website | boolean | No | Website presence filter | ||
| is_online | boolean | No | true keeps only products still online, false only retired products | ||
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/datasets/producthunt-products/facets?facet=topic&q=coffee&has_website=true&is_online=true" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"dataset": "producthunt-products",
"facet": "launch_year",
"items": [
{
"value": "2024",
"count": 12043
},
{
"value": "2023",
"count": 11890
}
]
}
}Request schema
No body schema
Response schema
#/definitions/datasets.producthuntProductsFacetResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | datasets.ProductHuntProductsFacetResponse | No | ||||
| data.dataset | string | No | Identifier of the dataset queried (`producthunt-products`). | |||
| data.facet | string | No | Facet that was aggregated. | |||
| data.items | array | No | Facet values with the number of matching records for each. | |||
| data.items[].count | integer | No | Number of products in this bucket. | |||
| data.items[].value | string | No | Bucket value, such as a topic slug, a four-digit launch year, a pricing type or a product state. | |||
| msg | string | No | OK |
| Status | Description | Schema |
|---|---|---|
| 400 | Bad Request | #/definitions/app.Response |
| 429 | Too Many Requests | #/definitions/app.Response |
| 500 | Internal Server Error | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/datasets/producthunt-products/facets?facet=topic&q=coffee&has_website=true&is_online=true" \
-H "x-api-key: $CRAWLORA_API_KEY"