> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usecroma.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Bogotá open data

> Bogotá's socioeconomic strata: the estrato of every property unit in the city, about three million CHIPs, by lot, block and sector, from the Secretaría Distrital de Planeación.

Bogotá publishes the datasets of its agencies on its open data portal, Datos Abiertos
Bogotá. The first one here is the socioeconomic stratification: the stratum the
Secretaría Distrital de Planeación assigns to every property unit in the city, from
`1` to `6`, which sets the tariffs of public utilities and the subsidies a home
receives, and which lenders and insurers read as a signal of a household's
socioeconomic level.

Every unit is identified by its CHIP, the cadastre's identifier, and carries its lot,
manzana and cadastral sector codes, so a stratum joins to any other record of the
same property or block. Look up one CHIP, every unit of a lot or a manzana, or every
unit of one stratum in a sector, each in a single fast call.

> [!NOTE]
>
> The whole source, organized and ready to query: every endpoint on this page answers in milliseconds. Every response carries `as_of`: how current the data is. [How datasets work](https://docs.usecroma.com/datasets.md).

## Stratum by CHIP

`POST /co/bogota-datos/stratum/v1` [Dataset](https://docs.usecroma.com/datasets.md)

Returns the stratum of one property unit.

| Field | Type | Notes |
| - | - | - |
| `chip` | string | **Required.** The unit's CHIP, e.g. `AAA0087JAUZ`. Case does not matter. |

```bash theme={"dark"}
curl https://api.croma.run/co/bogota-datos/stratum/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "chip": "AAA0087JAUZ" }'
```

Returns `as_of`, `found`, `chip`, `unit` and `release` (see below).

## Search units

`POST /co/bogota-datos/strata-search/v1` [Dataset](https://docs.usecroma.com/datasets.md)

Lists property units with their stratum, by lot, manzana, sector or stratum.
Combine the filters, e.g. a sector and a stratum.

| Field | Type | Notes |
| - | - | - |
| `lot_code` | string | Optional. Twelve-digit cadastral lot code, e.g. `008104037039`: every unit on that lot. |
| `block_code` | string | Optional. Nine-digit manzana code, e.g. `008104037`: the first nine digits of a lot code. |
| `sector_code` | string | Optional. Six-digit cadastral sector, e.g. `008104`: the first six digits of a lot code. |
| `stratum` | enum | Optional. `1` to `6`, or `0` for units without a stratum. |
| `page` | integer | Optional. 1-based page. Default `1`. |
| `per_page` | integer | Optional. Results per page, 1-100. Default `20`. |

```bash theme={"dark"}
curl https://api.croma.run/co/bogota-datos/strata-search/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "lot_code": "008104037039" }'
```

Returns `as_of`, the applied filters, `total`, `total_is_exact`, `page`,
`per_page`, `total_pages`, `count`, `units[]` (ordered by CHIP) and `release` (see below).

## Response

Every response carries `as_of`: how current the data is, and `release`: the file it comes from.

### `units[]` and `unit`

| Field | Notes |
| - | - |
| `chip` | The property unit's CHIP, Bogotá's cadastral identifier: one apartment, house, parking space or storage unit. |
| `lot_code` | Twelve-digit cadastral code of the lot: sector (6 digits), manzana (3) and lot (3). Every unit of a building shares it. |
| `block_code` | Nine-digit code of the manzana (city block): the lot code's first nine digits. |
| `sector_code` | Six-digit cadastral sector: the lot code's first six digits. |
| `stratum` | Socioeconomic stratum, `1` (lowest) to `6` (highest). `0` means the unit carries no stratum: the city does not stratify property without housing (commercial, institutional, parking and similar uses). |

### `release`

`published_at` (when the Secretaría Distrital de Planeación last published the file), `units` (how many it holds), `document_url` (Croma's byte-identical copy of the published file, a zipped CSV) and `source_document_url` (the file on the source).

The CHIP and the lot code are the same identifiers Bogotá's cadastre uses, so a unit found here joins to any other dataset keyed by CHIP, lot, manzana or sector.

> [card] [Full reference](https://docs.usecroma.com/api-reference/overview.md)
>
> Schemas, all response fields, and an interactive playground.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.