---
id: "us_nyc_borough_code"
kind: "datatype"
status: "draft"
is_pii: false
name: "New York City borough code"
regexp: "^[1-5]$"
categories: ["geo", "government"]
country: ["US"]
langs: ["en"]
quality: 90
url: "https://registry.apicrafter.io/datatype/us_nyc_borough_code"
---

# New York City borough code (`us_nyc_borough_code`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

One-digit code of a borough of New York City used by city agencies: 1 Manhattan, 2 Bronx, 3 Brooklyn, 4 Queens, 5 Staten Island. It is the first digit of the BBL and of the BIN.

- Personal data (PII): no
- Categories: Geographic identifiers (geo), Government related (government)
- Countries: United States (US)
- Languages: English (en)
- Classification: categorical

## Detection

Regular expression (Python `re`):

```
^[1-5]$
```

## Examples

- `1` — Manhattan
- `3` — Brooklyn
- `6` (invalid example) — There are five boroughs

## Metacrafter rules

1 rules: 1 match the field name, 0 match values.

- `usnycboroughcodebyname` (field, `us/us_nyc.yaml`)

## Supported by tools

- [`metacrafter`](https://registry.apicrafter.io/tool/metacrafter.md)

## Translations

- ru: Код боро Нью-Йорка

## Sources

- wikipedia: <https://en.wikipedia.org/wiki/Borough,_Block_and_Lot>

## Quality

Score 90/100. Missing: mapping (Wikidata, Schema.org, ...).

JSON: <https://registry.apicrafter.io/api/v1/datatypes/us_nyc_borough_code.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/US/geo/us_nyc_borough_code.yaml>
