---
title: "Facet the US housing markets dataset"
method: GET
path: "/datasets/housing-markets/facets"
tags: ["Datasets"]
---

# Facet the US housing markets dataset

`GET /datasets/housing-markets/facets`

## Request

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

Returns terms aggregation counts for the housing markets dataset. Facet enum: `region_type`, `state_code`, `property_type`, `parent_metro`, `parent_metro_code`, `income_vintage`, `is_latest`, `period_begin`. region_type enum: `national`, `metro`, `county`, `city`, `zip`. property_type enum: `All Residential`, `Single Family Residential`, `Condo/Co-op`, `Townhouse`, `Multi-Family (2-4 Unit)`, `Single Units Only`.

## Query parameters

- `facet` 'region_type' | 'state_code' | 'property_type' | 'parent_metro' | 'parent_metro_code' | 'income_vintage' | 'is_latest' | 'period_begin', required
- `q` string
- `region_type` 'national' | 'metro' | 'county' | 'city' | 'zip'
- `state_code` string
- `property_type` string
- `parent_metro_code` string
- `zip_code` string
- `period` string
- `latest` boolean
- `min_median_sale_price` number
- `max_median_sale_price` number
- `min_median_list_price` number
- `max_median_list_price` number
- `min_price_to_income` number
- `max_price_to_income` number
- `min_salary_to_buy` integer
- `max_salary_to_buy` integer
- `min_median_dom` number
- `max_median_dom` number
- `min_inventory` integer
- `max_inventory` integer
- `min_homes_sold` integer

## Headers

- `x-api-key` string, required

## Response `200`

OK

- DatasetsHousingMarketsFacetResponseDoc
  - `code` integer
  - `data` DatasetsHousingFacetResponse
    - `dataset` string
    - `facet` string
    - `items` EsHousingMarketDatasetFacetItem[]
      - `count` integer
      - `value` string
  - `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)
