# FBI Crime Data Scraper (`parseforge/fbi-crime-data-scraper`) Actor

Scrapes FBI Uniform Crime Reporting statistics by year and optional state. Returns offense type, reported count, clearance rate, and submitting agency for each record.

- **URL**: https://apify.com/parseforge/fbi-crime-data-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Other, News, Developer tools
- **Stats:** 3 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $19.00 / 1,000 results

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/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

[![ParseForge](https://raw.githubusercontent.com/ParseForge/apify-assets/main/banner.jpg)](https://apify.com/parseforge?fpr=vmoqkp)

### FBI Crime Data Scraper

**Scrape official FBI crime statistics and incident counts for any US state, year by year, up to a million records per run.** Every row returns the offense type, reported count, clearance rate, and the agency that submitted it. Export to CSV, JSON, Excel, or XML.

The FBI's Crime Data Explorer holds decades of national crime statistics, but browsing it means clicking through state and agency pages one at a time. This Actor reads the public data feeds directly, so you can pull multi-year trends for a single state or the entire country in one run. It returns each record in a flat, consistent schema ready for analysis.

| Who uses it | What they scrape FBI Crime Data Explorer for |
|---|---|
| Crime analysts | Build multi-year trend lines for violent and property crime across jurisdictions. |
| Journalists | Pull official FBI numbers for a state or city to back a data-driven story. |
| Academic researchers | Gather a clean dataset of reported offenses for criminology or public-policy papers. |
| Insurance underwriters | Assess regional crime risk by comparing five-year offense trends per agency. |

### What it does

This Actor collects crime statistics from the FBI Crime Data Explorer by year and optional state, and returns each offense count as a flat row.

- 🗺️ **State filter:** limit results to a single US state or territory with its two-letter abbreviation, or leave blank for all states.
- 📅 **Year range:** set a from-year and to-year between 1985 and 2022 to capture exactly the window you need.
- 📊 **Offense-level detail:** each row names the offense category, the count reported, and the submitting law enforcement agency.
- 📁 **Flat export:** every record lands in a fixed schema, ready for CSV, JSON, Excel, or XML export.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

### What you can do with FBI Crime Data Explorer data

**📈 Track crime trends over decades.**

A crime analyst pulls every year from 1985 to 2022 for California and plots violent-crime rates to brief a state task force.

**🗞️ Fact-check a local crime story.**

A reporter scrapes five years of burglary data for their city's police department and compares it against the chief's public statements.

**🎓 Build a research dataset.**

A criminology PhD student collects all-agency, all-state data for 2000-2020 to study the correlation between poverty and property crime.

**🏢 Evaluate regional risk.**

An insurance analyst pulls ten years of larceny and motor-vehicle theft counts for three states to adjust regional premium models.

### Why choose this scraper

|  | What you get |
|---|---|
| **Offense type** | The category of crime reported, such as aggravated assault or burglary. |
| **Reported count** | The number of incidents recorded for that offense in that year. |
| **Clearance rate** | The percentage of cases closed by arrest or exceptional means. |
| **Agency name** | The law enforcement agency that submitted the data. |

### How it compares

No other Store actor targets FBI Crime Data Explorer the same way, so the honest comparison is with the alternatives teams actually weigh.

| | FBI Crime Data Scraper | Build it in-house | By hand |
|---|---|---|---|
| Setup | Run it now, zero config | Days of engineering | None, but hours per pull |
| When FBI Crime Data Explorer changes | Maintained for you | You fix it | You re-learn the page |
| Proxies, retries, anti-bot | Built in | Your problem | Browser only |
| Output | Fixed JSON schema, CSV/Excel export | Whatever you build | Copy-paste |
| Cost | Pay per result | Engineering time | Analyst hours |

### Configure the run

Drive the Actor with a year range and an optional two-letter state abbreviation. Filters run as each record is read, so only the years and state you specify reach your dataset. The Input tab lists every parameter.

A first run with the defaults:

```json
{
  "maxItems": 10,
  "fromYear": 2015,
  "toYear": 2022
}
```

A larger pull:

```json
{
  "maxItems": 200,
  "fromYear": 2015,
  "toYear": 2022
}
```

### Pricing

Pay-per-result: **$0.021 per result** collected. You pay only for the results written to your dataset.

| Results collected | Approximate cost |
|---|---|
| 100 results | $2.10 |
| 1,000 results | $21.00 |
| 10,000 results | $210.00 |

New Apify accounts start with $5 in free credit.

### Free users

Free-plan runs return up to 10 results as a preview. [Upgrade your Apify plan](https://console.apify.com/sign-up?fpr=vmoqkp) to collect up to 1,000,000 results per run.

### Run it

1. [Create a free Apify account with $5 in credit](https://console.apify.com/sign-up?fpr=vmoqkp).
2. Open the [FBI Crime Data Scraper](https://apify.com/parseforge/fbi-crime-data-scraper?fpr=vmoqkp).
3. Set your inputs and any filters, then click **Start**.
4. Export the results as CSV, Excel, JSON, or XML from the **Dataset** tab.

Run it programmatically through the [Apify API](https://docs.apify.com/api/v2) (`run-sync-get-dataset-items`) or the [ApifyClient](https://docs.apify.com/api/client/js) for JavaScript and Python.

### Use with AI agents (MCP)

Give an AI agent live access to FBI Crime Data Explorer through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

```bash
claude mcp add --transport http apify "https://mcp.apify.com/?tools=parseforge/fbi-crime-data-scraper"
```

Then prompt it in plain language to run the scraper and read back the results.

### Troubleshooting

**Why am I getting no results?**

Check that your from-year and to-year are within 1985-2022 and that from-year is not later than to-year. If you entered a state abbreviation, verify it is a valid two-letter USPS code. Try running without the state filter first to confirm data is available.

**The run is taking too long or timing out.**

A full national pull across many years can produce a large number of records. Lower your maxItems or narrow the year range. You can also split the work into multiple runs, one state at a time.

**Some years return fewer records than expected.**

Not all agencies reported data in every year, and the FBI's coverage grew over time. Early years in the 1980s may have sparser data. This is a property of the source, not the scraper.

**The state abbreviation I entered is not working.**

Use the standard two-letter USPS abbreviation with no spaces or punctuation. For example, 'CA' works; 'California' or 'Ca.' do not. The input is case-insensitive.

**My dataset has duplicate rows.**

The Actor returns one row per offense category per agency per year. If you see duplicates, check whether you ran the same query twice. You can deduplicate in your analysis tool using the agency, year, and offense columns.

### FAQ

| Question | Answer |
|---|---|
| What years of FBI crime data are available? | The FBI Crime Data Explorer provides data from 1985 through 2022. Set the from-year and to-year inputs to any range within that window. |
| Can I get data for a single city or county? | The Actor returns records at the agency level, which includes city police departments and county sheriff's offices. Filter by state first, then isolate the agency you want in your output. |
| What offense categories does the data include? | It covers all Uniform Crime Reporting (UCR) Part I offenses: violent crimes like homicide, rape, robbery, and aggravated assault, plus property crimes like burglary, larceny, and motor vehicle theft. |
| Does this Actor require an FBI API key? | No. It reads the public data feeds from the FBI Crime Data Explorer website. No registration, no API key, and no authentication are needed. |
| How many records can I collect in one run? | You can set the maximum records up to 1,000,000 per run. A full national pull for a single year can be large, so start with a small maxItems to test your query. |
| What is the output format? | The Actor returns a flat dataset you can export as CSV, JSON, Excel, or XML directly from your Apify run. |
| Can I get clearance rates along with offense counts? | Yes. Each record includes the number of reported offenses and the clearance count, so you can calculate or use the clearance rate directly. |
| Does this cover NIBRS data or only summary UCR? | The Actor pulls from the FBI's summary reporting system, which covers the traditional UCR Part I offenses. NIBRS incident-level data is not included in this feed. |
| How do I specify a state? | Use the two-letter postal abbreviation in the stateAbbr input field. For example, enter 'TX' for Texas or 'NY' for New York. Leave it blank to scrape all states. |
| Is the data updated when the FBI releases new years? | The Actor reads whatever the FBI has published on the Crime Data Explorer. When a new year appears on the site, you can set your to-year input to include it. |

### Related actors

Browse the full [ParseForge collection](https://apify.com/parseforge?fpr=vmoqkp) for more scrapers.

🆘 **Need help?** Email parseforge@protonmail.com with your run ID, your input, and what you expected.

⚠️ **Disclaimer.** This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by Federal Bureau of Investigation. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

# Actor input Schema

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

How many records to collect per run.

## `fromYear` (type: `integer`):

Start year for crime data (data available from 1985).

## `toYear` (type: `integer`):

End year for crime data (data available through 2022).

## `stateAbbr` (type: `string`):

Two-letter state abbreviation to filter results (e.g. CA for California). Leave blank for all states.

## Actor input object example

```json
{
  "maxItems": 10,
  "fromYear": 2015,
  "toYear": 2022
}
```

# Actor output Schema

## `results` (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,
    "fromYear": 2015,
    "toYear": 2022
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/fbi-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 = {
    "maxItems": 10,
    "fromYear": 2015,
    "toYear": 2022,
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/fbi-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 '{
  "maxItems": 10,
  "fromYear": 2015,
  "toYear": 2022
}' |
apify call parseforge/fbi-crime-data-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parseforge/fbi-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/CnwcoPcLEHE1YqDsc/builds/vvOQey2yMcrO4yfy9/openapi.json
