# NYC 311 Service Requests Scraper (`parseforge/nyc-311-service-requests-scraper`) Actor

Export NYC 311 service request records from the official NYC Open Data feed. Filter by complaint type, agency, borough, status, or date range. Pull complaint type, descriptor, agency, opened and closed timestamps, status, resolution, full address, borough, ZIP, location coordinates and more.

- **URL**: https://apify.com/parseforge/nyc-311-service-requests-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Business, Other, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.75 / 1,000 result items

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

![ParseForge Banner](https://github.com/ParseForge/apify-assets/blob/ad35ccc13ddd068b9d6cba33f323962e39aed5b2/banner.jpg?raw=true)

## 🗽 NYC 311 Service Requests Scraper

> 🚀 **Export NYC 311 service requests in seconds.** Pull from the **30M+ record** official New York City Open Data feed by complaint type, agency, borough, status, ZIP, or date range. Get the full incident record with **44 fields per row** including coordinates, address, agency assignment, opened and closed timestamps, status, and resolution. No login required.

> 🕒 **Last updated:** 2026-05-21 · **📊 44 fields** per record · **🗽 30M+ total records** · **🌆 5 boroughs** · **🏛️ 19 city agencies**

The **NYC 311 Service Requests Scraper** taps into the official New York City Open Data feed for 311 complaints and service requests, the same dataset published by NYC OpenData and used by urban analysts, journalists, and city government dashboards. The Actor returns up to **44 fields per record**, including the complaint type and descriptor, the responding agency, the full incident address (street, cross streets, intersection, landmark, ZIP, borough), state-plane and WGS-84 coordinates, opened and closed timestamps, status, due date, and resolution description.

Coverage spans **all five boroughs**, every public-facing complaint type, and **19 responding city agencies** including NYPD, HPD, DOT, DSNY, DEP, DOB, DOHMH, DPR, and more. The underlying dataset goes back over a decade and is refreshed continuously by the City of New York.

| 🎯 Target Audience | 💡 Primary Use Cases |
|---|---|
| Urban analysts, civic-tech teams, journalists, real-estate platforms, policy researchers, smart-city vendors, neighborhood advocates | Noise-complaint heatmaps, rodent-sighting analysis, agency-response benchmarking, neighbourhood quality-of-life scoring, investigative journalism, real-estate due diligence |

---

### 📋 What the NYC 311 Service Requests Scraper does

One precise workflow with rich filters:

- 🚨 **Pull recent or historical 311 records** sorted by creation date (newest or oldest first).
- 🧰 **Filter by complaint type** (free-text, e.g. `Noise - Residential`, `HEAT/HOT WATER`, `Illegal Parking`).
- 🏛️ **Filter by responding agency** (19 enumerated NYC agencies).
- 🌆 **Filter by borough** (Manhattan, Brooklyn, Queens, Bronx, Staten Island).
- 🟢 **Filter by status** (Open, In Progress, Closed, Pending, Assigned, Started, Email Sent, Unspecified).
- 📅 **Filter by opened-date range** (`openedFrom` and `openedTo`).
- 📮 **Filter by ZIP code** for hyper-local analysis.

Each record includes location-resolved fields (lat/lon, state-plane X/Y, community board, BBL), opened and closed timestamps, due date, status progression, and the city's official resolution text.

> 💡 **Why it matters:** NYC 311 data is the canonical pulse of city life: noise, sanitation, housing, transit, and infrastructure complaints. Joining it to property data, demographic layers, or transit lines produces some of the most cited civic analytics anywhere in the United States.

---

### 🎬 Full Demo

_🚧 Coming soon: a 3-minute walkthrough showing how to go from sign-up to a downloaded 311 dataset._

---

### ⚙️ Input

<table>
<thead>
<tr><th>Input</th><th>Type</th><th>Default</th><th>Behavior</th></tr>
</thead>
<tbody>
<tr><td><code>maxItems</code></td><td>integer</td><td><code>10</code></td><td>Records to return. Free plan caps at 10, paid plan at 1,000,000.</td></tr>
<tr><td><code>complaintType</code></td><td>string</td><td><code>""</code></td><td>Filter to a specific complaint type (free text).</td></tr>
<tr><td><code>agency</code></td><td>enum</td><td>Any</td><td>One of 19 NYC agency codes (NYPD, HPD, DOT, DSNY, DEP, DOB, etc.).</td></tr>
<tr><td><code>borough</code></td><td>enum</td><td>Any</td><td>One of the 5 boroughs.</td></tr>
<tr><td><code>status</code></td><td>enum</td><td>Any</td><td>Open, In Progress, Closed, Pending, Assigned, Started, Email Sent, Unspecified.</td></tr>
<tr><td><code>openedFrom</code></td><td>string</td><td><code>""</code></td><td>Earliest creation date (YYYY-MM-DD).</td></tr>
<tr><td><code>openedTo</code></td><td>string</td><td><code>""</code></td><td>Latest creation date (YYYY-MM-DD).</td></tr>
<tr><td><code>zip</code></td><td>string</td><td><code>""</code></td><td>Incident ZIP code.</td></tr>
<tr><td><code>sortOrder</code></td><td>enum</td><td><code>"newest"</code></td><td>Order by creation date: newest first or oldest first.</td></tr>
</tbody>
</table>

**No login required.** This Actor works against the city's public open-data feed straight away.

**Example: latest 100 noise complaints in Manhattan.**

```json
{
    "maxItems": 100,
    "complaintType": "Noise - Residential",
    "borough": "MANHATTAN",
    "sortOrder": "newest"
}
````

**Example: every illegal-parking complaint in Brooklyn during March 2026.**

```json
{
    "maxItems": 5000,
    "complaintType": "Illegal Parking",
    "borough": "BROOKLYN",
    "openedFrom": "2026-03-01",
    "openedTo": "2026-03-31"
}
```

> ⚠️ **Good to Know:** the city dataset is enormous (30M+ rows). Combining `borough`, `agency`, and a date range keeps result counts and run times manageable. For city-wide multi-year exports, expect runs that scale linearly with the requested record count.

***

### 📊 Output

Each record contains up to **44 fields**. Download as CSV, Excel, JSON, or XML.

#### 🧾 Schema

| Field | Type | Example |
|---|---|---|
| 🆔 `uniqueKey` | string | `"60123456"` |
| 🏷️ `complaintType` | string | `"Noise - Residential"` |
| 📝 `descriptor` | string | null | `"Loud Music/Party"` |
| 🏛️ `agency` | string | `"NYPD"` |
| 🏷️ `agencyName` | string | `"New York City Police Department"` |
| 🟢 `status` | string | `"Closed"` |
| 📝 `resolutionDescription` | string | null | `"The Police Department responded..."` |
| 🕒 `resolutionActionUpdatedDate` | ISO 8601 | null | `"2026-05-19T22:18:00.000"` |
| 🕒 `createdDate` | ISO 8601 | `"2026-05-19T21:54:00.000"` |
| 🕒 `closedDate` | ISO 8601 | null | `"2026-05-19T22:18:00.000"` |
| 🕒 `dueDate` | ISO 8601 | null | `"2026-05-20T05:54:00.000"` |
| 🏠 `locationType` | string | null | `"Residential Building/House"` |
| 📮 `incidentZip` | string | null | `"10025"` |
| 🏠 `incidentAddress` | string | null | `"123 W 100 ST"` |
| 🛣️ `streetName` | string | null | `"W 100 ST"` |
| 🛣️ `crossStreet1` | string | null | `"AMSTERDAM AVE"` |
| 🛣️ `crossStreet2` | string | null | `"COLUMBUS AVE"` |
| 🛣️ `intersectionStreet1` | string | null | `null` |
| 🛣️ `intersectionStreet2` | string | null | `null` |
| 🏷️ `addressType` | string | null | `"ADDRESS"` |
| 🏙️ `city` | string | null | `"NEW YORK"` |
| 📍 `landmark` | string | null | `null` |
| 🏢 `facilityType` | string | null | `null` |
| 🗳️ `communityBoard` | string | null | `"07 MANHATTAN"` |
| 🏷️ `bbl` | string | null | `"1018850001"` |
| 🌆 `borough` | string | `"MANHATTAN"` |
| 📍 `xCoordinate` | number | null | `993456` |
| 📍 `yCoordinate` | number | null | `228871` |
| 📍 `latitude` | number | null | `40.7964` |
| 📍 `longitude` | number | null | `-73.9692` |
| 🌳 `parkBorough` | string | null | `"MANHATTAN"` |
| 🌳 `parkFacilityName` | string | null | `null` |
| 🚖 `vehicleType` | string | null | `null` |
| 🚖 `taxiCompanyBorough` | string | null | `null` |
| 🚖 `taxiPickupLocation` | string | null | `null` |
| 🌉 `bridgeHighwayName` | string | null | `null` |
| 🌉 `bridgeHighwayDirection` | string | null | `null` |
| 🛣️ `roadRamp` | string | null | `null` |
| 🌉 `bridgeHighwaySegment` | string | null | `null` |
| 📡 `openDataChannelType` | string | null | `"PHONE"` |
| 🔗 `recordUrl` | string | null | `"https://portal.311.nyc.gov/sr-step/?id=60123456"` |
| 🕒 `scrapedAt` | ISO 8601 | `"2026-05-20T00:00:00.000Z"` |

#### 📦 Sample records

<details>
<summary><strong>🔊 Noise complaint, Manhattan (NYPD)</strong></summary>

```json
{
    "uniqueKey": "60123456",
    "complaintType": "Noise - Residential",
    "descriptor": "Loud Music/Party",
    "agency": "NYPD",
    "agencyName": "New York City Police Department",
    "status": "Closed",
    "resolutionDescription": "The Police Department responded to the complaint and a report was prepared.",
    "createdDate": "2026-05-19T21:54:00.000",
    "closedDate": "2026-05-19T22:18:00.000",
    "incidentAddress": "123 W 100 ST",
    "borough": "MANHATTAN",
    "incidentZip": "10025",
    "latitude": 40.7964,
    "longitude": -73.9692,
    "openDataChannelType": "PHONE",
    "scrapedAt": "2026-05-20T00:00:00.000Z"
}
```

</details>

<details>
<summary><strong>🏚️ HPD housing complaint, Brooklyn</strong></summary>

```json
{
    "uniqueKey": "60123789",
    "complaintType": "HEAT/HOT WATER",
    "descriptor": "ENTIRE BUILDING",
    "agency": "HPD",
    "agencyName": "Department of Housing Preservation and Development",
    "status": "Open",
    "createdDate": "2026-05-19T08:11:00.000",
    "dueDate": "2026-05-20T08:11:00.000",
    "incidentAddress": "456 BUSHWICK AVE",
    "borough": "BROOKLYN",
    "incidentZip": "11206",
    "latitude": 40.7011,
    "longitude": -73.9389,
    "openDataChannelType": "ONLINE",
    "scrapedAt": "2026-05-20T00:00:00.000Z"
}
```

</details>

<details>
<summary><strong>🚗 Illegal-parking sweep, Queens (DSNY)</strong></summary>

```json
{
    "uniqueKey": "60123901",
    "complaintType": "Illegal Parking",
    "descriptor": "Blocked Hydrant",
    "agency": "NYPD",
    "agencyName": "New York City Police Department",
    "status": "Closed",
    "createdDate": "2026-05-19T15:22:00.000",
    "closedDate": "2026-05-19T16:05:00.000",
    "incidentAddress": "78-12 ROOSEVELT AVE",
    "borough": "QUEENS",
    "incidentZip": "11372",
    "latitude": 40.7470,
    "longitude": -73.8870,
    "openDataChannelType": "MOBILE",
    "scrapedAt": "2026-05-20T00:00:00.000Z"
}
```

</details>

***

### ✨ Why choose this Actor

| | Capability |
|---|---|
| 🗽 | **Canonical city feed.** Pulls from NYC OpenData, the city's official open-data publication. |
| 🧰 | **Rich record shape.** Up to 44 fields including resolved address, coordinates, agency, status, due date, and resolution text. |
| 🎯 | **Multi-dimensional filtering.** Combine complaint type, agency, borough, ZIP, status, and date range in a single run. |
| 🔁 | **Always live.** Every run hits the current dataset, so brand-new complaints show up the same day they are filed. |
| 📦 | **Big-export ready.** Designed to paginate through millions of rows without hand-holding. |
| 🆓 | **No login.** No personal key, no signup loop, no quota juggling. |
| 🔗 | **Deep links.** Each record gets a clickable URL back to the official 311 portal. |

> 📊 NYC 311 data is the canonical proxy for urban quality-of-life research and city-government accountability.

***

### 📈 How it compares to alternatives

| Approach | Cost | Coverage | Refresh | Filters | Setup |
|---|---|---|---|---|---|
| **⭐ NYC 311 Scraper** *(this Actor)* | $5 free credit, then pay-per-use | **30M+** records, all boroughs | **Live per run** | type, agency, borough, status, ZIP, date | ⚡ 2 min |
| Hand-rolled NYC OpenData integration | Engineering time | Same data, custom shape | Whatever you build | Whatever you build | 🐢 Days |
| Static yearly CSV downloads | Free | Yearly snapshots | Stale | None | 🕒 Hours |
| Commercial civic-data vendors | Subscription | Aggregated, second-hand | Vendor-decided | Vendor schema | ⏳ Hours |

Pick this Actor when you want clean, filtered NYC 311 records without writing a pagination harness yourself.

***

### 🚀 How to use

1. 📝 **Sign up.** [Create a free account with $5 credit](https://console.apify.com/sign-up?fpr=vmoqkp) (takes 2 minutes).
2. 🌐 **Open the Actor.** Go to the NYC 311 Service Requests Scraper page on the Apify Store.
3. 🎯 **Set input.** Pick complaint type, agency, borough, date range, and `maxItems`.
4. 🚀 **Run it.** Click **Start** and let the Actor collect your data.
5. 📥 **Download.** Grab your results from the **Dataset** tab as CSV, Excel, JSON, or XML.

> ⏱️ Total time from signup to downloaded dataset: **3-5 minutes.** No coding required.

***

### 💼 Business use cases

<table>
<tr>
<td width="50%" valign="top">

#### 🏘️ Real estate & PropTech

- Neighbourhood quality-of-life scoring for listings
- Building-level complaint history for due diligence
- Heat & hot-water outage tracking for tenants
- Rodent-sighting overlays for renter search

</td>
<td width="50%" valign="top">

#### 🏛️ Civic tech & city government

- Agency-response time benchmarking dashboards
- Open-data accountability portals
- Complaint-type trend monitoring across boroughs
- Service-equity audits by community board

</td>
</tr>
<tr>
<td width="50%" valign="top">

#### 📰 Investigative journalism

- Noise-complaint clustering near nightlife districts
- Sanitation-service gaps in specific neighbourhoods
- Building-by-building rent-stabilised heat tracking
- Long-form data stories on city-life pressure points

</td>
<td width="50%" valign="top">

#### 🧪 Urban analytics & research

- Train ML models on geo-tagged complaint streams
- Correlate 311 volumes with weather or transit events
- Build interactive complaint heatmaps for the public
- Benchmark NYC against other open-311 cities

</td>
</tr>
</table>

***

### 🔌 Automating NYC 311 Service Requests Scraper

Control the scraper programmatically for scheduled runs and pipeline integrations:

- 🟢 **Node.js.** Install the `apify-client` NPM package.
- 🐍 **Python.** Use the `apify-client` PyPI package.
- 📚 See the [Apify API documentation](https://docs.apify.com/api/v2) for full details.

The [Apify Schedules feature](https://docs.apify.com/platform/schedules) lets you trigger this Actor on any cron interval. Hourly noise-complaint sweeps, daily borough digests, or weekly agency-response reports all run unattended.

***

### 🌟 Beyond business use cases

Data like this powers more than commercial workflows. The same structured records support research, education, civic projects, and personal initiatives.

<table>
<tr>
<td width="50%">

#### 🎓 Research and academia

- Urban-policy papers on service-equity gaps
- Sociology coursework on civic complaint patterns
- Public-health research correlating 311 with disease
- Reproducible datasets for urban-planning theses

</td>
<td width="50%">

#### 🎨 Personal and creative

- Personal "what is my block like?" dashboards
- Hobbyist data-visualisation portfolios
- Indie civic-tech apps and portfolio demos
- Block-association noise-trend reports

</td>
</tr>
<tr>
<td width="50%">

#### 🤝 Non-profit and civic

- Tenant-advocacy heat-complaint dashboards
- Community-board prep packs ahead of meetings
- Neighbourhood-resilience research on rodent control
- Open-data trainings for civic-tech bootcamps

</td>
<td width="50%">

#### 🧪 Experimentation

- Train complaint-classification ML models
- Prototype agent pipelines for citizen-services Q\&A
- Test geo-clustering algorithms on real urban data
- Validate civic-tech product hypotheses with real data

</td>
</tr>
</table>

***

### 🤖 Ask an AI assistant about this scraper

Open a ready-to-send prompt about this ParseForge actor in the AI of your choice:

- 💬 [**ChatGPT**](https://chat.openai.com/?q=How%20do%20I%20use%20the%20NYC%20311%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)
- 🧠 [**Claude**](https://claude.ai/new?q=How%20do%20I%20use%20the%20NYC%20311%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)
- 🔍 [**Perplexity**](https://perplexity.ai/search?q=How%20do%20I%20use%20the%20NYC%20311%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)
- 🅒 [**Copilot**](https://copilot.microsoft.com/?q=How%20do%20I%20use%20the%20NYC%20311%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)

***

### ❓ Frequently Asked Questions

#### 🧩 How does it work?

Pick your filters, set `maxItems`, and click Start. The Actor builds the query, paginates through the city's open-data feed in batches, normalises every row into a clean schema, and writes one record per service request into your dataset.

#### 🆓 Do I need a personal access key?

No. The NYC Open Data feed is open and free to use. You only need an Apify account to run the scraper.

#### 📅 How far back does the data go?

NYC has been publishing 311 records continuously for over a decade. The full historical archive is available with `openedFrom` and `openedTo` filters.

#### 🔁 How often is the dataset refreshed?

The city refreshes the feed continuously and the latest complaints typically appear within an hour of being filed. Every run of this Actor pulls live, so you always get current data.

#### 🏛️ Which agencies are covered?

19 enumerated agencies, including NYPD (police), HPD (housing), DOT (transportation), DSNY (sanitation), DEP (environmental protection), DOB (buildings), DOHMH (health), DPR (parks), DCA (consumer affairs), TLC (taxi), DHS (homeless services), ACS (children), DOE (education), DFTA (aging), EDC (economic development), FDNY (fire), HRA (human resources), OATH (admin trials), and NYCEM (emergency management).

#### 🌆 Can I filter by neighbourhood or community board?

The input form filters by borough and ZIP. Community board is included on every output record (`communityBoard` field) so you can post-filter or group downstream.

#### ⏰ Can I schedule daily or hourly runs?

Yes. Use Apify Schedules to trigger this Actor on any cron interval. Hourly noise-complaint feeds, daily borough digests, and weekly trend reports all run unattended.

#### 💼 Can I use this data commercially?

Yes. NYC 311 data is publicly released under an open-data license. Review the city's data-use terms for any attribution requirements and respect downstream privacy norms when republishing.

#### 💳 Do I need a paid Apify plan?

No. The free Apify plan covers testing and small runs (10 records per run). A paid plan lifts the cap and unlocks scheduling and higher concurrency.

#### 🔁 What happens if a run fails?

Apify retries transient errors automatically. Inspect the log in the Runs tab, adjust the input, and re-run. Partial datasets from failed runs are kept so you never lose progress.

#### 📦 What is the largest single run I can do?

Paid Apify plans cap each run at 1,000,000 records. For multi-million-row exports, split the workload across runs by date range.

#### 🆘 What if I need help?

Contact our support team through the Apify platform or the Tally form linked below.

***

### 🔌 Integrate with any app

NYC 311 Scraper connects to any cloud service via [Apify integrations](https://apify.com/integrations):

- [**Make**](https://docs.apify.com/platform/integrations/make) - Automate multi-step workflows
- [**Zapier**](https://docs.apify.com/platform/integrations/zapier) - Connect with 5,000+ apps
- [**Slack**](https://docs.apify.com/platform/integrations/slack) - Get run notifications in your channels
- [**Airbyte**](https://docs.apify.com/platform/integrations/airbyte) - Pipe 311 data into your warehouse
- [**GitHub**](https://docs.apify.com/platform/integrations/github) - Trigger runs from commits and releases
- [**Google Drive**](https://docs.apify.com/platform/integrations/drive) - Export datasets straight to Sheets

You can also use webhooks to trigger downstream actions when a run finishes. Push fresh 311 records into your civic-tech product, or alert your team in Slack when a building hits a complaint threshold.

***

### 🔗 Recommended Actors

- [**🗺️ Nominatim OSM Scraper**](https://apify.com/parseforge/nominatim-osm-scraper) - Geocode addresses via OpenStreetMap
- [**🏕️ Recreation.gov Campsites Scraper**](https://apify.com/parseforge/recreation-gov-campsites-scraper) - U.S. federal recreation catalogue
- [**🌤️ NOAA Weather Scraper**](https://apify.com/parseforge/noaa-weather-scraper) - U.S. weather forecasts and observations
- [**📍 Yelp Scraper**](https://apify.com/parseforge/yelp-scraper) - Local-business reviews and metadata
- [**🏛️ OpenCorporates Company Records Scraper**](https://apify.com/parseforge/opencorporates-companies-scraper) - Global corporate registry records

> 💡 **Pro Tip:** browse the complete [ParseForge collection](https://apify.com/parseforge) for more civic and reference-data scrapers.

***

**🆘 Need Help?** [**Open our contact form**](https://tally.so/r/BzdKgA) to request a new scraper, propose a custom data project, or report an issue.

***

> **⚠️ Disclaimer:** this Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by the City of New York, NYC OpenData, or any specific city agency. All trademarks mentioned are the property of their respective owners. Only publicly available open civic-data records are collected.

# Actor input Schema

## `maxItems` (type: `integer`):

Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000

## `complaintType` (type: `string`):

Filter records to a specific complaint type (e.g. Noise - Residential, HEAT/HOT WATER, Illegal Parking).

## `agency` (type: `string`):

Filter by responding city agency code.

## `borough` (type: `string`):

Restrict to a single borough.

## `status` (type: `string`):

Open, in-progress, or closed records.

## `openedFrom` (type: `string`):

Only records opened on or after this date.

## `openedTo` (type: `string`):

Only records opened on or before this date.

## `zip` (type: `string`):

Filter by incident ZIP code.

## `sortOrder` (type: `string`):

Order returned records by creation date.

## Actor input object example

```json
{
  "maxItems": 10,
  "sortOrder": "newest"
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "maxItems": 10,
    "sortOrder": "newest"
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/nyc-311-service-requests-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "maxItems": 10,
    "sortOrder": "newest",
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/nyc-311-service-requests-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "maxItems": 10,
  "sortOrder": "newest"
}' |
apify call parseforge/nyc-311-service-requests-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=parseforge/nyc-311-service-requests-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "NYC 311 Service Requests Scraper",
        "description": "Export NYC 311 service request records from the official NYC Open Data feed. Filter by complaint type, agency, borough, status, or date range. Pull complaint type, descriptor, agency, opened and closed timestamps, status, resolution, full address, borough, ZIP, location coordinates and more.",
        "version": "1.0",
        "x-build-id": "TUe86d6ubwfpPf91o"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/parseforge~nyc-311-service-requests-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-parseforge-nyc-311-service-requests-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/parseforge~nyc-311-service-requests-scraper/runs": {
            "post": {
                "operationId": "runs-sync-parseforge-nyc-311-service-requests-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/parseforge~nyc-311-service-requests-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-parseforge-nyc-311-service-requests-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "maxItems": {
                        "title": "Max Items",
                        "minimum": 1,
                        "maximum": 1000000,
                        "type": "integer",
                        "description": "Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000"
                    },
                    "complaintType": {
                        "title": "Complaint Type",
                        "type": "string",
                        "description": "Filter records to a specific complaint type (e.g. Noise - Residential, HEAT/HOT WATER, Illegal Parking)."
                    },
                    "agency": {
                        "title": "Agency",
                        "enum": [
                            "NYPD",
                            "HPD",
                            "DOT",
                            "DSNY",
                            "DEP",
                            "DOB",
                            "DOHMH",
                            "DPR",
                            "DCA",
                            "TLC",
                            "DHS",
                            "ACS",
                            "DOE",
                            "DFTA",
                            "EDC",
                            "FDNY",
                            "HRA",
                            "OATH",
                            "NYCEM"
                        ],
                        "type": "string",
                        "description": "Filter by responding city agency code."
                    },
                    "borough": {
                        "title": "Borough",
                        "enum": [
                            "MANHATTAN",
                            "BROOKLYN",
                            "QUEENS",
                            "BRONX",
                            "STATEN ISLAND"
                        ],
                        "type": "string",
                        "description": "Restrict to a single borough."
                    },
                    "status": {
                        "title": "Status",
                        "enum": [
                            "Open",
                            "In Progress",
                            "Closed",
                            "Pending",
                            "Assigned",
                            "Started",
                            "Email Sent",
                            "Unspecified"
                        ],
                        "type": "string",
                        "description": "Open, in-progress, or closed records."
                    },
                    "openedFrom": {
                        "title": "Opened From (YYYY-MM-DD)",
                        "type": "string",
                        "description": "Only records opened on or after this date."
                    },
                    "openedTo": {
                        "title": "Opened To (YYYY-MM-DD)",
                        "type": "string",
                        "description": "Only records opened on or before this date."
                    },
                    "zip": {
                        "title": "ZIP Code",
                        "type": "string",
                        "description": "Filter by incident ZIP code."
                    },
                    "sortOrder": {
                        "title": "Sort Order",
                        "enum": [
                            "newest",
                            "oldest"
                        ],
                        "type": "string",
                        "description": "Order returned records by creation date."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
