Datasets API endpoint
Returns distribution counts over the Airbnb hosts dataset (dataset id enum value `airbnb-hosts`), honoring the same filters as search. Facet enum: `superhost`, `identity_verified`, `listing_count_band`, `hosting_years_band`, `interest`, `verification`, `location`.
/datasets/airbnb-hosts/facetsDataset id enum:
airbnb-hostsQuery parameters:
facet: required facet to aggregate. Allowed values: superhost, identity_verified, listing_count_band, hosting_years_band, interest, verification, location.q: optional full-text query over host name and bio, max 256 characters.location: optional free-text match over the profile location, max 128 characters.interest: optional exact interest, as returned by the interest facet, max 128 characters.verification: optional exact verification, as returned by the verification facet, max 128 characters.is_superhost: optional boolean. true keeps only Superhosts; false keeps only hosts without the badge.is_home_host: optional boolean filter on the home-host flag.identity_verified: optional boolean. true keeps only hosts whose identity is verified.min_listings: optional minimum number of listings the host manages, 0 or greater.max_listings: optional maximum number of listings the host manages, 0 or greater.min_reviews: optional minimum total guest reviews received, 0 or greater.min_hosting_years: optional minimum years of hosting, 0 or greater.Response behavior:
{ value, count } bucket.facet=superhost and facet=identity_verified, value is true or false.facet=listing_count_band, value is one of 0, 1, 2-4, 5-9, 10-49, 50+.facet=hosting_years_band, value is one of 0 (under a year or not shown), 1-2, 3-5, 6-9, 10+.facet=interest and facet=verification, value is the interest or verification text exactly as stored, and can be passed back to the matching search filter.facet=location, value is the location text exactly as hosts wrote it, so near-duplicates such as Lisbon, Portugal and Lisboa, Portugal appear as separate buckets. Use the location search filter to match by word instead.50 values, most common first.items array (not an error) when nothing matches or the dataset has no data yet.| Field | Filled in, of 2 checked | Values in the sample |
|---|---|---|
| value | 2 | |
| count | 2 | 322,674 to 470,007, median 322,674 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| facet | string | Yes | Facet enum: superhost, identity_verified, listing_count_band, hosting_years_band, interest, verification, location Allowed values: superhost, identity_verified, listing_count_band, hosting_years_band, interest, verification, location. | superhost | |
| q | string | No | Full-text query over host name and bio, max 256 characters | ||
| location | string | No | Free-text match over the profile location, max 128 characters | ||
| interest | string | No | Exact interest as returned by the interest facet, max 128 characters | ||
| verification | string | No | Exact verification as returned by the verification facet, max 128 characters | ||
| is_superhost | boolean | No | true keeps only Superhosts, false keeps only hosts without the badge | ||
| is_home_host | boolean | No | Filter on the home-host flag | ||
| identity_verified | boolean | No | true keeps only hosts whose identity is verified | ||
| min_listings | integer | No | Minimum number of listings the host manages, 0 or greater | ||
| max_listings | integer | No | Maximum number of listings the host manages, 0 or greater | ||
| min_reviews | integer | No | Minimum total guest reviews received, 0 or greater | ||
| min_hosting_years | integer | No | Minimum years of hosting, 0 or greater | ||
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/datasets/airbnb-hosts/facets?facet=superhost&q=coffee&is_superhost=true&is_home_host=true&identity_verified=true" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"dataset": "airbnb-hosts",
"facet": "listing_count_band",
"items": [
{
"value": "1",
"count": 18234
},
{
"value": "2-4",
"count": 4150
},
{
"value": "5-9",
"count": 830
},
{
"value": "10-49",
"count": 210
},
{
"value": "50+",
"count": 12
}
]
}
}Request schema
No body schema
Response schema
#/definitions/datasets.airbnbHostsFacetResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | datasets.AirbnbHostsFacetResponse | No | ||||
| data.dataset | string | No | Identifier of the dataset queried (`airbnb-hosts`). | |||
| data.facet | string | No | Facet that was aggregated. | |||
| data.items | array | No | Facet values with host counts. | |||
| data.items[].count | integer | No | Number of hosts with that value among the filtered hosts. | |||
| data.items[].value | string | No | Facet value, for example `true`, `2-4` or an interest. | |||
| 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/airbnb-hosts/facets?facet=superhost&q=coffee&is_superhost=true&is_home_host=true&identity_verified=true" \
-H "x-api-key: $CRAWLORA_API_KEY"