Datasets API endpoint
Returns terms aggregation counts for Google Maps businesses. Facet enum: `category`, `country`, `state`, `state_code`, `county`, `county_code`, `city`, `town`, `website_status`. Category facet values are exact locale-specific Google Maps labels and can be localized, non-ASCII, or contain punctuation; pass a returned value unchanged to the category filter. `state` and `county` keep each country's own administrative vocabulary (e.g. `Provincia de Madrid`, `Département du Nord`); `state_code` and `county_code` are ISO 3166-2 codes populated today only for Canadian provinces and territories (e.g. `CA-ON`) and Irish counties (e.g. `IE-D`); every other record, including all US rows, carries no code and is absent from the code facets.
/datasets/google-map-businesses/facetsReturns aggregation counts for scraped Google Maps business records stored in a search index.
Dataset id enum:
google-map-businessesQuery parameters:
facet: required facet enum: category, country, state, state_code, county, county_code, city, town, website_status.q: optional full-text business search query, max 256 characters. Every term must match the name, address, headline or category (filler words such as in, near and the are ignored), so door repair returns records matching both words rather than either one.category: optional exact category filter, max 128 characters. Values are the locale-specific labels returned by Google Maps and can be localized, non-ASCII, or contain punctuation. Use facet=category to discover exact values and pass the selected value unchanged.country: optional exact country filter, max 128 characters.state: optional exact state filter, max 128 characters.county: optional exact county filter, max 128 characters.state_code: optional exact ISO 3166-2 state/region code filter, e.g. CA-ON, max 128 characters. Only Canadian provinces and territories carry a code today, so a United States code such as US-NV returns no rows; filter other countries with state, county or city. Use facet=state_code to list the values.county_code: optional exact ISO 3166-2 county/district code filter, e.g. IE-D, max 128 characters. Only Irish counties carry a code today; filter other countries with county or city. Use facet=county_code to list the values.city: optional exact city filter, max 128 characters.town: optional exact town filter, max 128 characters.min_rating: optional minimum rating from 0 through 5. Businesses with no aggregate Google rating are returned with rating null, so any min_rating above 0 excludes them.min_review_count: optional minimum review count.has_website: optional website presence filter.has_phone: optional phone presence filter.has_geo: optional location presence filter. true keeps only mappable businesses with coordinates; false isolates locationless service-area businesses that Google assigns no map location.lat: optional latitude for radius filtering.lon: optional longitude for radius filtering.radius_m: optional radius in meters, from 1 through 50000; requires lat and lon when supplied.sort: optional sort enum accepted for consistency: relevance, updated_at_desc, rating_desc, review_count_desc, distance_asc.Response behavior:
facet=category, returned values are exact locale-specific Google Maps labels. Pass a selected value unchanged to the category filter.facet=state and facet=county return each country's own administrative labels (Provincia de Madrid, Département du Nord, Regierungsbezirk Köln); facet=state_code and facet=county_code return ISO 3166-2 codes, populated today only for Canadian provinces and territories (CA-ON) and Irish counties (IE-D); every other record, including all United States rows, carries no code and is absent from the code facets.lat and lon must be supplied together. distance_asc requires lat and lon, but does not require radius_m.| Field | Filled in, of 50 checked | Values in the sample |
|---|---|---|
| value | 50 | |
| count | 50 | 443,789 to 20,087,280, median 1,093,078 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| facet | string | Yes | Facet enum: category, country, state, state_code, county, county_code, city, town, website_status Allowed values: category, country, state, state_code, county, county_code, city, town, website_status. | category | |
| q | string | No | Full-text business search query, max 256 characters; every term must match the name, address, headline or category (filler words such as in, near and the are ignored) | ||
| category | string | No | Exact locale-specific Google Maps category label; use the category facet to discover values, max 128 characters | ||
| country | string | No | Country filter. Accepts the full English name (\ | ||
| state | string | No | Exact state filter, max 128 characters | ||
| county | string | No | Exact county filter, max 128 characters | ||
| state_code | string | No | Exact ISO 3166-2 state/region code filter, e.g. CA-ON, max 128 characters. Only Canadian provinces and territories carry a code today, so US codes such as US-NV return no rows; filter other countries by state, county or city. Use facet=state_code to list values | ||
| county_code | string | No | Exact ISO 3166-2 county/district code filter, e.g. IE-D, max 128 characters. Only Irish counties carry a code today; filter other countries by county or city. Use facet=county_code to list values | ||
| city | string | No | Exact city filter, max 128 characters | ||
| town | string | No | Exact town filter, max 128 characters | ||
| min_rating | number | No | Minimum rating, 0 through 5. Businesses with no aggregate Google rating are returned with rating null, so any min_rating above 0 excludes them. | ||
| min_review_count | integer | No | Minimum review count | ||
| has_website | boolean | No | Filter by website presence | ||
| has_phone | boolean | No | Filter by phone presence | ||
| has_geo | boolean | No | Filter by location presence: true keeps only mappable businesses with coordinates; false isolates locationless service-area businesses that have no map location | ||
| permanently_closed | boolean | No | Closure filter. true keeps only businesses Google marks Permanently closed; false excludes them, keeping every business not known to be closed. Most rows have never been status-checked and are returned with permanently_closed null, which means unknown, not open. | ||
| lat | number | No | Latitude for radius filtering | ||
| lon | number | No | Longitude for radius filtering | ||
| radius_m | integer | No | Radius in meters, 1 through 50000; requires lat and lon when supplied | ||
| sort | string | No | Sort enum: relevance, updated_at_desc, rating_desc, review_count_desc, distance_asc Allowed values: relevance, updated_at_desc, rating_desc, review_count_desc, distance_asc. | ||
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/datasets/google-map-businesses/facets?facet=category&q=coffee&country=us&has_website=true&has_phone=true&has_geo=true&permanently_closed=true&sort=relevance" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"dataset": "google-map-businesses",
"facet": "city",
"items": [
{
"value": "San Francisco",
"count": 42
}
]
}
}Request schema
No body schema
Response schema
#/definitions/datasets.googleMapBusinessesFacetResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | datasets.GoogleBusinessFacetResponse | No | ||||
| data.dataset | string | No | Identifier of the dataset queried (`google-map-businesses`). | |||
| 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 businesses 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/google-map-businesses/facets?facet=category&q=coffee&country=us&has_website=true&has_phone=true&has_geo=true&permanently_closed=true&sort=relevance" \
-H "x-api-key: $CRAWLORA_API_KEY"