---
title: "Facet the Numbeo cities dataset"
method: GET
path: "/datasets/numbeo-cities/facets"
tags: ["Datasets"]
---

# Facet the Numbeo cities dataset

`GET /datasets/numbeo-cities/facets`

## Request

- Base URL: `https://api.crawlora.net/api/v1`
- URL: `https://api.crawlora.net/api/v1/datasets/numbeo-cities/facets`
- Auth: API key in header `x-api-key`

Returns city counts per country for the Numbeo cities dataset; `facet` is required and accepts only `country`. Narrow the counts with `q`, `country` and index thresholds such as `min_cost_of_living_index`, `min_safety_index` or `max_pollution_index`. Items are value and count pairs.

## Query parameters

- `facet` 'country', required
- `q` string
- `country` string
- `min_cost_of_living_index` number
- `max_cost_of_living_index` number
- `min_quality_of_life_index` number
- `min_crime_index` number
- `max_crime_index` number
- `min_safety_index` number
- `min_health_care_index` number
- `max_pollution_index` number
- `max_traffic_index` number

## Headers

- `x-api-key` string, required

## Response `200`

OK

- DatasetsNumbeoCitiesFacetResponseDoc
  - `code` integer
  - `data` DatasetsNumbeoCityFacetResponse
    - `dataset` string: Identifier of the dataset queried (`numbeo-cities`).
    - `facet` string: Facet that was aggregated.
    - `items` EsNumbeoDatasetFacetItem[]: Facet values with the number of matching records for each.
      - `count` integer: Number of records with this value.
      - `value` string: Facet value being counted.
  - `msg` string

## Other responses

- `400`: Bad Request
- `429`: Too Many Requests
- `500`: Internal Server Error

---

[API](https://skmtc.dev/crawlora/apis/crawlora-api.md) · [All operations](https://skmtc.dev/crawlora/apis/crawlora-api/llms.txt) · [OpenAPI document](https://skmtc.dev/crawlora/apis/crawlora-api/revisions/afac9b012a27?raw)
