NYC Parser Documentation

nycparser is a Python package for parsing New York City addresses and BBL (Borough-Block-Lot) values.

Features

  • Parse NYC addresses into components (house number, street name, borough, zip)

  • Support for Queens-style hyphenated house numbers

  • Borough code identification

  • BBL (Borough-Block-Lot) parsing

  • Handling of complex addresses with descriptors (REAR, FRONT, etc.)

Installation

pip install nycparser

Basic Usage

from nycparser import Parser

parser = Parser()

# Parse an address
result = parser.address('123 Main St, Manhattan, NY 10001')
print(result)
# {'PHN': '123', 'STREET': 'MAIN ST', 'BOROUGH_CODE': 1, 'BOROUGH_NAME': 'MANHATTAN', 'ZIP': '10001'}

# Parse a BBL
result = parser.bbl('1-01234-0001')
print(result)
# {'BOROUGH_CODE': 1, 'BLOCK': 1234, 'LOT': 1, 'BOROUGH_NAME': 'MANHATTAN'}

Indices and tables