Datasets API endpoint
Returns terms-aggregation counts for one facet of the Box Office Mojo dataset, scoped to the same filters as search. Facet enum: `gross_band`, `years_active`, `lifetime_year`, `franchise_names`, `brand_names`, `genre_names`, `hydrated`, `is_billion_dollar`, `in_lifetime_top_1000_ww`. gross_band enum: `under_50m`, `50_100m`, `100_250m`, `250_500m`, `500m_1b`, `over_1b`.
/datasets/boxofficemojo/facetsQuery parameters:
facet: required. Allowed values: gross_band, years_active, lifetime_year, franchise_names, brand_names, genre_names, hydrated, is_billion_dollar, in_lifetime_top_1000_ww./datasets/boxofficemojo/search are also accepted and scope the aggregation.| Field | Filled in, of 6 checked | Values in the sample |
|---|---|---|
| value | 6 | |
| count | 6 | 65 to 17,813, median 483 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| facet | string | Yes | Facet enum: gross_band, years_active, lifetime_year, franchise_names, brand_names, genre_names, hydrated, is_billion_dollar, in_lifetime_top_1000_ww Allowed values: gross_band, years_active, lifetime_year, franchise_names, brand_names, genre_names, hydrated, is_billion_dollar, in_lifetime_top_1000_ww. | gross_band | |
| q | string | No | Full-text query, max 256 characters | ||
| title_id | string | No | Exact title id (IMDb tt… id used by Box Office Mojo), max 32 characters | ||
| year | integer | No | Year in years_active | ||
| lifetime_year | integer | No | Primary lifetime chart year | ||
| gross_band | string | No | Gross band filter | ||
| franchise | string | No | Franchise name filter, max 128 characters | ||
| brand | string | No | Brand name filter, max 128 characters | ||
| genre | string | No | Genre name filter, max 128 characters | ||
| in_lifetime_top_1000 | boolean | No | Only titles in the lifetime worldwide top 1000 chart | ||
| min_worldwide | integer | No | Minimum lifetime worldwide gross | ||
| max_worldwide | integer | No | Maximum lifetime worldwide gross | ||
| min_domestic | integer | No | Minimum lifetime domestic gross | ||
| min_foreign_share | number | No | Minimum foreign share of worldwide gross, 0 through 1 | ||
| max_domestic_share | number | No | Maximum domestic share of worldwide gross, 0 through 1 | ||
| hydrated | boolean | No | Hydrated filter | ||
| is_billion_dollar | boolean | No | Only titles with worldwide gross of at least $1B | ||
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/datasets/boxofficemojo/facets?facet=gross_band&q=coffee&in_lifetime_top_1000=true&hydrated=true&is_billion_dollar=true" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"dataset": "boxofficemojo",
"facet": "gross_band",
"items": [
{
"value": "over_1b",
"count": 50
},
{
"value": "500m_1b",
"count": 120
}
]
}
}Request schema
No body schema
Response schema
#/definitions/datasets.boxOfficeMojoFacetResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | datasets.BoxOfficeMojoFacetResponse | No | ||||
| data.dataset | string | No | ||||
| data.facet | string | No | ||||
| data.items | array | No | ||||
| data.items[].count | integer | No | ||||
| data.items[].value | string | No | ||||
| 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/boxofficemojo/facets?facet=gross_band&q=coffee&in_lifetime_top_1000=true&hydrated=true&is_billion_dollar=true" \
-H "x-api-key: $CRAWLORA_API_KEY"