ParseForge Scrapers

Los Angeles Open Data Scraper

parseforge/la-open-data-scraper

BusinessDeveloper toolsAutomation

Scrapes any dataset from data.lacity.org by its 4x4 ID. Returns each row as a flat record with the dataset's native columns. Supports SoQL filtering, column selection, and full-text search.

Run this scraper See the API call
Total users
1
Monthly active
0
Total runs
118
Bookmarked
0
Rating
Not rated yet
Last modified
12 days ago

Overview

ParseForge

Los Angeles Open Data Scraper

Scrape any public dataset from data.lacity.org, from crime reports to building permits, up to a million rows per run. Every row arrives in a clean, flat schema ready for CSV, JSON, Excel, or XML export. No API key, no registration, no rate-limit headaches.

The City of Los Angeles publishes hundreds of civic datasets on its Socrata portal, but downloading them one by one through the browser is slow and manual. This actor reads the public API directly, so you can pull the exact rows you need from any dataset by its 4x4 ID. It handles pagination, column selection, and SoQL filtering for you, returning a single structured dataset every time.

Who uses it What they scrape Los Angeles Open Data for
Data journalists Pull the latest crime or traffic collision records for a story on neighborhood safety.
Urban planners Download building permits and zoning data to analyze development patterns.
Policy analysts Track 311 service requests or parking citations to measure city responsiveness.
Real estate researchers Collect property, permit, and business registration data for market analysis.

What it does

This Actor collects rows from any dataset hosted on data.lacity.org and returns each row as a flat record with the dataset's native columns.

  • ๐Ÿ“‹ Preloaded dataset catalog: Choose from over 200 datasets directly in the input editor, including crime, permits, 311 requests, and business listings.
  • ๐Ÿ” SoQL where filter: Narrow results with Socrata's query language, for example to return only burglaries in a specific division.
  • ๐Ÿ“Š Column selection: Request only the columns you need with a comma-separated $select clause, reducing payload size and cost.
  • ๐Ÿ“ˆ Custom sort order: Pass an $order clause to sort rows by date, value, or any column before they reach your dataset.
  • ๐Ÿ”Ž Full-text search: Use the query parameter to search across all string columns in the dataset for a keyword or phrase.

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

What you can do with Los Angeles Open Data data

๐Ÿ“ฐ Investigate crime trends.

A data journalist pulls the latest year of crime data with a $where filter for a specific offense type and exports it to CSV for mapping in QGIS.

๐Ÿ—๏ธ Monitor new construction.

A real estate analyst scrapes building permits issued from 2020 to present weekly to track development activity by neighborhood.

๐Ÿ“ž Analyze 311 service patterns.

A city performance team downloads MyLA311 service requests filtered by request type and council district to measure resolution times.

๐Ÿš— Study traffic safety.

A transportation researcher collects traffic collision data with a $where clause for pedestrian-involved incidents and orders by date descending.

Why choose this scraper

What you get
No API key required Reads the public Socrata endpoint directly with no registration or authentication.
Over 200 datasets Preloaded catalog covers crime, permits, 311, business listings, budgets, and more.
SoQL filtering Full support for $where, $select, $order, and $query to slice the data before download.
Flat row output Every record arrives as a clean, flat object ready for analysis or export.

How it compares

No other Store actor targets Los Angeles Open Data the same way, so the honest comparison is with the alternatives teams actually weigh.

Los Angeles Open Data Scraper Build it in-house By hand
Setup Run it now, zero config Days of engineering None, but hours per pull
When Los Angeles Open Data 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 dataset ID from the dropdown, then optionally narrow the results with SoQL where, select, order, and full-text query parameters so only matching rows land in your dataset. The Input tab lists every parameter.

A first run with the defaults:

{
 "datasetId": "vygi-vxyg",
 "maxItems": 10
}

A larger pull:

{
 "datasetId": "vygi-vxyg",
 "maxItems": 200
}

Pricing

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

Results collected Approximate cost
100 results $3.47
1,000 results $34.70
10,000 results $347.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 to collect up to 1,000,000 results per run.

Run it

  1. Create a free Apify account with $5 in credit.
  2. Open the Los Angeles Open Data Scraper.
  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 (run-sync-get-dataset-items) or the ApifyClient for JavaScript and Python.

Use with AI agents (MCP)

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

claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/la-open-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 your $where clause for syntax errors. SoQL uses single quotes around string values and requires exact column names. Try removing the filter to confirm the dataset itself returns rows, then add conditions back one at a time.

The run fails with an error about the dataset ID.

Make sure the dataset ID is exactly 4 characters, a hyphen, and 4 more characters, like '2nrs-mtv8'. Copy it directly from the dataset URL on data.lacity.org. The preloaded dropdown values are validated.

My $select columns are not appearing in the output.

Column names are case-sensitive and must match the dataset's field names exactly. Check the dataset's metadata page on data.lacity.org for the correct column identifiers.

The run is taking a long time.

Large datasets with millions of rows will take time to paginate through. Reduce maxItems, add a tighter $where filter, or use $select to request fewer columns and speed up each page.

I get a 'column not found' error in my $where clause.

Verify the column name against the dataset's API field list. Some datasets use internal field names that differ from the human-readable labels shown on the portal. Check the dataset's API documentation page.

FAQ

Question Answer
Do I need an API key or account to use this scraper? No. The actor reads the public Socrata API at data.lacity.org, which does not require authentication or an API key.
How do I find the dataset ID I need? Open the dataset on data.lacity.org and look at the URL. The 4x4 code after the domain is the dataset ID, for example '2nrs-mtv8' for crime data from 2020 to present. You can also pick from the preloaded dropdown in the input editor.
Can I filter rows before downloading? Yes. Use the $where field with Socrata SoQL syntax, for example "crm_cd_desc='BURGLARY' AND area_name='Central'". You can also use $select to pick columns, $order to sort, and $query for full-text search.
What is the maximum number of rows I can scrape? You can set maxItems up to 1,000,000 rows per run. The Socrata API itself may impose a default limit, but the actor will paginate through all available pages up to your requested maximum.
Which datasets are available? The input editor includes over 200 preloaded datasets covering crime, building permits, 311 requests, parking citations, business registrations, traffic collisions, budgets, and many more. You can also enter any valid 4x4 ID from data.lacity.org manually.
What format does the output come in? The actor returns each row as a flat JSON object. You can export the full run to CSV, JSON, Excel, or XML from the Apify dataset tab.
Can I select only specific columns? Yes. Use the $select field with a comma-separated list of column names, for example 'date_occ,area_name,crm_cd_desc'. This reduces the payload size and speeds up the run.
How do I sort the results? Use the $order field with a column name and direction, for example 'date_occ DESC' to get the most recent records first.
Does this actor update datasets automatically? You can schedule the actor to run on a recurring basis from the Apify console. Pair it with a cron schedule to keep your copy of a dataset fresh.
Is there a rate limit on the city's open data portal? The Socrata API has generous public limits. The actor makes sequential requests with built-in pagination and will not hammer the endpoint.

Related actors

Browse the full ParseForge collection 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 City of Los Angeles. 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.

Input

FieldTypeWhat it doesDefault
datasetId required string (361 options) Socrata 4x4 ID of any dataset hosted on data.lacity.org. Find the ID in the dataset URL (e.g. '2nrs-mtv8' for crime data from 2020 to present, 'nbyu-2ha9' for building & safety permits, '7my7-7vrt' for MyLA311 service requests, 'pvwu-3di3' for parking citations, '6rrh-rzua' for traffic collisions). vygi-vxyg
maxItems integer How many datasets to collect per run. 10
where string Optional Socrata SoQL $where clause. Example: "crm_cd_desc='BURGLARY' AND area_name='Central'". See https://dev.socrata.com/docs/queries/where.html not set
select string Comma-separated list of columns to return. Default: all columns. not set
order string Sort order. Example: 'date_occ DESC' or 'date_rptd ASC' not set
query string Free-text search across all string columns of the dataset not set

Pricing

from $26.02 per 1,000 results

Charged forWhat it isPrice each
result Single result in the default dataset. $0.02602 to $0.0347

Tiered: the lower figure is the price on a higher Apify plan. Billing and the free credit live on Apify.

API

One POST returns the dataset directly. Same shape for every scraper in the library, so swapping the slug is the only change.

POST ยท run and get results
curl -X POST "https://api.apify.com/v2/acts/parseforge~la-open-data-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "helloWorld": 123
  }'

Examples

Input that runs as-is.

input.json
{
  "helloWorld": 123
}

Reviews

No reviews yet. Be the first.

Issues

We build and maintain this scraper, so a problem with it comes to us. Report it on the Apify listing and the thread stays attached to the scraper where the next person can find it: open an issue.

Broken and urgent, or you would rather not post in public? Write to parseforge@protonmail.com and it reaches the people who wrote it.

Related scrapers

Run Los Angeles Open Data Scraper on Apify All scrapers