NYC Open Data runs on Socrata: each dataset has an id and is queried with SoQL, a SQL-like query language, in $-prefixed parameters. The same API works for hundreds of other government open-data portals.
None for light use. A free app token in the X-App-Token header raises the rate limit.
Full reference: https://dev.socrata.com/
Dataset erm2-nwe9 is 311 service requests.
curl "https://data.cityofnewyork.us/resource/erm2-nwe9.json?\$limit=2&\$order=created_date%20DESC"
[
{
"unique_key": "70494461",
"created_date": "2026-09-22T02:07:09.000",
"agency": "DOT",
"agency_name": "Department of Transportation",
"complaint_type": "Street Condition",
"descriptor": "Pothole",
"incident_zip": "11101",
"incident_address": "40 ROAD",
"street_name": "40 ROAD",
"cross_street_1": "29 STREET",
"cross_street_2": "NORTHERN BOULEVARD",
"address_type": "BLOCKFACE",
"city": "QUEENS",
"facility_type": "N/A",
"status": "Open"
},
{
"unique_key": "70498736",
"created_date": "2026-09-22T01:54:04.000",
"agency": "DOT",
"agency_name": "Department of Transportation",
"complaint_type": "Street Condition",
"descriptor": "Pothole",
"incident_zip": "11415",
"incident_address": "QUEENS BOULEVARD",
"street_name": "QUEENS BOULEVARD",
"cross_street_1": "VWE NORTHBOUND EXIT 9",
"cross_street_2": "83 AVENUE",
"address_type": "BLOCKFACE",
"city": "QUEENS",
"facility_type": "N/A",
"status": "Open"
}
]
SoQL $select and $group work like SQL.
curl "https://data.cityofnewyork.us/resource/erm2-nwe9.json?\$select=complaint_type,count(*)&\$group=complaint_type&\$order=count(*)%20DESC&\$limit=5"
[
{
"complaint_type": "Illegal Parking",
"count": "2930884"
},
{
"complaint_type": "Noise - Residential",
"count": "2560765"
}
]