Datasets API endpoint
Returns terms aggregation counts for the stored Apple Maps place directory. Facet enum: `category`, `country_code`, `state`, `city`, `price_symbol`, `catalog_country`. Accepts the same filter parameters as search to scope the aggregation. Use `facet=category` to discover the exact category names the `category` filter accepts.
/datasets/apple-maps-places/facetsReturns terms-aggregation counts over the stored Apple Maps place directory (dataset id apple-maps-places).
Dataset id enum:
apple-maps-placesQuery parameters:
facet: required facet to aggregate. One of category, country_code, state, city, price_symbol, catalog_country.q, category, city, state, country_code, postal_code, min_rating, min_rating_count, has_website, has_phone, lat, lon, radius_m: optional filters that scope the aggregation, matching the search endpoint.Response behavior:
facet=category returns the exact Apple category names the category filter accepts; pass a returned key unchanged.catalog_country counts places by the Apple storefront they were found under, which is crawl provenance, not geography. country_code is the place's own country.| Field | In the sample |
|---|---|
| dataset | Has a value |
| facet | Has a value |
| items | Empty |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| facet | string | Yes | Facet enum: category, country_code, state, city, price_symbol, catalog_country Allowed values: category, country_code, state, city, price_symbol, catalog_country. | category | |
| q | string | No | Full-text search over place name, category, city and address | ||
| category | string | No | Exact Apple category name | ||
| city | string | No | Exact city filter | ||
| state | string | No | Exact state/region filter | ||
| country_code | string | No | ISO 3166-1 alpha-2 country filter | ||
| postal_code | string | No | Exact postal code filter | ||
| min_rating | number | No | Minimum rating, from 0 through 5 | ||
| min_rating_count | integer | No | Minimum number of ratings behind the rating | ||
| has_website | boolean | No | Website presence filter | ||
| has_phone | boolean | No | Phone presence filter | ||
| lat | number | No | Latitude for radius filtering, requires lon | ||
| lon | number | No | Longitude for radius filtering, requires lat | ||
| radius_m | integer | No | Radius in meters, 1 through 50000; requires lat and lon | ||
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/datasets/apple-maps-places/facets?facet=category&q=coffee&has_website=true&has_phone=true" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"dataset": "apple-maps-places",
"facet": "category",
"items": [
{
"key": "Coffee Shop",
"count": 120
},
{
"key": "Restaurant",
"count": 95
}
]
}
}Request schema
No body schema
Response schema
#/definitions/datasets.applePlacesFacetResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | datasets.ApplePlaceFacetResponse | 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/apple-maps-places/facets?facet=category&q=coffee&has_website=true&has_phone=true" \
-H "x-api-key: $CRAWLORA_API_KEY"