The NYC Chapter
Every portal in the guide works roughly the same way. This page teaches the pattern once, using the deepest portal we know: NYC Open Data, home to thousands of datasets about how the city actually runs. Learn it here and the rest of the directory opens up.
The pattern, in four steps
Find the dataset, note its ID
Search NYC Open Data(opens in a new tab) for what you're curious about. Every dataset's URL ends in a short ID — 311 Service Requests is
erm2-nwe9. That ID is the key to everything below.Every dataset is already an API
The portal runs on Socrata, so each dataset answers at
data.cityofnewyork.us/resource/<id>.json— no signup for light use. This is what the guide's API badge means: the data comes to your code, not just your downloads folder.Ask a question with SoQL
Socrata's query language looks a lot like SQL. This page's chart is drawn from exactly this query — counts of the last seven days of 311 requests, grouped by borough:
https://data.cityofnewyork.us/resource/erm2-nwe9.json?$select=borough,count(*) as n&$group=borough&$where=created_date >= '2026-09-09T00:00:00'Going further
Heavier use wants a free app token(opens in a new tab); the full SoQL reference lives in the Socrata developer docs(opens in a new tab). The same pattern powers every Socrata portal in the directory — including Open Data NY(opens in a new tab) and hundreds of other cities.
The proof: that query, drawn
66,490 requests citywide. Rows with no borough recorded are excluded.
View as table
| Borough | Requests | Share |
|---|---|---|
| Brooklyn | 21,962 | 33.0% |
| Queens | 16,271 | 24.5% |
| Manhattan | 13,535 | 20.4% |
| Bronx | 12,244 | 18.4% |
| Staten Island | 2,478 | 3.7% |