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

  1. 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.

  2. 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.

  3. 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'
  4. 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

311 service requests by borough — seven days from 2026-09-09 live from NYC Open Data
Brooklyn
21,962
Queens
16,271
Manhattan
13,535
Bronx
12,244
Staten Island
2,478

66,490 requests citywide. Rows with no borough recorded are excluded.

View as table
BoroughRequestsShare
Brooklyn21,96233.0%
Queens16,27124.5%
Manhattan13,53520.4%
Bronx12,24418.4%
Staten Island2,4783.7%

Keyboard shortcuts

On. Switch them off if they collide with your assistive tools; ? still opens this sheet.

Go to

Press g then the letter.

  • gh Latest
  • gs Sources
  • gm Media
  • gv Videos
  • gp Podcasts
  • gc Calendar
  • gd Decoder
  • gz Dataviz
  • ga Datasets
  • gb Blog
  • gk Markets
  • gj Careers
  • gn Prompt Notebook

On this page

  • / Focus search, where there is one
  • t Back to top
  • ? This list
  • Esc Close