Datasets API endpoint
Returns value counts for one field of the Apple Podcasts shows dataset, chosen by the required `facet`: `genre`, `genre_id`, `country`, `content_advisory_rating` or `run_id`. The counts honour the search filters (`q`, `genre`, `country`, `min_track_count` and others) and cover the top 50 values.
/datasets/apple-podcasts-shows/facetsReturns terms-aggregation counts for one field over the Apple Podcasts shows dataset, honoring the same filters as search.
Query parameters:
facet (required) — one of genre, genre_id, country, content_advisory_rating, run_id.q, genre, genre_id, country, explicitness, run_id, min_track_count) apply.Returns {dataset, facet, items:[{value, count}]} (top 50 buckets).
| Field | Filled in, of 50 checked | Values in the sample |
|---|---|---|
| value | 50 | |
| count | 50 | 3,228 to 34,496, median 5,318 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| facet | string | Yes | Facet enum: genre, genre_id, country, content_advisory_rating, run_id Allowed values: genre, genre_id, country, content_advisory_rating, run_id. | genre | |
| q | string | No | Full-text query over show title and artist name, max 256 characters | ||
| genre | string | No | Exact primary-genre filter, max 128 characters | ||
| genre_id | string | No | Exact Apple Podcasts genre id filter, max 128 characters | ||
| country | string | No | Exact storefront country filter, max 128 characters | ||
| explicitness | string | No | Exact explicitness filter, max 128 characters | ||
| run_id | string | No | Exact crawl run-id filter, max 128 characters | ||
| min_track_count | integer | No | Minimum episode count (track_count), 0 or greater | ||
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/datasets/apple-podcasts-shows/facets?facet=genre&q=coffee&country=us" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"dataset": "apple-podcasts-shows",
"facet": "genre",
"items": [
{
"value": "History",
"count": 312
},
{
"value": "Comedy",
"count": 287
}
]
}
}Request schema
No body schema
Response schema
#/definitions/datasets.applePodcastsShowsFacetResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | datasets.ApplePodcastsShowsFacetResponse | No | ||||
| data.dataset | string | No | Identifier of the dataset queried (`apple-podcasts-shows`). | |||
| 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 shows with this value. | |||
| data.items[].value | string | No | Facet value being counted. | |||
| 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/apple-podcasts-shows/facets?facet=genre&q=coffee&country=us" \
-H "x-api-key: $CRAWLORA_API_KEY"