# Crime Data Scraper (US Cities) (`scrapemint/crime-data-scraper`) Actor

Official police incident data from US city open-data portals - Chicago, NYC, San Francisco, Seattle, Austin, Dallas - normalized to one row shape: date, offense, address, neighborhood, coordinates, arrest flag. Filter by crime type and date. Monitor mode for new incidents. No API key.

- **URL**: https://apify.com/scrapemint/crime-data-scraper.md
- **Developed by:** [Ken M](https://apify.com/scrapemint) (community)
- **Categories:** Business, News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 4.00 out of 5 stars

## Pricing

$3.00 / 1,000 incident rows

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## Crime Data Scraper (US Cities)

Official police incident data from US city open-data portals, normalized to one clean row shape across cities. Pick cities, optionally a crime type and date window, and get structured incidents with offense, location and arrest information. No API key, no login, no browser.

### Cities covered

- **Chicago, IL** - full incident feed, arrest flag included (publishes about a week behind)
- **New York City, NY** - NYPD complaints with felony/misdemeanor class (refreshed quarterly - use 90+ day windows)
- **San Francisco, CA** - incident reports with neighborhood and resolution (a day or two behind)
- **Seattle, WA** - NIBRS offenses with block address (a day or two behind)
- **Austin, TX** - incident reports (about a week behind; area-level location only)
- **Dallas, TX** - police incidents with address and coordinates (a day or two behind)

Every city is the police department's own published dataset - the same data behind the official crime dashboards.

### What you get

One row per incident:

- city, incident id, when it occurred (ISO timestamp)
- offense **category** and description, plus the **place type** (street, apartment, store...)
- block-level **address**, neighborhood/ward/district **area**, and **coordinates** where the city publishes them
- **arrest** flag and case status where available

```json
{
    "cities": ["chicago", "san_francisco"],
    "crimeType": "BURGLARY",
    "sinceDays": 30
}
```

### Monitor mode

Turn on **newOnly**, put the actor on a schedule, and each run emits only incidents it has not returned before - a fresh-incident feed for the cities and crime types you care about. Runs where nothing new arrived cost nothing.

### Who uses this

- **Real-estate investors and agents**: neighborhood-level incident history for due diligence, straight from the source instead of a $40 report.
- **Insurers and security companies**: risk signals and prospecting by area and offense type.
- **Journalists and researchers**: structured, citable incident data across major cities without per-portal wrangling.
- **Retail and operations teams**: monitor incidents around store locations.

Pairs with our Building Permit Leads and Restaurant Inspection Leads - the same city-data-as-signal family.

### Pricing

A small fee per incident row. Empty windows and unreachable city feeds are free note rows, and the first 2 rows of every run are free.

### Notes

- Sources are official city Socrata endpoints; each row carries its source dataset URL.
- Cities publish with a lag (noted per city above), and police departments revise records after initial publication. Incident data reflects reports, not convictions.
- Addresses are block-level as published by each city; some cities redact or generalize locations for privacy.
- Los Angeles is deliberately not included: its public dataset stopped updating in 2024.

# Actor input Schema

## `cities` (type: `array`):

Which cities to pull incidents from. Each city is its police department's official open-data feed.

## `crimeType` (type: `string`):

Only incidents whose offense category or description contains this text ("ASSAULT", "BURGLARY", "THEFT"). Case-insensitive. Leave empty for all incidents.

## `sinceDays` (type: `integer`):

Only incidents that occurred in the last N days. Cities publish with a lag: Seattle/SF/Dallas run a day or two behind, Chicago and Austin about a week, and NYC refreshes quarterly (use 90+ days there).

## `newOnly` (type: `boolean`):

Remember incidents already returned and emit only ones not seen before. Run on a schedule for a neighborhood or citywide new-incident feed - quiet runs cost nothing.

## `maxPerCity` (type: `integer`):

How many incidents to return per city, newest first.

## `maxRows` (type: `integer`):

Stop after this many rows in total.

## Actor input object example

```json
{
  "cities": [
    "chicago"
  ],
  "sinceDays": 14,
  "newOnly": false,
  "maxPerCity": 50,
  "maxRows": 500
}
```

# 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 = {
    "cities": [
        "chicago"
    ],
    "sinceDays": 14,
    "maxPerCity": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapemint/crime-data-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 = {
    "cities": ["chicago"],
    "sinceDays": 14,
    "maxPerCity": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("scrapemint/crime-data-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "cities": [
    "chicago"
  ],
  "sinceDays": 14,
  "maxPerCity": 50
}' |
apify call scrapemint/crime-data-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapemint/crime-data-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/0qKKYa8TTPvu7q0qk/builds/CSnLVI7lyjamr6Npj/openapi.json
