# US Public Transit Agency Leads & Intelligence Scraper (`scrapesage/us-transit-agency-leads-scraper`) Actor

Scrape every US public transit agency from the official FTA National Transit Database: agency, organization type, website, address, fleet size, modes, annual ridership, operating budget, service area & lead score. Govtech leads, monitor mode.

- **URL**: https://apify.com/scrapesage/us-transit-agency-leads-scraper.md
- **Developed by:** [Scrape Sage](https://apify.com/scrapesage) (community)
- **Categories:** Lead generation, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 1,000 transit agency lead records

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

## US Public Transit Agency Leads & Intelligence Scraper (FTA NTD)

Build a **clean, structured list of every US public transit agency** — straight from the **official FTA National Transit Database (NTD)**. Every record carries the firmographics and market intelligence govtech vendors qualify on: **agency name, organization type, website, mailing address, fleet size, modes operated, annual ridership, total operating budget, service-area population, FTA region, geo coordinates**, plus a 0–100 lead score.

No login, no cookies, no browser, no proxy — fast JSON extraction from the federal open-data portal.

### Why this transit-agency scraper?

The only other NTD tools on Apify are chat/MCP wrappers that answer one-off questions. This actor ships the **complete structured dataset** — the spine of every NTD reporter agency, **enriched** with the per-mode service metrics (modes, ridership and operating expenses) joined on the NTD ID — so you can filter, score and export a real prospecting list.

| Data | NTD chat/MCP tools | This actor (structured leads) |
|---|---|---|
| Every US transit agency in one export | ❌ | ✅ |
| Organization type (authority / city / MPO / private operator…) | ❌ | ✅ |
| Website & mailing address | partial | ✅ |
| **Fleet size** (vehicles operated) | ❌ | ✅ |
| **Modes operated** (bus / light rail / heavy rail / ferry / demand response…) | partial | ✅ |
| **Annual ridership** (unlinked passenger trips) | partial | ✅ |
| **Total operating budget** (operating expenses) | ❌ | ✅ |
| Service-area population & urbanized area | ❌ | ✅ |
| UEI (links to SAM.gov) & FTA region | ❌ | ✅ |
| Lead score (0–100) | ❌ | ✅ |
| Only-new **monitor mode** | ❌ | ✅ |

### Coverage

The official **FTA National Transit Database** (`datahub.transportation.gov`, keyless government open data): ~2,900 US transit agencies across all 50 states, DC and territories — urban and rural reporters, public authorities, city/county systems, MPOs, state DOTs, tribal and private contract operators. Enriched with the latest annual service metrics (modes, ridership, operating expenses) by NTD ID.

### Use cases

- **Sell rolling stock & EV buses** — filter by `minVehicles`, `modes` (Bus) and `minOperatingExpenses` to find agencies with large fleets and the budget to replace them.
- **Transit software & ITS** (CAD/AVL, scheduling, fare collection, planning, real-time, maintenance/EAM) — target agencies by fleet size, modes, ridership and budget; segment rail vs bus vs demand-response.
- **Rail & ferry vendors** — set `railOperatorsOnly` or filter `modes` to Light/Heavy/Commuter Rail or Ferry.
- **Consulting, engineering & A&E** — map agencies by service-area population, urbanized area and FTA region for pursuit planning.
- **Fuel, parts, tires, shelters, fare media, uniforms** — qualify by fleet size and operating budget.
- **Government-affairs & grants** — agencies with UEI + FTA region for federal funding outreach.
- **Recurring intelligence feed** — schedule with **monitor mode** to catch new reporters and fleet/ridership/budget changes each NTD release.

### How to use

1. [Sign up for Apify](https://console.apify.com/sign-up) — the free plan is enough to try this actor.
2. Open the **US Public Transit Agency Leads & Intelligence Scraper**, pick `states` and (optionally) `orgCategories` / `modes`, then click **Start**.
3. Watch agencies stream into the dataset table.
4. **Export** as JSON, CSV, Excel, XML or RSS — or pull results via the [Apify API](https://docs.apify.com/api/v2).

### Input

```json
{
    "states": ["CA", "TX"],
    "modes": ["Bus"],
    "minVehicles": 50,
    "minOperatingExpenses": 20000000,
    "sortBy": "operatingBudget",
    "maxResults": 1000,
    "monitorMode": false
}
````

- **states** — two-letter codes (`CA`, `TX`, `NY`, …). Empty = all.
- **orgCategories** — `transit_authority`, `local_government`, `state_government`, `planning_mpo`, `private_for_profit`, `private_nonprofit`, `university`, `tribal`, `other`.
- **serviceModule** — `urban`, `rural`, or `any`.
- **modes** — match agencies operating a mode (`Bus`, `Light Rail`, `Heavy Rail`, `Commuter Rail`, `Ferry`, `Demand Response`, `Vanpool`, `Streetcar`).
- **railOperatorsOnly** — only rail operators.
- **reporterTypes** — `Full Reporter`, `Reduced Reporter`, `Rural Reporter`, …
- **minVehicles / maxVehicles** — fleet-size filters.
- **minServiceAreaPopulation / minAnnualRidership / minOperatingExpenses** — size & budget thresholds.
- **cities / nameQuery / hasWebsite** — location & quality filters.
- **includeServiceMetrics** *(default true)* — enrich with modes, ridership and operating budget.
- **sortBy** — `leadScore`, `fleetSize`, `ridership`, `operatingBudget`, `serviceAreaPop`, `name`.
- **includeRawFields** *(default true)* — attach the full original NTD row under `sourceFields`.
- **monitorMode / monitorKey** — only output NEW or CHANGED agencies since the last run with the same key.

### Output

One normalized lead record per transit agency:

```json
{
    "recordType": "transitAgency",
    "recordId": "NTD-90154",
    "ntdId": "90154",
    "agencyName": "Los Angeles County Metropolitan Transportation Authority",
    "organizationType": "Independent Public Agency or Authority of Transit Service",
    "orgCategory": "transit_authority",
    "orgCategoryLabel": "Public transit authority",
    "reporterType": "Full Reporter",
    "reportingModule": "Urban",
    "modes": ["Bus", "Demand Response", "Heavy Rail", "Light Rail", "Vanpool"],
    "modeCount": 5,
    "isRailOperator": true,
    "annualRidership": 277000000,
    "operatingExpenses": 2100000000,
    "totalVehicles": 2300,
    "fleetTier": "large",
    "serviceAreaPopulation": 9800000,
    "urbanizedAreaName": "Los Angeles--Long Beach--Anaheim, CA",
    "website": "http://www.metro.net",
    "street": "One Gateway Plaza",
    "city": "Los Angeles",
    "state": "CA",
    "stateName": "California",
    "zip": "90012",
    "ftaRegion": "Region 9",
    "uei": "…",
    "latitude": 34.0561,
    "longitude": -118.2353,
    "leadSignals": ["largeFleet", "largeServiceArea", "highRidership", "largeOperatingBudget", "fullReporter", "hasWebsite", "urban", "railOperator", "transitAuthority", "hasUEI"],
    "leadScore": 100,
    "scrapedAt": "2026-06-22T04:00:00.000Z",
    "sourceFields": { "...": "full original NTD row" }
}
```

Fields are `null` only when the NTD genuinely doesn't publish them (e.g. a planning agency that operates no service has no modes/ridership).

### Monitor mode & scheduling

- Turn on **monitorMode** and give each saved search its own **monitorKey**.
- The actor remembers every agency it has emitted (in a named key-value store) and, on the next run, outputs **only new or changed** agencies — new reporters, fleet changes, ridership/budget changes, contact changes.
- Pair it with [Apify Schedules](https://docs.apify.com/platform/schedules). Monitor mode and the scheduler are complementary: the **schedule** decides *when* to run, **monitor mode** decides *what's new* — they never conflict.

### Automate & schedule

- **[Apify API](https://docs.apify.com/api/v2)** — start runs, fetch datasets, manage schedules over REST.
- **[apify-client for JavaScript](https://docs.apify.com/api/client/js/)** and **[Python](https://docs.apify.com/api/client/python/)** — official SDKs.
- **[Schedules](https://docs.apify.com/platform/schedules)** — run on each NTD release to track changes.
- **[Webhooks](https://docs.apify.com/platform/integrations/webhooks)** — trigger CRM import, Slack alert or an email sequence when a run finishes.

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

const client = new ApifyClient({ token: 'MY_APIFY_TOKEN' });

const run = await client.actor('scrapesage/us-transit-agency-leads-scraper').call({
    states: ['CA', 'TX'],
    modes: ['Bus'],
    minVehicles: 50,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Got ${items.length} transit agency leads`);
```

### Integrate with any app

Connect the dataset to 5,000+ apps — no code required:

- **[Make](https://docs.apify.com/platform/integrations/make)** — multi-step automation scenarios.
- **[Zapier](https://docs.apify.com/platform/integrations/zapier)** — push new agency leads straight into your CRM.
- **[Slack](https://docs.apify.com/platform/integrations/slack)** — get pinged when a monitored search finds new agencies.
- **[Google Drive / Sheets](https://docs.apify.com/platform/integrations/drive)** — auto-export every run to a spreadsheet.
- **[Airbyte](https://docs.apify.com/platform/integrations/airbyte)** — pipe results into your data warehouse.
- **[GitHub](https://docs.apify.com/platform/integrations/github)** — trigger runs from commits or releases.

### Use with AI assistants (MCP)

The output is clean, LLM-ready JSON. Call this actor from Claude, ChatGPT or any agent framework through the **[Apify MCP server](https://docs.apify.com/platform/integrations/mcp)** — ask your assistant to "list California transit agencies with 100+ buses and a website" and let it run this scraper.

### More scrapers from scrapesage

Build a complete **government & infrastructure go-to-market stack**:

- **[US Airport & Aviation Facility Leads Scraper](https://apify.com/scrapesage/us-aviation-facility-leads-scraper)** — airports, heliports & seaplane bases with owner/manager contacts.
- **[FMCSA Trucking Scraper](https://apify.com/scrapesage/fmcsa-trucking-scraper)** — motor carriers, brokers & freight companies with phone/email.
- **[US Auto Dealer Scraper](https://apify.com/scrapesage/us-auto-dealer-scraper)** — licensed vehicle dealers & repair shops.
- **[Vehicle Manufacturer Leads Scraper](https://apify.com/scrapesage/vehicle-manufacturer-leads-scraper)** — US vehicle & equipment manufacturers from the NHTSA registry.
- **[USAspending Scraper](https://apify.com/scrapesage/usaspending-scraper)** — federal awards & recipients (transit grants & contractors).
- **[GSA eLibrary Scraper](https://apify.com/scrapesage/gsa-elibrary-scraper)** — federal-contract holders (GSA schedule vendors).
- **[SAM.gov Scraper](https://apify.com/scrapesage/sam-gov-scraper)** — federal entity registrations & opportunities.
- **[US School Leads Scraper](https://apify.com/scrapesage/us-schools-scraper)** — schools, districts & colleges (school-bus & student-transport buyers).
- **[US Fire Department Leads Scraper](https://apify.com/scrapesage/us-fire-department-leads-scraper)** — fire departments (public-fleet & apparatus buyers).
- **[Website Contact Scraper](https://apify.com/scrapesage/website-contact-scraper)** — enrich agency websites with emails, phones & socials.

### Tips

- **Big-fleet ICP**: `minVehicles: 100` + `sortBy: "fleetSize"` surfaces the largest fleets first (rolling-stock / EV-bus / fleet-software buyers).
- **Budget ICP**: `minOperatingExpenses: 20000000` + `sortBy: "operatingBudget"` targets agencies with real purchasing power.
- **Rail vendors**: `railOperatorsOnly: true` or `modes: ["Light Rail", "Heavy Rail", "Commuter Rail"]`.
- **Rural programs**: `serviceModule: "rural"` for rural transit grants/vendors.
- **Fresh changes only**: turn on `monitorMode` + a `monitorKey` and schedule on each NTD release.
- **Email enrichment**: the NTD publishes website + address; pair with the [Website Contact Scraper](https://apify.com/scrapesage/website-contact-scraper) to add emails.

### FAQ

**Where does the data come from?** The official Federal Transit Administration (FTA) National Transit Database (NTD), published as government open data on `datahub.transportation.gov`. Each record links back under `sourceUrl`.

**Does it include phone numbers?** The public NTD agency table publishes website + mailing address (not phone). Agency name + website + full address already make these directly actionable; pair with the [Website Contact Scraper](https://apify.com/scrapesage/website-contact-scraper) for emails/phones.

**What are modes, ridership and operating budget?** They come from the NTD service-metrics table, aggregated per agency for the latest reporting year and joined on the NTD ID. Turn off `includeServiceMetrics` to skip the enrichment.

**Can I export to Google Sheets, CSV or Excel?** Yes — one click in the dataset view, or automatically every run via the [Google Drive integration](https://docs.apify.com/platform/integrations/drive).

**Is scraping this data legal?** It collects publicly available federal open data only. You are responsible for using the data in compliance with applicable laws and the portal's terms.

**A field is null — why?** The NTD doesn't publish that field for that agency (e.g. a planning agency that operates no service has no modes/ridership). Fields are `null` only when the data genuinely doesn't exist.

### Need help?

Open an issue on the actor's **Issues** tab, or visit the [Apify help center](https://help.apify.com/). Feature requests — including more NTD tables (facilities, fares, asset inventory) — are welcome; this actor is actively maintained.

# Actor input Schema

## `states` (type: `array`):

Two-letter state/territory codes to include (e.g. <code>CA</code>, <code>TX</code>, <code>NY</code>). Leave empty for all 50 states + DC + territories.

## `orgCategories` (type: `array`):

Filter by agency organization category: <code>transit\_authority</code>, <code>local\_government</code>, <code>state\_government</code>, <code>planning\_mpo</code>, <code>private\_for\_profit</code>, <code>private\_nonprofit</code>, <code>university</code>, <code>tribal</code>, <code>other</code>. Leave empty for all.

## `serviceModule` (type: `string`):

Limit to urban or rural reporters.

## `modes` (type: `array`):

Only include agencies that operate one of these modes (matched on mode name, case-insensitive). Examples: <code>Bus</code>, <code>Light Rail</code>, <code>Heavy Rail</code>, <code>Commuter Rail</code>, <code>Ferry</code>, <code>Demand Response</code>, <code>Vanpool</code>, <code>Streetcar</code>.

## `railOperatorsOnly` (type: `boolean`):

Only include agencies that operate a rail mode (light/heavy/commuter rail, streetcar, monorail).

## `reporterTypes` (type: `array`):

Filter by NTD reporter type (e.g. <code>Full Reporter</code>, <code>Reduced Reporter</code>, <code>Rural Reporter</code>, <code>Building Reporter</code>).

## `minVehicles` (type: `integer`):

Only include agencies with at least this many vehicles operated in maximum service (fleet size). Larger fleets are prime targets for rolling-stock, EV-bus and fleet software.

## `maxVehicles` (type: `integer`):

Only include agencies with at most this many vehicles.

## `minServiceAreaPopulation` (type: `integer`):

Only include agencies whose service-area population is at least this.

## `minAnnualRidership` (type: `integer`):

Only include agencies with at least this many annual unlinked passenger trips (requires service metrics).

## `minOperatingExpenses` (type: `integer`):

Only include agencies whose total annual operating expenses are at least this (a buying-power signal; requires service metrics).

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

Only include agencies whose city contains one of these (case-insensitive).

## `nameQuery` (type: `string`):

Only include agencies whose name or urbanized-area name contains this text (case-insensitive).

## `hasWebsite` (type: `boolean`):

Only include agencies that list a website.

## `includeServiceMetrics` (type: `boolean`):

Enrich each agency with modes operated, annual ridership and total operating expenses by joining the NTD service-metrics table. Recommended (small extra fetch).

## `sortBy` (type: `string`):

Order of the output records.

## `maxResults` (type: `integer`):

Maximum number of agency lead records to output.

## `includeRawFields` (type: `boolean`):

Attach the full original NTD row to each record under <code>sourceFields</code> (richest possible dataset).

## `monitorMode` (type: `boolean`):

Only output agencies that are NEW or CHANGED since the last run with the same Monitor key. Pairs perfectly with Apify Schedules to track new reporters, fleet/budget/ridership changes.

## `monitorKey` (type: `string`):

Names the saved monitor state. Use one key per saved search so different schedules don't overwrite each other.

## `deduplicateResults` (type: `boolean`):

Drop duplicate agencies within a run (recommended).

## `socrataAppToken` (type: `string`):

Optional Socrata app token to raise rate limits. Not required — the NTD is keyless.

## `proxyConfiguration` (type: `object`):

Proxy settings. Not needed — the NTD open-data API is reachable directly. Leave proxy off for the cheapest, fastest runs.

## Actor input object example

```json
{
  "states": [
    "CA"
  ],
  "serviceModule": "any",
  "railOperatorsOnly": false,
  "hasWebsite": false,
  "includeServiceMetrics": true,
  "sortBy": "leadScore",
  "maxResults": 1000,
  "includeRawFields": true,
  "monitorMode": false,
  "monitorKey": "default",
  "deduplicateResults": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (type: `string`):

All scraped transit-agency lead records as JSON items in the default dataset.

# 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 = {
    "states": [
        "CA"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapesage/us-transit-agency-leads-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 = { "states": ["CA"] }

# Run the Actor and wait for it to finish
run = client.actor("scrapesage/us-transit-agency-leads-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 '{
  "states": [
    "CA"
  ]
}' |
apify call scrapesage/us-transit-agency-leads-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=scrapesage/us-transit-agency-leads-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "US Public Transit Agency Leads & Intelligence Scraper",
        "description": "Scrape every US public transit agency from the official FTA National Transit Database: agency, organization type, website, address, fleet size, modes, annual ridership, operating budget, service area & lead score. Govtech leads, monitor mode.",
        "version": "0.1",
        "x-build-id": "8kRz6CdnpD8v7DCOh"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scrapesage~us-transit-agency-leads-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scrapesage-us-transit-agency-leads-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/scrapesage~us-transit-agency-leads-scraper/runs": {
            "post": {
                "operationId": "runs-sync-scrapesage-us-transit-agency-leads-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/scrapesage~us-transit-agency-leads-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-scrapesage-us-transit-agency-leads-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": {
                    "states": {
                        "title": "States",
                        "type": "array",
                        "description": "Two-letter state/territory codes to include (e.g. <code>CA</code>, <code>TX</code>, <code>NY</code>). Leave empty for all 50 states + DC + territories.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "orgCategories": {
                        "title": "Organization type",
                        "type": "array",
                        "description": "Filter by agency organization category: <code>transit_authority</code>, <code>local_government</code>, <code>state_government</code>, <code>planning_mpo</code>, <code>private_for_profit</code>, <code>private_nonprofit</code>, <code>university</code>, <code>tribal</code>, <code>other</code>. Leave empty for all.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "serviceModule": {
                        "title": "Urban / Rural",
                        "enum": [
                            "any",
                            "urban",
                            "rural"
                        ],
                        "type": "string",
                        "description": "Limit to urban or rural reporters.",
                        "default": "any"
                    },
                    "modes": {
                        "title": "Transit modes",
                        "type": "array",
                        "description": "Only include agencies that operate one of these modes (matched on mode name, case-insensitive). Examples: <code>Bus</code>, <code>Light Rail</code>, <code>Heavy Rail</code>, <code>Commuter Rail</code>, <code>Ferry</code>, <code>Demand Response</code>, <code>Vanpool</code>, <code>Streetcar</code>.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "railOperatorsOnly": {
                        "title": "Rail operators only",
                        "type": "boolean",
                        "description": "Only include agencies that operate a rail mode (light/heavy/commuter rail, streetcar, monorail).",
                        "default": false
                    },
                    "reporterTypes": {
                        "title": "Reporter type",
                        "type": "array",
                        "description": "Filter by NTD reporter type (e.g. <code>Full Reporter</code>, <code>Reduced Reporter</code>, <code>Rural Reporter</code>, <code>Building Reporter</code>).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "minVehicles": {
                        "title": "Minimum fleet size (vehicles)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only include agencies with at least this many vehicles operated in maximum service (fleet size). Larger fleets are prime targets for rolling-stock, EV-bus and fleet software."
                    },
                    "maxVehicles": {
                        "title": "Maximum fleet size (vehicles)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only include agencies with at most this many vehicles."
                    },
                    "minServiceAreaPopulation": {
                        "title": "Minimum service-area population",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only include agencies whose service-area population is at least this."
                    },
                    "minAnnualRidership": {
                        "title": "Minimum annual ridership",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only include agencies with at least this many annual unlinked passenger trips (requires service metrics)."
                    },
                    "minOperatingExpenses": {
                        "title": "Minimum operating budget (USD)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only include agencies whose total annual operating expenses are at least this (a buying-power signal; requires service metrics)."
                    },
                    "cities": {
                        "title": "Cities",
                        "type": "array",
                        "description": "Only include agencies whose city contains one of these (case-insensitive).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "nameQuery": {
                        "title": "Name contains",
                        "type": "string",
                        "description": "Only include agencies whose name or urbanized-area name contains this text (case-insensitive)."
                    },
                    "hasWebsite": {
                        "title": "Has website",
                        "type": "boolean",
                        "description": "Only include agencies that list a website.",
                        "default": false
                    },
                    "includeServiceMetrics": {
                        "title": "Include service metrics (modes, ridership, budget)",
                        "type": "boolean",
                        "description": "Enrich each agency with modes operated, annual ridership and total operating expenses by joining the NTD service-metrics table. Recommended (small extra fetch).",
                        "default": true
                    },
                    "sortBy": {
                        "title": "Sort by",
                        "enum": [
                            "leadScore",
                            "fleetSize",
                            "ridership",
                            "operatingBudget",
                            "serviceAreaPop",
                            "name"
                        ],
                        "type": "string",
                        "description": "Order of the output records.",
                        "default": "leadScore"
                    },
                    "maxResults": {
                        "title": "Max results",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of agency lead records to output.",
                        "default": 1000
                    },
                    "includeRawFields": {
                        "title": "Include raw source fields",
                        "type": "boolean",
                        "description": "Attach the full original NTD row to each record under <code>sourceFields</code> (richest possible dataset).",
                        "default": true
                    },
                    "monitorMode": {
                        "title": "Monitor mode (only new / changed)",
                        "type": "boolean",
                        "description": "Only output agencies that are NEW or CHANGED since the last run with the same Monitor key. Pairs perfectly with Apify Schedules to track new reporters, fleet/budget/ridership changes.",
                        "default": false
                    },
                    "monitorKey": {
                        "title": "Monitor key",
                        "type": "string",
                        "description": "Names the saved monitor state. Use one key per saved search so different schedules don't overwrite each other.",
                        "default": "default"
                    },
                    "deduplicateResults": {
                        "title": "Deduplicate results",
                        "type": "boolean",
                        "description": "Drop duplicate agencies within a run (recommended).",
                        "default": true
                    },
                    "socrataAppToken": {
                        "title": "Socrata app token (optional)",
                        "type": "string",
                        "description": "Optional Socrata app token to raise rate limits. Not required — the NTD is keyless."
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Proxy settings. Not needed — the NTD open-data API is reachable directly. Leave proxy off for the cheapest, fastest runs.",
                        "default": {
                            "useApifyProxy": false
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
