Datasets API endpoint
Returns terms aggregation counts for the Starbucks store directory. Facet enum: `country`, `state`, `market`, `amenities`, `ownership_type_code`. Accepts the same filter parameters as search to scope the aggregation.
/datasets/starbucks-stores/facetsReturns terms-aggregation counts over the Starbucks store directory (dataset id starbucks-stores).
Dataset id enum:
starbucks-storesQuery parameters:
facet: required facet to aggregate. One of country, state, market, amenities, ownership_type_code.market: optional crawl-provenance market filter. One of us, ca — the Starbucks host
the store was discovered through, not its geography. country is the store's true country;
the US host geocodes worldwide, so a Tokyo store has country: JP and market: us.q, country, state, city, amenity: optional filters that scope the aggregation,
matching the search endpoint.| Field | Filled in, of 50 checked | Values in the sample |
|---|---|---|
| key | 50 | |
| count | 50 | 33 to 16,446, median 133 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| facet | string | Yes | Facet enum: country, state, market, amenities, ownership_type_code Allowed values: country, state, market, amenities, ownership_type_code. | country | |
| q | string | No | Full-text search over store name, city, and address | ||
| country | string | No | ISO-3166-1 alpha-2 country filter | ||
| state | string | No | State/region code filter | ||
| city | string | No | Exact city filter | ||
| market | string | No | Crawl-provenance market filter. One of: us, ca Allowed values: us, ca. | ||
| amenity | string | No | Amenity code filter, e.g. DT | ||
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/datasets/starbucks-stores/facets?facet=country&q=coffee&country=us&market=us" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"dataset": "starbucks-stores",
"facet": "country",
"items": [
{
"key": "US",
"count": 16000
},
{
"key": "CA",
"count": 1400
}
]
}
}Request schema
No body schema
Response schema
#/definitions/datasets.starbucksStoresFacetResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | datasets.StarbucksStoreFacetResponse | No | ||||
| data.dataset | string | No | ||||
| data.facet | string | No | ||||
| data.items | array | No | ||||
| data.items[].count | integer | No | ||||
| data.items[].key | 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/starbucks-stores/facets?facet=country&q=coffee&country=us&market=us" \
-H "x-api-key: $CRAWLORA_API_KEY"