# Greatschools Scraper (`parseforge/greatschools-scraper`) Actor

Get complete school information, ratings, reviews, demographics, and academic performance data from the official GreatSchools.org database. Perfect for parents, educators, researchers, and real estate professionals who need accurate, up-to-date school intelligence without manual work.

- **URL**: https://apify.com/parseforge/greatschools-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Lead generation, E-commerce, Other
- **Stats:** 59 total users, 2 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/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

![ParseForge Banner](https://github.com/ParseForge/apify-assets/blob/ad35ccc13ddd068b9d6cba33f323962e39aed5b2/banner.jpg?raw=true)

## 🎓 GreatSchools Scraper

> 🚀 **Export school ratings, demographics, and principal contact info in seconds.** Search **every school in the U.S.** by city, state, level, or type. No API key, no registration, no manual research.

> 🕒 **Last updated:** 2026-04-23 · **📊 47 fields** per school · **🇺🇸 All US states** · **⭐ Ratings & demographics** · **📞 Principal contact** · **🚫 No auth** required

The **GreatSchools Scraper** exports structured records from GreatSchools.org and returns **47 fields per school**, including ratings, test scores, demographics, enrollment, principal contact details, website, phone, and street address. GreatSchools is the most-cited U.S. K-12 rating source, feeding school data into Zillow, Redfin, Realtor.com, and Trulia listings.

Coverage spans **all 50 states plus D.C.**, with public, charter, and private schools across pre-K, elementary, middle, and high school levels. This Actor makes that data downloadable as CSV, Excel, JSON, or XML in under five minutes. All filters run server-side, so you skip the parser engineering entirely.

| 🎯 Target Audience | 💡 Primary Use Cases |
|---|---|
| Real estate agents, relocation services, parents, school district analysts, EdTech platforms, researchers, journalists | Neighborhood scoring, relocation reports, school lead lists, market research, demographics analysis, principal outreach |

---

### 📋 What the GreatSchools Scraper does

Two input modes, one clean output:

- 📍 **Location search.** Enter a city and state (e.g. `Orlando, FL`) and filter by school level and type.
- 🔗 **Direct URL.** Paste any GreatSchools.org search or listing URL for custom queries already configured in the browser.
- 🏫 **Level filter.** Pre-K, elementary, middle, or high school. Combine freely or leave empty for all.
- 🏷️ **Type filter.** Public, charter, or private. Mix and match across one run.
- 📞 **Principal contact.** Each record includes principal name, email, phone, and school website when published.

Each school record ships with ratings, test scores, student-teacher ratio, enrollment, racial and income demographics, discipline data, and awards such as the College Success Award and Thrive Award.

> 💡 **Why it matters:** school quality is the top factor in U.S. residential property values. Pulling this data by hand means clicking through tens of thousands of profiles. This Actor skips all of that and keeps your dataset fresh on every run.

---

### 🎬 Full Demo

_🚧 Coming soon: a 3-minute walkthrough showing how to go from sign-up to a downloaded dataset._

---

### ⚙️ Input

<table>
<thead>
<tr><th>Input</th><th>Type</th><th>Default</th><th>Behavior</th></tr>
</thead>
<tbody>
<tr><td>maxItems</td><td>integer</td><td>10</td><td>Records to return. Free plan caps at 100, paid plan at 1,000,000.</td></tr>
<tr><td>location</td><td>string</td><td>"Oklahoma City, OK"</td><td>City and state. Mutually exclusive with startUrl.</td></tr>
<tr><td>startUrl</td><td>string</td><td>null</td><td>Any greatschools.org URL. Bypasses the location input.</td></tr>
<tr><td>schoolLevels</td><td>array</td><td>[]</td><td>Any of prek, elementary, middle, high. Empty = all levels.</td></tr>
<tr><td>schoolTypes</td><td>array</td><td>[]</td><td>Any of public, charter, private. Empty = all types.</td></tr>
</tbody>
</table>

**Example: 50 public and charter high schools in San Francisco.**

```json
{
    "maxItems": 50,
    "location": "San Francisco, CA",
    "schoolLevels": ["high"],
    "schoolTypes": ["public", "charter"]
}
````

**Example: custom search via URL.**

```json
{
    "maxItems": 100,
    "startUrl": "https://www.greatschools.org/best-schools/california/san-francisco?st[]=public&st[]=charter"
}
```

> ⚠️ **Good to Know:** principal email, phone, and school website are pulled from individual profile pages, so these fields populate only when GreatSchools has published contact information for that specific school. Small private schools often omit these fields.

***

### 📊 Output

Each school record contains **47 fields**. Download the dataset as CSV, Excel, JSON, or XML.

#### 🧾 Schema

| Field | Type | Example |
|---|---|---|
| 🆔 `id` | string | `"6523"` |
| 🏢 `name` | string | `"Abraham Lincoln High School"` |
| 🔗 `url` | string | `"https://www.greatschools.org/california/..."` |
| 🏷️ `schoolType` | string | `"public"` |
| 🎓 `gradeLevels` | string | `"9-12"` |
| 🏛️ `district_id` | string | null | `"5441"` |
| 🏫 `district_name` | string | null | `"San Francisco Unified"` |
| 🏙️ `district_city` | string | null | `"San Francisco"` |
| 📮 `contact_street` | string | `"2162 24th Ave"` |
| 🏙️ `contact_city` | string | `"San Francisco"` |
| 🗺️ `contact_state` | string | `"CA"` |
| 📫 `contact_zip` | string | `"94116"` |
| 📞 `contact_phone` | string | null | `"(415) 469-4680"` |
| 🌐 `contact_website` | string | null | `"https://lincoln.sfusd.edu"` |
| 📘 `contact_facebook` | string | null | `null` |
| 👤 `principal` | string | null | `"Jane Smith"` |
| 📧 `principal_email` | string | null | `"smithj@sfusd.edu"` |
| ⭐ `rating` | number | `8` |
| 🔢 `rating_scale` | string | `"Above average"` |
| 📝 `reviews_totalCount` | number | `142` |
| 📊 `reviews_averageRating` | number | `4.3` |
| 👥 `enrollment_total` | number | `2080` |
| 🌍 `enrollment_demographics` | array | `[{ "demo_group": "Asian", "demo_percentage": 72 }]` |
| 📈 `studentProgressRating` | number | null | `7` |
| 📚 `testScoresRating` | number | null | `8` |
| ⚖️ `equityRating` | number | null | `6` |
| 🏆 `coursesAndPrograms` | array | `["College Success Award"]` |
| 🧪 `testScores` | array | `[{ "test_subject": "Math", "test_proficiencyPercentage": 80 }]` |
| 💰 `lowIncome_percentage` | number | null | `42.5` |
| 🏷️ `lowIncome_performanceLabel` | string | null | `"42.5%"` |
| 🌐 `raceEthnicity_summary` | string | `"Asian: 72%, Hispanic: 12%"` |
| 📊 `raceEthnicity_data` | array | `[{ "race_group": "Asian", ... }]` |
| 🚷 `discipline_suspensions` | object | null | `{ "rate": "1.2%" }` |
| 📉 `discipline_absences` | object | null | `{ "rate": "5.4%" }` |
| 🏘️ `nearbySchools` | array | `[]` |
| 📍 `latitude` | number | `37.7475` |
| 📍 `longitude` | number | `-122.481` |
| 📏 `distance` | number | `2.3` |
| 👨‍🏫 `studentsPerTeacher` | number | `24` |
| 🎖️ `csaAwardYears` | array | `[2023, 2024]` |
| 🌟 `thriveAwardYears` | array | `[2024]` |
| ✅ `equityIndicator` | boolean | `true` |
| 🎓 `collegePersistentData` | object | null | `{ ... }` |
| 🏛️ `collegeEnrollmentData` | object | null | `{ ... }` |
| 🧮 `subratings` | object | `{ "Test Scores Rating": 8 }` |
| 🛠️ `remediationData` | object | null | `{ ... }` |
| 🕒 `scrapedTimestamp` | ISO 8601 | `"2026-04-21T00:00:00.000Z"` |

#### 📦 Sample records

<details>
<summary><strong>🏫 Top-rated public high school: Lowell High School, San Francisco</strong></summary>

```json
{
    "id": "6523",
    "name": "Lowell High School",
    "url": "https://www.greatschools.org/california/san-francisco/6523-Lowell-High-School/",
    "schoolType": "public",
    "gradeLevels": "9-12",
    "district_name": "San Francisco Unified School District",
    "contact_street": "1101 Eucalyptus Dr",
    "contact_city": "San Francisco",
    "contact_state": "CA",
    "contact_zip": "94132",
    "contact_phone": "(415) 759-2730",
    "contact_website": "https://lhs-sfusd-ca.schoolloop.com",
    "principal": "Michael Jones",
    "principal_email": "jonesm@sfusd.edu",
    "rating": 9,
    "rating_scale": "Top-rated",
    "reviews_totalCount": 287,
    "reviews_averageRating": 4.5,
    "enrollment_total": 2620,
    "studentsPerTeacher": 26,
    "testScoresRating": 10,
    "equityRating": 7,
    "csaAwardYears": [2023, 2024],
    "latitude": 37.7275,
    "longitude": -122.4716,
    "scrapedTimestamp": "2026-04-21T00:00:00.000Z"
}
```

</details>

<details>
<summary><strong>🏫 Charter elementary: KIPP Bay Area</strong></summary>

```json
{
    "id": "15892",
    "name": "KIPP Bayview Academy",
    "schoolType": "charter",
    "gradeLevels": "K-8",
    "contact_city": "San Francisco",
    "contact_state": "CA",
    "contact_zip": "94124",
    "rating": 7,
    "reviews_totalCount": 38,
    "reviews_averageRating": 4.1,
    "enrollment_total": 612,
    "lowIncome_percentage": 88.5,
    "raceEthnicity_summary": "Hispanic: 62%, Black: 24%",
    "thriveAwardYears": [2024],
    "equityIndicator": true,
    "scrapedTimestamp": "2026-04-21T00:00:00.000Z"
}
```

</details>

<details>
<summary><strong>🏫 Suburban middle school: Frisco, TX</strong></summary>

```json
{
    "id": "23441",
    "name": "Hunt Middle School",
    "schoolType": "public",
    "gradeLevels": "6-8",
    "district_name": "Frisco ISD",
    "contact_city": "Frisco",
    "contact_state": "TX",
    "contact_zip": "75035",
    "contact_phone": "(469) 633-3500",
    "rating": 8,
    "enrollment_total": 1180,
    "studentsPerTeacher": 17,
    "testScoresRating": 9,
    "studentProgressRating": 7,
    "scrapedTimestamp": "2026-04-21T00:00:00.000Z"
}
```

</details>

***

### ✨ Why choose this Actor

| | Capability |
|---|---|
| 🇺🇸 | **National coverage.** Every public, charter, and private K-12 school in the 50 states plus D.C. |
| 📞 | **Contact enrichment.** Principal name, email, school phone, website, and Facebook pulled from each school profile. |
| 📊 | **47 fields per school.** Ratings, test scores, enrollment, demographics, discipline, awards, and geo in a single record. |
| ⚡ | **Fast.** 10 schools in under 10 seconds, 1,000 records in about 3 minutes. |
| 🔁 | **Always fresh.** Every run hits GreatSchools live, so your dataset reflects today's ratings and demographics. |
| 🚫 | **No authentication.** Works with publicly listed school data. No login or API key needed. |
| 🧩 | **Flexible input.** Location-based search or any existing GreatSchools URL, including faceted filters. |

> 📊 Accurate school data is the single largest driver of residential property value in the U.S. and the foundation of every relocation, redlining, and EdTech product.

***

### 📈 How it compares to alternatives

| Approach | Cost | Coverage | Refresh | Filters | Setup |
|---|---|---|---|---|---|
| **⭐ GreatSchools Scraper** *(this Actor)* | $5 free credit, then pay-per-use | **Every U.S. K-12 school** | **Live per run** | Location, level, type, URL | ⚡ 2 min |
| State DOE CSV exports | Free | One state at a time | Yearly | Basic | 🐢 Days |
| Commercial EdTech data vendors | $5,000+/year | National | Quarterly | Many | ⏳ Weeks |
| Manual GreatSchools copy-paste | Free | Tiny samples | Stale immediately | None | 🕒 Hours per city |

Pick this Actor when you want national coverage, live refresh, and no pipeline maintenance.

***

### 🚀 How to use

1. 📝 **Sign up.** [Create a free account with $5 credit](https://console.apify.com/sign-up?fpr=vmoqkp) (takes 2 minutes).
2. 🌐 **Open the Actor.** Go to the GreatSchools Scraper page on the Apify Store.
3. 🎯 **Set input.** Enter a city and state, pick school levels and types, and set `maxItems`.
4. 🚀 **Run it.** Click **Start** and let the Actor collect your data.
5. 📥 **Download.** Grab your results in the **Dataset** tab as CSV, Excel, JSON, or XML.

> ⏱️ Total time from signup to downloaded dataset: **3-5 minutes.** No coding required.

***

### 💼 Business use cases

<table>
<tr>
<td width="50%" valign="top">

#### 🏡 Real Estate & Relocation

- School-quality overlays on MLS listings
- Neighborhood scoring for buyer reports
- Relocation packets with local school profiles
- Lead lists for family-oriented agents

</td>
<td width="50%" valign="top">

#### 👨‍👩‍👧 Parents & Families

- Side-by-side school comparison sheets
- Filter by rating, demographics, or test scores
- Principal contact for tour requests
- Commute-ready dataset with lat/lon

</td>
</tr>
<tr>
<td width="50%" valign="top">

#### 📚 EdTech & Outreach

- Lead lists for curriculum and SaaS sales
- Principal email outreach campaigns
- Market sizing by district and state
- Partnership scouting by school type

</td>
<td width="50%" valign="top">

#### 🔬 Researchers & Journalists

- Equity and demographic analyses
- Test score and discipline correlations
- Longitudinal datasets via scheduled runs
- District-level aggregation and reporting

</td>
</tr>
</table>

***

### 🌟 Beyond business use cases

Data like this powers more than commercial workflows. The same structured records support research, education, civic projects, and personal initiatives.

<table>
<tr>
<td width="50%">

#### 🎓 Research and academia

- Empirical datasets for papers, thesis work, and coursework
- Longitudinal studies tracking changes across snapshots
- Reproducible research with cited, versioned data pulls
- Classroom exercises on data analysis and ethical scraping

</td>
<td width="50%">

#### 🎨 Personal and creative

- Side projects, portfolio demos, and indie app launches
- Data visualizations, dashboards, and infographics
- Content research for bloggers, YouTubers, and podcasters
- Hobbyist collections and personal trackers

</td>
</tr>
<tr>
<td width="50%">

#### 🤝 Non-profit and civic

- Transparency reporting and accountability projects
- Advocacy campaigns backed by public-interest data
- Community-run databases for local issues
- Investigative journalism on public records

</td>
<td width="50%">

#### 🧪 Experimentation

- Prototype AI and machine-learning pipelines with real data
- Validate product-market hypotheses before engineering spend
- Train small domain-specific models on niche corpora
- Test dashboard concepts with live input

</td>
</tr>
</table>

### 🔌 Automating GreatSchools Scraper

Control the scraper programmatically for scheduled runs and pipeline integrations:

- 🟢 **Node.js.** Install the `apify-client` NPM package.
- 🐍 **Python.** Use the `apify-client` PyPI package.
- 📚 See the [Apify API documentation](https://docs.apify.com/api/v2) for full details.

The [Apify Schedules feature](https://docs.apify.com/platform/schedules) lets you trigger this Actor on any cron interval. Hourly, daily, or weekly refreshes keep downstream databases in sync automatically.

***

### 🤖 Ask an AI assistant about this scraper

Open a ready-to-send prompt about this ParseForge actor in the AI of your choice:

- 💬 [**ChatGPT**](https://chat.openai.com/?q=How%20do%20I%20use%20the%20GreatSchools%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)
- 🧠 [**Claude**](https://claude.ai/new?q=How%20do%20I%20use%20the%20GreatSchools%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)
- 🔍 [**Perplexity**](https://perplexity.ai/search?q=How%20do%20I%20use%20the%20GreatSchools%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)
- 🅒 [**Copilot**](https://copilot.microsoft.com/?q=How%20do%20I%20use%20the%20GreatSchools%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)

***

### ❓ Frequently Asked Questions

#### 🧩 How does it work?

Enter a city and state, pick school levels and types, click Start, and the Actor queries GreatSchools.org directly, visits each school profile for enrichment, and emits a clean structured record per school. No browser automation, no captchas, no setup.

#### 📏 How accurate is the data?

Ratings, test scores, demographics, and enrollment come straight from GreatSchools, which aggregates state DOE reports and federal data. Principal contact details depend on what each school publishes on its GreatSchools profile. Small private schools sometimes omit email and phone.

#### 🔁 How often is the dataset refreshed?

GreatSchools updates ratings annually after new state test results are released (typically late summer to fall). Every run of this Actor fetches the latest published data, so your dataset reflects the current state of the site at run time.

#### 🇺🇸 Does it cover all 50 states?

Yes. GreatSchools catalogs every public and charter school in the 50 states plus D.C., along with most private schools. This Actor can search any U.S. city or zip code.

#### 📞 Can I get principal email addresses?

Yes, when GreatSchools publishes them on the school profile. Coverage is strongest for public schools in mid-sized and larger districts. Private and very small schools sometimes omit contact info.

#### ⏰ Can I schedule regular runs?

Yes. Use Apify Schedules to run this Actor on any cron interval (hourly, daily, weekly) and keep a downstream database in sync.

#### ⚖️ Is this data legal to use?

This Actor collects only publicly listed information on GreatSchools.org profile pages. You are responsible for complying with applicable terms of service and for any downstream regulatory requirements in your own product.

#### 💼 Can I use this data commercially?

Yes, for internal research, lead scoring, and relocation reports. Review the GreatSchools terms of use before publishing the raw dataset or using it for automated outreach at scale.

#### 💳 Do I need a paid Apify plan to use this Actor?

No. The free Apify plan is enough for testing and small runs (up to 100 records per run). A paid plan lifts the limit and gives you access to scheduling, higher concurrency, and larger datasets.

#### 🔁 What happens if a run fails or gets interrupted?

Apify automatically retries transient errors. If a run still fails, you can inspect the log in the Runs tab, fix the input, and re-run. Partial datasets from failed runs are preserved so you never lose progress.

#### 🏫 What if I need district-level aggregates?

This Actor returns school-level records with district identifiers attached, so you can group and aggregate in SQL, pandas, or a spreadsheet. For a pre-aggregated district scraper, reach out via the contact form below.

#### 🆘 What if I need help?

Our support team is here to help. Contact us through the Apify platform or use the Tally form linked below.

***

### 🔌 Integrate with any app

GreatSchools Scraper connects to any cloud service via [Apify integrations](https://apify.com/integrations):

- [**Make**](https://docs.apify.com/platform/integrations/make) - Automate multi-step workflows
- [**Zapier**](https://docs.apify.com/platform/integrations/zapier) - Connect with 5,000+ apps
- [**Slack**](https://docs.apify.com/platform/integrations/slack) - Get run notifications in your channels
- [**Airbyte**](https://docs.apify.com/platform/integrations/airbyte) - Pipe school data into your warehouse
- [**GitHub**](https://docs.apify.com/platform/integrations/github) - Trigger runs from commits and releases
- [**Google Drive**](https://docs.apify.com/platform/integrations/drive) - Export datasets straight to Sheets

You can also use webhooks to trigger downstream actions when a run finishes. Push fresh school data into your CRM, or alert your team in Slack.

***

### 🔗 Recommended Actors

- [**🏠 Realtor.com Scraper**](https://apify.com/parseforge/realtor-com-scraper) - U.S. home listings with prices, beds, and school districts
- [**🏡 Zillow Scraper**](https://apify.com/parseforge/zillow-scraper) - Zestimates, sold history, and listing details
- [**🔴 Redfin Scraper**](https://apify.com/parseforge/redfin-scraper) - MLS-backed listings and market stats
- [**🏘️ Trulia Scraper**](https://apify.com/parseforge/trulia-scraper) - Neighborhood insights and local school data
- [**🏢 Apartments.com Scraper**](https://apify.com/parseforge/apartments-com-scraper) - Rental listings with amenities and rent history

> 💡 **Pro Tip:** browse the complete [ParseForge collection](https://apify.com/parseforge) for more real estate and reference-data scrapers.

***

**🆘 Need Help?** [**Open our contact form**](https://tally.so/r/BzdKgA) to request a new scraper, propose a custom data project, or report an issue.

***

> **⚠️ Disclaimer:** this Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by GreatSchools.org or any of its partners. All trademarks mentioned are the property of their respective owners. Only publicly available school data is collected.

# Actor input Schema

## `startUrl` (type: `string`):

GreatSchools.org URL to start scraping from. Use this for custom searches or specific URLs. Cannot be used together with location, schoolLevels, or schoolTypes.

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

Maximum number of schools to collect. Free users: Limited to 100. Paid users: Optional, max 1,000,000

## `location` (type: `string`):

Enter a city and state to search for schools (e.g. 'Orlando, FL'). Required if startUrl is not provided.

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

Select school levels to filter by (optional). Leave empty to include all levels.

## `schoolTypes` (type: `array`):

Select school types to filter by (optional). Leave empty to include all types.

## Actor input object example

```json
{
  "startUrl": "https://www.greatschools.org/best-schools/california/san-francisco?st[]=public&st[]=charter",
  "maxItems": 10,
  "location": "Oklahoma City, OK",
  "schoolLevels": [
    "elementary",
    "middle",
    "high"
  ],
  "schoolTypes": [
    "public",
    "charter"
  ]
}
```

# Actor output Schema

## `overview` (type: `string`):

Overview view of schools with key fields displayed in a table format

## `schools` (type: `string`):

Complete dataset with all scraped schools including ratings, reviews, demographics, academic performance, contact information, and location data

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

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

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "maxItems": 10,
    "location": "Oklahoma City, OK"
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/greatschools-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "maxItems": 10,
    "location": "Oklahoma City, OK",
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/greatschools-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 '{
  "maxItems": 10,
  "location": "Oklahoma City, OK"
}' |
apify call parseforge/greatschools-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Greatschools Scraper",
        "description": "Get complete school information, ratings, reviews, demographics, and academic performance data from the official GreatSchools.org database. Perfect for parents, educators, researchers, and real estate professionals who need accurate, up-to-date school intelligence without manual work.",
        "version": "1.1",
        "x-build-id": "KxtYGD3Zkyso1FF1W"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/parseforge~greatschools-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-parseforge-greatschools-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/parseforge~greatschools-scraper/runs": {
            "post": {
                "operationId": "runs-sync-parseforge-greatschools-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/parseforge~greatschools-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-parseforge-greatschools-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": {
                    "startUrl": {
                        "title": "Start URL",
                        "type": "string",
                        "description": "GreatSchools.org URL to start scraping from. Use this for custom searches or specific URLs. Cannot be used together with location, schoolLevels, or schoolTypes."
                    },
                    "maxItems": {
                        "title": "Max Items",
                        "minimum": 1,
                        "maximum": 1000000,
                        "type": "integer",
                        "description": "Maximum number of schools to collect. Free users: Limited to 100. Paid users: Optional, max 1,000,000"
                    },
                    "location": {
                        "title": "Location",
                        "type": "string",
                        "description": "Enter a city and state to search for schools (e.g. 'Orlando, FL'). Required if startUrl is not provided."
                    },
                    "schoolLevels": {
                        "title": "School Levels",
                        "type": "array",
                        "description": "Select school levels to filter by (optional). Leave empty to include all levels.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "elementary",
                                "middle",
                                "high",
                                "prek"
                            ]
                        }
                    },
                    "schoolTypes": {
                        "title": "School Types",
                        "type": "array",
                        "description": "Select school types to filter by (optional). Leave empty to include all types.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "public",
                                "charter",
                                "private"
                            ]
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
