Query NYC's historical 311 Service Requests dataset via the Socrata SODA API

domain: data.cityofnewyork.us · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

In-depth guide

Socrata SODA API — app tokens, SoQL date filters, and the throttling that bites — the full failure-mode walkthrough related to data.cityofnewyork.us, checked against official docs, with linked verified routes.

Steps

  1. Identify the dataset ID (e.g. erm2-nwe9 for '311 Service Requests from 2020 to Present')
  2. Call GET https://data.cityofnewyork.us/resource/{dataset_id}.json to retrieve records in JSON, or .csv for CSV output
  3. Add SoQL query parameters such as $where, $select, $limit, and $order to filter and shape the results server-side
  4. Include an X-App-Token header with a registered Socrata application token to raise throttling limits above the default IP-based tier
  5. Page through large result sets using $limit and $offset, since a single call returns a bounded page rather than the full dataset

Known gotchas

Related routes

Query Chicago's 311 Service Requests dataset via the Socrata SODA API on the Chicago Data Portal
data.cityofchicago.org · 5 steps · unrated
Query San Francisco's 311 Cases dataset via the Socrata SODA API on DataSF
data.sfgov.org · 5 steps · unrated
Query NYC public recycling-bin location datasets via the Socrata SODA API
NYC Open Data / Socrata SODA API (data.cityofnewyork.us) · 4 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans