Datasets API endpoint
Returns suppressed distribution counts over the Product Hunt trends dataset (dataset id enum value `producthunt-trends`), honoring the same filters as search. Facet enum: `topic`, `launch_year`.
/datasets/producthunt-trends/facetsReturns suppressed distribution counts over the Product Hunt trends dataset, honoring the same filters as search. It is aggregate-only.
Dataset id enum:
producthunt-trendsQuery parameters:
facet: required facet to aggregate. Allowed values: topic, launch_year.group_by: optional aggregate cell dimension. Allowed values: topic_month, topic_year, topic. Defaults to topic_month.topic: optional exact topic-slug filter, e.g. artificial-intelligence, 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 product upvotes, 0 or greater.min_launches: optional minimum launches per bucket; raises the small-cell suppression floor.Response behavior:
{ value, count } bucket. For facet=topic, value is a topic slug; for facet=launch_year, value is a four-digit year.items array (not an error) when nothing clears the suppression floor 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 Allowed values: topic, launch_year. | topic | |
| group_by | string | No | topic_month | Aggregate cell dimension enum: topic_month, topic_year, topic. Defaults to topic_month Allowed values: topic_month, topic_year, topic. | |
| topic | string | No | Exact topic-slug filter, e.g. artificial-intelligence, 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 product upvotes, 0 or greater | ||
| min_launches | integer | No | Minimum launches per bucket; raises the small-cell suppression floor | ||
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/datasets/producthunt-trends/facets?facet=topic&group_by=topic_month" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"dataset": "producthunt-trends",
"facet": "topic",
"items": [
{
"value": "artificial-intelligence",
"count": 8421
},
{
"value": "developer-tools",
"count": 6033
},
{
"value": "productivity",
"count": 5210
}
]
}
}Request schema
No body schema
Response schema
#/definitions/datasets.producthuntTrendsFacetResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | datasets.ProductHuntTrendsFacetResponse | No | ||||
| data.dataset | string | No | Identifier of the dataset queried (`producthunt-trends`). | |||
| 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, either a topic slug or a four-digit launch year. | |||
| 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-trends/facets?facet=topic&group_by=topic_month" \
-H "x-api-key: $CRAWLORA_API_KEY"