# US Schools, Districts & Colleges Scraper - Education Leads (`scrapesage/us-schools-scraper`) Actor

Scrape every US public school, district & college from official NCES & IPEDS data: name, phone, address, enrollment, grade range, Title I, charter, free-lunch %, locale, staff counts, college president & website. Filter by state, level & size. Monitor mode returns only new institutions.

- **URL**: https://apify.com/scrapesage/us-schools-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

from $5.00 / 1,000 institution scrapeds

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

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.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/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 Schools, Districts & Colleges Scraper — Education Leads (NCES + IPEDS)

Extract **every US public school, school district, and college/university** from the official **NCES Common Core of Data (CCD)** and **IPEDS** — the authoritative federal education datasets. Get **name, phone, full address & geo, enrollment, grade range, Title I status, charter/magnet flags, free-lunch %, locale, staff counts, the college president's name & title, and the institution website** — then optionally crawl that website for **contact emails, phones and socials**.

No API key, no login, no browser — clean JSON straight from the source, with a **0–100 lead score** on every record.

### Why this scraper?

Most "school" or "education leads" scrapers just scrape Google Maps and return a name, an address and maybe an email — for the handful of schools Maps happens to surface. This actor ships the **complete official dataset** for any state, with the firmographics that actually let you target:

| Data | Google-Maps lead scrapers | This actor |
|---|---|---|
| Coverage | whatever Maps surfaces | **every** NCES/IPEDS institution in the state |
| Enrollment / student counts | ❌ | ✅ |
| Grade range, school level | ❌ | ✅ |
| Title I status & free-lunch % (funding signals) | ❌ | ✅ |
| Charter / magnet / virtual flags | ❌ | ✅ |
| District (LEA) link + per-district staff counts | ❌ | ✅ |
| Locale (City / Suburb / Town / Rural) | ❌ | ✅ |
| College control, sector, size, highest degree | ❌ | ✅ |
| College **president / chief admin** name & title | ❌ | ✅ |
| Institution website + contact emails | partial | ✅ opt-in |
| Phone | partial | ✅ ~100% of K-12 |
| Lead score (0–100) | ❌ | ✅ |
| Monitor mode — only new institutions | ❌ | ✅ |

### What you get

Three institution types, selectable per run:

- **Schools** *(K-12 public, NCES CCD)* — name, NCES ID, phone, mailing & physical address, geo, district, school level, grade range, enrollment, teachers (FTE), student/teacher ratio, charter/magnet/virtual, Title I status & eligibility, free / reduced-price-lunch counts & %, locale, congressional & state-legislative districts.
- **Districts (LEAs)** *(NCES CCD)* — name, phone, address, geo, county, agency type, number of schools, enrollment, special-ed / ELL / migrant counts, and a **full staff FTE breakdown** (teachers by level, counselors, psychologists, librarians, aides, administrators).
- **Colleges & universities** *(IPEDS)* — name, phone, address, geo, control (public/private), sector, size, level, highest degree offered, HBCU/tribal/medical flags, EIN, **chief administrator (president) name & title**, website, financial-aid & application URLs, Carnegie classification.

### Use cases

- **EdTech & SaaS sales** — build target account lists by state, level, enrollment size, locale, and Title I status; reach the district or the college president directly.
- **School & classroom suppliers** — furniture, technology, food service, transportation, athletics: filter by enrollment and grade range to size every account.
- **Fundraising & grants** — Title I and free-lunch % flag high-need schools and districts for foundations, nonprofits and grant programs.
- **Higher-ed services & recruiting** — segment colleges by control, sector, size and degree level; contact the president's office.
- **Market research & analytics** — official, comprehensive enrollment & staffing data for any state, ready for your model or dashboard.
- **Real estate & local marketing** — schools, ratings-adjacent locale data and district boundaries by ZIP/county.

### 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 Schools, Districts & Colleges Scraper**, choose `institutionTypes`, enter one or more `states`, and click **Start**.
3. Watch results stream into the dataset table.
4. **Export** as JSON, CSV, Excel, XML, or RSS — or pull results programmatically via the [Apify API](https://docs.apify.com/api/v2).

### Input

```json
{
    "institutionTypes": ["schools", "districts", "colleges"],
    "states": ["TX", "California"],
    "schoolLevels": ["High"],
    "minEnrollment": 500,
    "titleIEligibleOnly": false,
    "enrichContactEmails": true,
    "maxResults": 1000
}
````

- **institutionTypes** — any of `schools` (K-12 public), `districts` (LEAs), `colleges` (IPEDS).
- **states** — full name or 2-letter code (`Texas`, `TX`, `California`, `NY`). Leave empty to scan **all** states (use `maxResults`/`maxResultsPerState` to control cost).
- **nameQuery** — keep only institutions whose name contains this text (`community college`, `academy`).
- **year** — survey year (e.g. `2022`); leave empty for the latest available.
- **schoolLevels / localeTypes / minEnrollment / maxEnrollment** — core filters.
- **charterOnly / magnetOnly / virtualOnly / titleIEligibleOnly** — school flags.
- **collegeControls / collegeLevels / hbcuOnly** — college filters.
- **ncesSchoolIds / leaIds / collegeUnitIds** — look up specific institutions by official ID.
- **enrichContactEmails** *(default false)* — crawl each institution's website (home + contact/about) for emails, phones and socials. Applies to institutions that publish a website (colleges). NCES does not publish K-12 emails.
- **monitorMode** *(default false)* — remember institutions across runs and emit only NEW ones; ideal for scheduled "new schools / new charters / closures" tracking.

### Output

One record per institution. A K-12 school (`type: "school"`):

```json
{
    "type": "school",
    "ncesId": "480000112448",
    "name": "Crosbyton High School",
    "districtId": "4800001",
    "districtName": "CROSBYTON CISD",
    "phone": "(806) 675-7331",
    "street": "204 S Harrison St",
    "city": "Crosbyton",
    "state": "TX",
    "zip": "79322",
    "latitude": 33.658381,
    "longitude": -101.24788,
    "locale": "Rural — Remote",
    "localeBucket": "Rural",
    "schoolLevel": "High",
    "lowestGradeOffered": "9",
    "highestGradeOffered": "12",
    "enrollment": 210,
    "teachersFte": 18.5,
    "studentTeacherRatio": 11.4,
    "charter": false,
    "magnet": false,
    "titleIEligible": true,
    "titleIStatus": "Title I schoolwide school",
    "freeOrReducedPriceLunch": 152,
    "frplPercent": 72.4,
    "year": 2022,
    "leadScore": 58,
    "ncesUrl": "https://nces.ed.gov/ccd/schoolsearch/school_detail.asp?ID=480000112448",
    "scrapedAt": "2026-06-20T12:00:00.000Z"
}
```

A college (`type: "college"`) adds the decision-maker and website:

```json
{
    "type": "college",
    "ncesId": "222822",
    "name": "Angelina College",
    "phone": "(936) 639-1301",
    "city": "Lufkin",
    "state": "TX",
    "control": "Public",
    "institutionLevel": "At least 2 but less than 4 years",
    "size": "1,000–4,999",
    "highestDegreeOffered": "Associate's degree",
    "hbcu": false,
    "decisionMakerName": "Michael J. Simon",
    "decisionMakerTitle": "President",
    "website": "http://www.angelina.edu",
    "email": "info@angelina.edu",
    "leadScore": 89,
    "ncesUrl": "https://nces.ed.gov/collegenavigator/?id=222822"
}
```

### Automate & schedule

Run this actor on autopilot and pull results into your own stack:

- **[Apify API](https://docs.apify.com/api/v2)** — start runs, fetch datasets, and manage schedules over REST.
- **[apify-client for JavaScript](https://docs.apify.com/api/client/js/)** and **[apify-client for Python](https://docs.apify.com/api/client/python/)** — official SDKs.
- **[Schedules](https://docs.apify.com/platform/schedules)** — run it daily/weekly and combine with `monitorMode` to capture only newly opened schools, new charters, or closures.
- **[Webhooks](https://docs.apify.com/platform/integrations/webhooks)** — trigger downstream actions (CRM import, Slack alert, email sequence) the moment a run finishes.

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

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

const run = await client.actor('scrapesage/us-schools-scraper').call({
    institutionTypes: ['colleges'],
    states: ['CA', 'TX', 'NY'],
    collegeControls: ['Public'],
    enrichContactEmails: true,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Got ${items.length} institutions & 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 institutions straight into your CRM.
- **[Slack](https://docs.apify.com/platform/integrations/slack)** — get notified when a monitored search finds new schools.
- **[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 every public high school in Texas with over 1,000 students and their phone numbers" and let it run this scraper for you.

### More scrapers from scrapesage

Build a complete **B2B lead & official-data stack**:

- **[NPI NPPES Healthcare Provider Scraper](https://apify.com/scrapesage/npi-nppes-scraper)** — 8M+ US doctors, dentists & healthcare orgs from the official registry.
- **[US Business Formation Scraper](https://apify.com/scrapesage/us-business-formation-scraper)** — newly registered LLCs & companies from state registries.
- **[US Federal Grants Scraper](https://apify.com/scrapesage/us-federal-grants-scraper)** — open grant opportunities (schools & nonprofits chase these).
- **[USASpending Scraper](https://apify.com/scrapesage/usaspending-scraper)** — federal awards, contracts & recipients.
- **[FMCSA Trucking Scraper](https://apify.com/scrapesage/fmcsa-trucking-scraper)** — US carriers & DOT-registered fleets with contacts.
- **[TaxBuzz Scraper](https://apify.com/scrapesage/taxbuzz-scraper)** — tax pros & accountants with contact details.
- **[Healthgrades Scraper](https://apify.com/scrapesage/healthgrades-scraper)** — physician & practice leads with reviews.

### Tips

- **Cost control** — set `maxResults` (and optionally `maxResultsPerState`). A single big state can contain 9,000+ schools.
- **Whole-country runs** — leave `states` empty to scan all states; pair with filters (`schoolLevels`, `minEnrollment`, `collegeControls`) to keep volume on target.
- **Funding-need targeting** — `titleIEligibleOnly` plus a high `frplPercent` pinpoints high-need schools for grants and nonprofit outreach.
- **Recurring monitoring** — combine [Schedules](https://docs.apify.com/platform/schedules) with `monitorMode` to track new institutions only.
- **Proxies** — keep the default **Residential US** group; the source API is behind a Cloudflare challenge that blocks datacenter IPs.

### FAQ

**Where does the data come from?** The official **NCES Common Core of Data (CCD)** for public schools & districts and **IPEDS** for colleges, served via the open Urban Institute Education Data API. It is public, authoritative government education data.

**How current is it?** CCD is released about two years after each school year (latest ≈ 2022–23); IPEDS is slightly fresher. The actor uses the latest available year and falls back automatically if a year isn't published yet. You can pin a specific `year`.

**Can I get school email addresses?** NCES doesn't publish K-12 emails — for schools and districts the contact is the official phone (≈100% coverage). For colleges, turn on `enrichContactEmails` to crawl the institution's website for public contact emails, or use the published president's name + phone.

**Can I scrape the whole country?** Yes — leave `states` empty. Use `maxResults` and filters to control volume and cost.

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

**How do I get only new institutions on a schedule?** Turn on `monitorMode` and create a [Schedule](https://docs.apify.com/platform/schedules); each run emits only institutions not seen before.

**Is this legal?** This actor collects publicly available government data only. You are responsible for using the data in compliance with applicable laws and the source's terms.

**A field is null — why?** Some institutions genuinely don't report every field (e.g. a brand-new school without enrollment yet). Fields are `null` only when the source doesn't publish them, not because the scraper skipped them.

### Need help?

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

# Actor input Schema

## `institutionTypes` (type: `array`):

Which institutions to scrape: <code>schools</code> (K-12 public schools, NCES CCD), <code>districts</code> (public school districts / LEAs), <code>colleges</code> (colleges & universities, IPEDS).

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

US states to scrape — full name or 2-letter code: <code>Texas</code>, <code>TX</code>, <code>California</code>, <code>NY</code>. Leave empty to scan <b>all</b> states (use <code>maxResults</code> to control cost).

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

Optional — only keep institutions whose name contains this text (e.g. <code>elementary</code>, <code>community college</code>, <code>academy</code>).

## `year` (type: `integer`):

Survey year to pull (e.g. 2022). Leave empty for the latest available (CCD ~2022, IPEDS ~2023). Older years are tried automatically if a year has no data.

## `schoolLevels` (type: `array`):

Filter K-12 schools by level.

## `localeTypes` (type: `array`):

Filter by urban-centric locale.

## `minEnrollment` (type: `integer`):

Only include institutions with at least this many students.

## `maxEnrollment` (type: `integer`):

Only include institutions with at most this many students.

## `charterOnly` (type: `boolean`):

Schools only — keep only charter schools.

## `magnetOnly` (type: `boolean`):

Schools only — keep only magnet schools.

## `virtualOnly` (type: `boolean`):

Schools only — keep only virtual / online schools.

## `titleIEligibleOnly` (type: `boolean`):

Schools only — keep only Title I eligible schools (a federal funding signal).

## `collegeControls` (type: `array`):

Filter colleges by control.

## `collegeLevels` (type: `array`):

Filter colleges by length of programs.

## `hbcuOnly` (type: `boolean`):

Colleges only — keep only Historically Black Colleges & Universities.

## `excludeClosed` (type: `boolean`):

Drop schools/colleges marked closed or inactive.

## `ncesSchoolIds` (type: `array`):

Optional — look up specific schools by 12-digit NCES school ID (<code>ncessch</code>).

## `leaIds` (type: `array`):

Optional — look up specific districts by 7-digit NCES district ID (<code>leaid</code>).

## `collegeUnitIds` (type: `array`):

Optional — look up specific colleges by IPEDS <code>unitid</code>.

## `enrichContactEmails` (type: `boolean`):

Crawl the institution's own website (home + contact/about, max 3 pages) for contact emails, phones and social links. Applies to institutions that publish a website (colleges & universities). NCES does not publish K-12 emails.

## `deduplicate` (type: `boolean`):

Drop duplicate institutions within a run (by NCES ID).

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

Remember institutions seen in previous runs and emit only NEW ones. Perfect for scheduled runs that track new schools, new charters or closures. Works alongside Apify Schedules.

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

Name the monitor state so different saved searches track their own history.

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

Maximum institutions to return across all states & types.

## `maxResultsPerState` (type: `integer`):

Optional cap per state, so one big state doesn't use the whole budget.

## `maxConcurrency` (type: `integer`):

How many states to fetch in parallel.

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

Proxies to use. Residential US proxies are required — the official Education Data API is behind a Cloudflare challenge that blocks datacenter IPs.

## Actor input object example

```json
{
  "institutionTypes": [
    "schools"
  ],
  "states": [
    "RI"
  ],
  "charterOnly": false,
  "magnetOnly": false,
  "virtualOnly": false,
  "titleIEligibleOnly": false,
  "hbcuOnly": false,
  "excludeClosed": true,
  "enrichContactEmails": false,
  "deduplicate": true,
  "monitorMode": false,
  "monitorKey": "default",
  "maxConcurrency": 6,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

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

All scraped school, district and college 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 = {
    "institutionTypes": [
        "schools"
    ],
    "states": [
        "RI"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapesage/us-schools-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 = {
    "institutionTypes": ["schools"],
    "states": ["RI"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("scrapesage/us-schools-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 '{
  "institutionTypes": [
    "schools"
  ],
  "states": [
    "RI"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call scrapesage/us-schools-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "US Schools, Districts & Colleges Scraper - Education Leads",
        "description": "Scrape every US public school, district & college from official NCES & IPEDS data: name, phone, address, enrollment, grade range, Title I, charter, free-lunch %, locale, staff counts, college president & website. Filter by state, level & size. Monitor mode returns only new institutions.",
        "version": "1.0",
        "x-build-id": "duDCR1lNetKsUisbW"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scrapesage~us-schools-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scrapesage-us-schools-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-schools-scraper/runs": {
            "post": {
                "operationId": "runs-sync-scrapesage-us-schools-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-schools-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-scrapesage-us-schools-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": {
                    "institutionTypes": {
                        "title": "Institution types",
                        "type": "array",
                        "description": "Which institutions to scrape: <code>schools</code> (K-12 public schools, NCES CCD), <code>districts</code> (public school districts / LEAs), <code>colleges</code> (colleges & universities, IPEDS).",
                        "items": {
                            "type": "string",
                            "enum": [
                                "schools",
                                "districts",
                                "colleges"
                            ],
                            "enumTitles": [
                                "Schools (K-12 public)",
                                "School districts (LEAs)",
                                "Colleges & universities"
                            ]
                        },
                        "default": [
                            "schools"
                        ]
                    },
                    "states": {
                        "title": "States",
                        "type": "array",
                        "description": "US states to scrape — full name or 2-letter code: <code>Texas</code>, <code>TX</code>, <code>California</code>, <code>NY</code>. Leave empty to scan <b>all</b> states (use <code>maxResults</code> to control cost).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "nameQuery": {
                        "title": "Name contains",
                        "type": "string",
                        "description": "Optional — only keep institutions whose name contains this text (e.g. <code>elementary</code>, <code>community college</code>, <code>academy</code>)."
                    },
                    "year": {
                        "title": "Data year",
                        "minimum": 1990,
                        "maximum": 2030,
                        "type": "integer",
                        "description": "Survey year to pull (e.g. 2022). Leave empty for the latest available (CCD ~2022, IPEDS ~2023). Older years are tried automatically if a year has no data."
                    },
                    "schoolLevels": {
                        "title": "School levels (schools only)",
                        "type": "array",
                        "description": "Filter K-12 schools by level.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "Primary",
                                "Middle",
                                "High",
                                "Other"
                            ],
                            "enumTitles": [
                                "Primary / Elementary",
                                "Middle",
                                "High",
                                "Other"
                            ]
                        }
                    },
                    "localeTypes": {
                        "title": "Locale",
                        "type": "array",
                        "description": "Filter by urban-centric locale.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "City",
                                "Suburb",
                                "Town",
                                "Rural"
                            ],
                            "enumTitles": [
                                "City",
                                "Suburb",
                                "Town",
                                "Rural"
                            ]
                        }
                    },
                    "minEnrollment": {
                        "title": "Min enrollment",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only include institutions with at least this many students."
                    },
                    "maxEnrollment": {
                        "title": "Max enrollment",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only include institutions with at most this many students."
                    },
                    "charterOnly": {
                        "title": "Charter schools only",
                        "type": "boolean",
                        "description": "Schools only — keep only charter schools.",
                        "default": false
                    },
                    "magnetOnly": {
                        "title": "Magnet schools only",
                        "type": "boolean",
                        "description": "Schools only — keep only magnet schools.",
                        "default": false
                    },
                    "virtualOnly": {
                        "title": "Virtual schools only",
                        "type": "boolean",
                        "description": "Schools only — keep only virtual / online schools.",
                        "default": false
                    },
                    "titleIEligibleOnly": {
                        "title": "Title I eligible only",
                        "type": "boolean",
                        "description": "Schools only — keep only Title I eligible schools (a federal funding signal).",
                        "default": false
                    },
                    "collegeControls": {
                        "title": "College control (colleges only)",
                        "type": "array",
                        "description": "Filter colleges by control.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "Public",
                                "Private not-for-profit",
                                "Private for-profit"
                            ],
                            "enumTitles": [
                                "Public",
                                "Private not-for-profit",
                                "Private for-profit"
                            ]
                        }
                    },
                    "collegeLevels": {
                        "title": "College level (colleges only)",
                        "type": "array",
                        "description": "Filter colleges by length of programs.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "4-year",
                                "2-year",
                                "Less than 2-year"
                            ],
                            "enumTitles": [
                                "4-year or above",
                                "2-year",
                                "Less than 2-year"
                            ]
                        }
                    },
                    "hbcuOnly": {
                        "title": "HBCUs only (colleges only)",
                        "type": "boolean",
                        "description": "Colleges only — keep only Historically Black Colleges & Universities.",
                        "default": false
                    },
                    "excludeClosed": {
                        "title": "Exclude closed / inactive",
                        "type": "boolean",
                        "description": "Drop schools/colleges marked closed or inactive.",
                        "default": true
                    },
                    "ncesSchoolIds": {
                        "title": "Look up school NCES IDs",
                        "type": "array",
                        "description": "Optional — look up specific schools by 12-digit NCES school ID (<code>ncessch</code>).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "leaIds": {
                        "title": "Look up district LEA IDs",
                        "type": "array",
                        "description": "Optional — look up specific districts by 7-digit NCES district ID (<code>leaid</code>).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "collegeUnitIds": {
                        "title": "Look up college UNITIDs",
                        "type": "array",
                        "description": "Optional — look up specific colleges by IPEDS <code>unitid</code>.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "enrichContactEmails": {
                        "title": "Enrich emails from the institution website",
                        "type": "boolean",
                        "description": "Crawl the institution's own website (home + contact/about, max 3 pages) for contact emails, phones and social links. Applies to institutions that publish a website (colleges & universities). NCES does not publish K-12 emails.",
                        "default": false
                    },
                    "deduplicate": {
                        "title": "Deduplicate",
                        "type": "boolean",
                        "description": "Drop duplicate institutions within a run (by NCES ID).",
                        "default": true
                    },
                    "monitorMode": {
                        "title": "Monitor mode (only new institutions)",
                        "type": "boolean",
                        "description": "Remember institutions seen in previous runs and emit only NEW ones. Perfect for scheduled runs that track new schools, new charters or closures. Works alongside Apify Schedules.",
                        "default": false
                    },
                    "monitorKey": {
                        "title": "Monitor key",
                        "type": "string",
                        "description": "Name the monitor state so different saved searches track their own history.",
                        "default": "default"
                    },
                    "maxResults": {
                        "title": "Max results",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum institutions to return across all states & types."
                    },
                    "maxResultsPerState": {
                        "title": "Max results per state",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Optional cap per state, so one big state doesn't use the whole budget."
                    },
                    "maxConcurrency": {
                        "title": "Max concurrency",
                        "minimum": 1,
                        "maximum": 12,
                        "type": "integer",
                        "description": "How many states to fetch in parallel.",
                        "default": 6
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Proxies to use. Residential US proxies are required — the official Education Data API is behind a Cloudflare challenge that blocks datacenter IPs.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ],
                            "apifyProxyCountry": "US"
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
