City, New York Open Data API

⭐ Beginner's Pick Government / No Auth Required Beginner HTTPS
Free to Use Varies (check documentation)

Overview

City, New York Open Data is one of the largest municipal open data portals in the world, offering thousands of free datasets on topics like 311 complaints, restaurant inspections, traffic, and public safety. No API key is required to get started. It uses the Socrata Open Data API (SODA), making it straightforward to query with standard HTTP.

💡

Beginner Tip

Use the Socrata SODA API with and parameters to filter large NYC datasets—for example, add ?=10 to get just a few rows while testing.

Available Data

Response fields: cityofnewyork us
Use case: Integrate new york (us) city open data data into web and mobile applications
City, New York Open Data data via REST API
JSON-formatted response data
Freely accessible without authentication

Example Response

JSON Response
{
  "status": "success",
  "data": {
    "result": "Data from City, New York Open Data",
    "description": "New York (US) City Open Data",
    "timestamp": "2025-01-15T10:00:00Z"
  }
}

Field Reference

unique_key Unique identifier for each record in the dataset.
created_date ISO 8601 timestamp of when the record was created.
complaint_type Category of the 311 complaint or service request.
status Current status of the request (e.g., Open, Closed).
borough New York City borough where the issue was reported.

Implementation Example

const url = "https://opendata.cityofnewyork.us/";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

403 Forbidden / throttled Unauthenticated requests have a lower rate limit on the Socrata API.
Register for a free app token at data.cityofnewyork.us and pass it as the X-App-Token header to increase your limit.
Empty array response The filter condition returns no matching rows.
Double-check your filter syntax (SoQL) and test with no filter first to confirm the dataset has data.
400 Invalid SoQL Incorrect SoQL query syntax in the or parameter.
Refer to the Socrata SoQL documentation and ensure field names match exactly—they are case-sensitive.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 20/20
🔒 Security 15/15
🛠 Developer XP 15/20
✓ Reliability 7/15
Response Time 169ms

Fully tested on Apr 5, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS UNKNOWN
Category Government
Difficulty Beginner
Verified: 2026-04-04

Similar APIs

View All →