# Chicago Open Data Portal Scraper (`parseforge/data-cityofchicago-scraper`) Actor

Export records from any City of Chicago Open Data Portal dataset. Browse catalog or pull rows by resource ID with filters and full-text search. Permits, crimes, businesses, transit, budget, salaries, 311, parks, and 600+ public datasets.

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

## Pricing

from $15.00 / 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)

## 🏙️ Chicago Open Data Portal Scraper

> 🚀 **Export any City of Chicago dataset in seconds.** Browse the catalog of **600+ public datasets** or pull rows from food inspections, crimes, 311 requests, permits, business licenses, salaries, and more. Filter with native SoQL.

> 🕒 **Last updated:** 2026-05-22 · **📊 13 fields** per record · **🏙️ 600+ datasets** · **🏛️ Official City of Chicago source** · **🔎 SoQL filtering**

The **Chicago Open Data Portal Scraper** taps `data.cityofchicago.org`, the official Socrata-powered open-data hub of the City of Chicago. The Actor returns **13 structured fields per record**, including the resource ID, dataset name, description, category, creation and update timestamps, row and column counts, the row payload itself, the dataset URL, and a collection timestamp.

The catalog covers **more than 600 public datasets** across food inspections, crimes 2001-present, 311 service requests, building permits, business licenses, employee salaries, transit ridership, traffic crashes, parks, COVID indicators, budget appropriations, and dozens of other domains. This Actor wraps Socrata's SoQL query language so you can filter, sort, search, and project columns without touching the API directly.

| 🎯 Target Audience | 💡 Primary Use Cases |
|---|---|
| Urban planners, journalists, civic-tech developers, researchers, transparency advocates, local-government analysts, public-health teams | Crime trend analysis, restaurant inspection dashboards, 311 monitoring, permit-issuance studies, business-license intelligence, salary transparency, civic-tech apps |

---

### 📋 What the Chicago Open Data Portal Scraper does

Two modes in a single Actor:

- 📚 **Catalog mode.** Browse the full City of Chicago dataset catalog with names, descriptions, categories, and metadata.
- 📊 **Dataset mode.** Pull rows from any dataset by its 4x4 resource ID (e.g. `22u3-xenr` Building Violations, `ijzp-q8t2` Crimes 2001-Present).
- 🧮 **Column filters.** Pass `{"violation_status": "OPEN"}` for simple equality filters.
- 🔎 **SoQL WHERE clause.** Native SoQL expression for advanced filtering (`violation_date > '2024-01-01' AND ward = '42'`).
- 🔤 **Full-text search.** Apply a `$q` query across all columns.
- 🎯 **Field selection.** Return only the columns you need with `selectFields`.
- 📐 **Ordering.** Sort by any column (`violation_date DESC`).

Each record bundles either the catalog metadata or one row of the chosen dataset, alongside the resource ID, dataset URL, and a collection timestamp.

> 💡 **Why it matters:** Chicago has been one of the most ambitious municipal open-data programs in the U.S. since 2010. Hand-coding a Socrata client means dealing with pagination, polling, SoQL quirks, and per-dataset schemas. This Actor delivers consistent records you can pipe straight into BI tools, notebooks, or civic-tech apps.

---

### 🎬 Full Demo

_🚧 Coming soon: a 3-minute walkthrough showing how to go from sign-up to a downloaded 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>mode</code></td><td>enum</td><td><code>"dataset"</code></td><td><code>catalog</code> lists all datasets. <code>dataset</code> pulls rows by resource ID.</td></tr>
<tr><td><code>resourceId</code></td><td>string</td><td><code>"22u3-xenr"</code></td><td>4x4 resource ID for the dataset. Required for <code>dataset</code> mode.</td></tr>
<tr><td><code>filters</code></td><td>object</td><td><code>{}</code></td><td>Optional column-equality filters as key/value pairs.</td></tr>
<tr><td><code>where</code></td><td>string</td><td><code>""</code></td><td>Optional SoQL <code>$where</code> expression.</td></tr>
<tr><td><code>searchQuery</code></td><td>string</td><td><code>""</code></td><td>Optional <code>$q</code> full-text search query.</td></tr>
<tr><td><code>selectFields</code></td><td>string</td><td><code>""</code></td><td>Optional comma-separated column list.</td></tr>
<tr><td><code>orderBy</code></td><td>string</td><td><code>""</code></td><td>Optional sort expression.</td></tr>
</tbody>
</table>

**Example: pull recent open building violations in Ward 42.**

```json
{
    "maxItems": 100,
    "mode": "dataset",
    "resourceId": "22u3-xenr",
    "filters": { "violation_status": "OPEN", "ward": "42" },
    "orderBy": "violation_date DESC"
}
````

**Example: browse the full catalog of Chicago datasets.**

```json
{
    "maxItems": 200,
    "mode": "catalog"
}
```

> ⚠️ **Good to Know:** Chicago's open-data portal applies polite rate limits to anonymous callers. The Actor paces requests automatically so larger pulls run without 429 errors.

***

### 📊 Output

Each record contains **13 fields**. Download the dataset as CSV, Excel, JSON, or XML.

#### 🧾 Schema

| Field | Type | Example |
|---|---|---|
| 🏷️ `recordType` | string | `"row"` |
| 🆔 `resourceId` | string | `"22u3-xenr"` |
| 📛 `name` | string | null | `"Building Violations"` |
| 📝 `description` | string | null | `"Building code violations cited by City of Chicago inspectors..."` |
| 🗂️ `category` | string | null | `"Buildings"` |
| 🕒 `updatedAt` | ISO 8601 | null | `"2026-05-20T09:00:00.000Z"` |
| 🕒 `createdAt` | ISO 8601 | null | `"2011-09-30T00:00:00.000Z"` |
| 📊 `rowsCount` | integer | null | `3850000` |
| 📐 `columnsCount` | integer | null | `22` |
| 📦 `data` | object | null | `{ "violation_status": "OPEN", "ward": "42", ... }` |
| 🔗 `url` | string | `"https://data.cityofchicago.org/resource/22u3-xenr"` |
| 🕓 `scrapedAt` | ISO 8601 | `"2026-05-22T00:00:00.000Z"` |
| ⚠️ `error` | string | null | `null` |

#### 📦 Sample records

<details>
<summary><strong>📚 Catalog entry: Building Violations</strong></summary>

```json
{
    "recordType": "dataset",
    "resourceId": "22u3-xenr",
    "name": "Building Violations",
    "description": "Building code violations cited by City of Chicago inspectors against properties since 2006.",
    "category": "Buildings",
    "updatedAt": "2026-05-20T09:00:00.000Z",
    "createdAt": "2011-09-30T00:00:00.000Z",
    "rowsCount": 3850000,
    "columnsCount": 22,
    "data": null,
    "url": "https://data.cityofchicago.org/resource/22u3-xenr",
    "scrapedAt": "2026-05-22T00:00:00.000Z"
}
```

</details>

<details>
<summary><strong>📊 Dataset row: Open violation in Ward 42</strong></summary>

```json
{
    "recordType": "row",
    "resourceId": "22u3-xenr",
    "name": null,
    "description": null,
    "category": null,
    "updatedAt": null,
    "createdAt": null,
    "rowsCount": null,
    "columnsCount": null,
    "data": {
        "id": "12345678",
        "violation_date": "2026-05-15T00:00:00.000",
        "violation_code": "CN196029",
        "violation_status": "OPEN",
        "address": "100 N STATE ST",
        "ward": "42",
        "inspector_id": "INS-1234",
        "latitude": "41.883",
        "longitude": "-87.628"
    },
    "url": "https://data.cityofchicago.org/resource/22u3-xenr",
    "scrapedAt": "2026-05-22T00:00:00.000Z"
}
```

</details>

***

### ✨ Why choose this Actor

| | Capability |
|---|---|
| 🏙️ | **Official source.** Direct from the City of Chicago open-data hub. |
| 📚 | **Catalog + dataset modes.** Discover datasets, then pull rows in the same workflow. |
| 🔎 | **Full SoQL.** Filters, WHERE, full-text search, select, and order pass through to the source. |
| 📊 | **600+ datasets.** Crime, food, 311, permits, licenses, salaries, transit, parks, COVID, budget. |
| ⚡ | **Fast.** Catalog browse in seconds, dataset rows in under a minute for typical pulls. |
| 🔁 | **Always fresh.** Every run hits the live Chicago feed. |
| 🚫 | **No API key.** Public Chicago Socrata endpoints need no token. |

> 📊 Chicago's open-data program is one of the most-used municipal data resources in North America, powering academic research, journalism, and civic-tech apps.

***

### 📈 How it compares to alternatives

| Approach | Cost | Coverage | Refresh | Filters | Setup |
|---|---|---|---|---|---|
| **⭐ Chicago Open Data Portal Scraper** *(this Actor)* | $5 free credit, then pay-per-use | **600+ datasets** | **Live per run** | SoQL filter, where, q, select, order | ⚡ 2 min |
| Manual CSV downloads from portal | Free | Per-dataset | Manual | None | 🐢 Hours per dataset |
| Hand-coded Socrata client | Free | Full | Per-build | Custom | ⏳ Days |
| Commercial municipal-data aggregators | $$$/year | Curated subsets | Vendor schedule | Vendor-defined | 🕒 Sales cycle |

Pick this Actor when you want the authoritative source, SoQL filtering, and zero pipeline maintenance.

***

### 🚀 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 Chicago Open Data Portal Scraper page on the Apify Store.
3. 🎯 **Set input.** Run catalog mode to discover datasets, then dataset mode with a `resourceId`.
4. 🚀 **Run it.** Click **Start** and let the Actor collect your data.
5. 📥 **Download.** Grab your results in 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">

#### 🏛️ Civic tech and government

- 311 service-request dashboards and SLAs
- Permit-issuance trend analysis for housing
- Open-budget tracking and accountability tools
- Transparency portals on public salaries

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

#### 📰 Journalism and research

- Crime-trend analyses for newsroom investigations
- Restaurant-inspection feeds for local-news apps
- Election-cycle reporting on ward-level data
- Long-form research on neighbourhood inequality

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

#### 🏙️ Urban planning and real estate

- Building-violation hot-spot mapping
- Business-license density for site selection
- Traffic and crash analysis for road design
- Park and amenity feeds for neighbourhood scores

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

#### 🏥 Public health and safety

- Food-inspection compliance dashboards
- COVID-indicator monitoring and modelling
- 911/911-alt response-time analysis
- Environmental and pollution tracking

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

***

### 🔌 Automating Chicago Open Data Portal 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 or daily refreshes keep downstream dashboards in sync automatically.

***

### 🌟 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

- Theses on urban inequality, mobility, or housing
- Reproducible studies with cited dataset versions
- Teaching datasets for data-journalism courses
- Cross-city comparisons mixing Chicago with peer feeds

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

#### 🎨 Personal and creative

- Side projects exploring Chicago neighbourhoods
- Visualization projects on crime, transit, or weather
- Data art pieces using public records
- Local-history projects with archival data

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

#### 🤝 Non-profit and civic

- Community-organization advocacy tools
- Tenant-rights apps using building violations
- Local-government accountability platforms
- Citizen-science projects on environmental data

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

#### 🧪 Experimentation

- Train forecasting models on Chicago crime or 311
- Test civic-tech product hypotheses with real records
- Prototype agent pipelines that answer city questions
- Build LLM-grounded urban assistants with cited rows

</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%20Chicago%20Open%20Data%20Portal%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%20Chicago%20Open%20Data%20Portal%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%20Chicago%20Open%20Data%20Portal%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%20Chicago%20Open%20Data%20Portal%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 catalog or dataset mode, set a `resourceId` and optional SoQL filters, click Start, and the Actor pulls live records from the Chicago open-data hub. No browser automation, no captchas, no setup.

#### 📏 How accurate is the data?

Records mirror the live Chicago feed at run time. The City of Chicago publishes data directly from the source systems of each department, with documented refresh cadence per dataset.

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

Different datasets have different refresh cadences. Crime is daily, food inspections weekly, 311 near-real-time, permits weekly. The `updatedAt` field on each catalog entry tells you when the underlying dataset last changed.

#### 🆔 Where do I find the resource ID?

Every Chicago dataset has a 4x4 ID (e.g. `22u3-xenr`) visible in its URL on `data.cityofchicago.org`. You can also run catalog mode to list every dataset alongside its ID.

#### ⏰ Can I schedule regular runs?

Yes. Use Apify Schedules to run this Actor on any cron interval (hourly, daily, weekly) and keep a downstream dashboard in sync.

#### ⚖️ Is this data legal to use?

The City of Chicago publishes its open data under permissive terms. Review the specific dataset disclaimer for any usage limits, but most reuse is permitted.

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

Yes. Chicago open data may be used for commercial purposes with attribution. You are responsible for complying with the portal terms and with any downstream regulatory requirements.

#### 💳 Do I need a paid Apify plan to use this Actor?

No. The free Apify plan is enough for testing and small runs (10 records per run). A paid plan lifts the limit and gives you access to scheduling, higher concurrency, and larger datasets.

#### 🔁 What happens if a run fails or gets interrupted?

Apify automatically retries transient errors. If a run still fails, you can inspect the log in the Runs tab, fix the input, and re-run. Partial datasets from failed runs are preserved so you never lose progress.

#### 🆘 What if I need help?

Our support team is here to help. Contact us through the Apify platform or use the Tally form linked below.

***

### 🔌 Integrate with any app

Chicago Open Data Portal 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 Chicago 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 Chicago data into your product backend, or alert your team in Slack.

***

### 🔗 Recommended Actors

- [**🇳🇱 Dutch CBS Statistics Scraper**](https://apify.com/parseforge/dutch-cbs-statistics-scraper) - Official Netherlands statistics
- [**📈 Indexmundi Scraper**](https://apify.com/parseforge/indexmundi-scraper) - Global demographic and economic indicators
- [**🗺️ Nominatim OSM Scraper**](https://apify.com/parseforge/nominatim-osm-scraper) - Geocode Chicago addresses via OpenStreetMap
- [**🌐 World Bank Open Data Scraper**](https://apify.com/parseforge/world-bank-scraper) - Cross-country indicators
- [**🌦️ NOAA Weather Scraper**](https://apify.com/parseforge/noaa-weather-scraper) - U.S. weather observations and forecasts

> 💡 **Pro Tip:** browse the complete [ParseForge collection](https://apify.com/parseforge) for more 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 Chicago, Socrata, Tyler Technologies, or any government body. All trademarks mentioned are the property of their respective owners. Only publicly available open data is collected.

# Actor input Schema

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

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

## `mode` (type: `string`):

catalog = browse all available Chicago datasets (returns IDs, names, descriptions). dataset = pull rows from one specific dataset by its resource ID.

## `resourceId` (type: `string`):

Chicago dataset resource ID (4x4 format, e.g. '22u3-xenr' for Building Violations, 'ijzp-q8t2' for Crimes, '6zsd-86xi' for Crimes 2001-Present). Required when mode is 'dataset'. Find IDs via 'catalog' mode.

## `filters` (type: `object`):

Optional column-equality filters as key/value pairs. Example: {"violation\_status":"OPEN","ward":"42"}.

## `where` (type: `string`):

Optional SoQL $where expression for advanced filtering. Example: "violation\_date > '2024-01-01' AND ward = '42'".

## `searchQuery` (type: `string`):

Optional $q full-text search query applied across all columns.

## `selectFields` (type: `string`):

Optional comma-separated column list ($select). Example: 'id,violation\_date,ward,violation\_status'.

## `orderBy` (type: `string`):

Optional sort expression ($order). Example: 'violation\_date DESC'.

## Actor input object example

```json
{
  "maxItems": 10,
  "mode": "dataset",
  "resourceId": "22u3-xenr"
}
```

# 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,
    "mode": "dataset",
    "resourceId": "22u3-xenr"
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/data-cityofchicago-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,
    "mode": "dataset",
    "resourceId": "22u3-xenr",
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/data-cityofchicago-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,
  "mode": "dataset",
  "resourceId": "22u3-xenr"
}' |
apify call parseforge/data-cityofchicago-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Chicago Open Data Portal Scraper",
        "description": "Export records from any City of Chicago Open Data Portal dataset. Browse catalog or pull rows by resource ID with filters and full-text search. Permits, crimes, businesses, transit, budget, salaries, 311, parks, and 600+ public datasets.",
        "version": "1.0",
        "x-build-id": "nN7xYb987YLTkMLcM"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/parseforge~data-cityofchicago-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-parseforge-data-cityofchicago-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~data-cityofchicago-scraper/runs": {
            "post": {
                "operationId": "runs-sync-parseforge-data-cityofchicago-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~data-cityofchicago-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-parseforge-data-cityofchicago-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"
                    },
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "catalog",
                            "dataset"
                        ],
                        "type": "string",
                        "description": "catalog = browse all available Chicago datasets (returns IDs, names, descriptions). dataset = pull rows from one specific dataset by its resource ID."
                    },
                    "resourceId": {
                        "title": "Resource ID",
                        "type": "string",
                        "description": "Chicago dataset resource ID (4x4 format, e.g. '22u3-xenr' for Building Violations, 'ijzp-q8t2' for Crimes, '6zsd-86xi' for Crimes 2001-Present). Required when mode is 'dataset'. Find IDs via 'catalog' mode."
                    },
                    "filters": {
                        "title": "Column Filters",
                        "type": "object",
                        "description": "Optional column-equality filters as key/value pairs. Example: {\"violation_status\":\"OPEN\",\"ward\":\"42\"}."
                    },
                    "where": {
                        "title": "SoQL WHERE Clause",
                        "type": "string",
                        "description": "Optional SoQL $where expression for advanced filtering. Example: \"violation_date > '2024-01-01' AND ward = '42'\"."
                    },
                    "searchQuery": {
                        "title": "Full-Text Search",
                        "type": "string",
                        "description": "Optional $q full-text search query applied across all columns."
                    },
                    "selectFields": {
                        "title": "Select Fields",
                        "type": "string",
                        "description": "Optional comma-separated column list ($select). Example: 'id,violation_date,ward,violation_status'."
                    },
                    "orderBy": {
                        "title": "Order By",
                        "type": "string",
                        "description": "Optional sort expression ($order). Example: 'violation_date DESC'."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
