# GreatSchools API

> GreatSchools returns school ratings, profile facts, and nearby school data as a workflow and API.

GreatSchools, also called Great Schools or GS, returns a school's ratings and key facts from its name and city and state. Search schools finds nearby schools and their ratings from a US address, city, or ZIP code, with optional grade and school type filters.

- Page: https://fous.com/workflows/greatschools
- Handle: `@greatschools`
- Category: [Education](https://fous.com/workflows/category/education)
- Source website: https://greatschools.org
- Last verified: Sep 29, 2026
- Fous is not affiliated with GreatSchools.

## Methods

### Get school

Operation `get_school`, version 1. 1 credit per call.

Get a GreatSchools rating and key facts for a school by name and city and state. Ratings or details not published on the school profile are null.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `school` | string | yes | `"Alameda Elementary School"` | School name, for example Lincoln High School. |
| `location` | string | yes | `"Portland, OR"` | City and two-letter state, for example Portland, OR. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "school",
    "location"
  ],
  "properties": {
    "school": {
      "type": "string",
      "description": "School name, for example Lincoln High School.",
      "examples": [
        "Alameda Elementary School",
        "Lincoln High School",
        "Boston Latin School"
      ]
    },
    "location": {
      "type": "string",
      "description": "City and two-letter state, for example Portland, OR.",
      "examples": [
        "Portland, OR",
        "Boston, MA"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "school": "Alameda Elementary School",
      "location": "Portland, OR"
    },
    {
      "school": "Lincoln High School",
      "location": "Portland, OR"
    },
    {
      "school": "Boston Latin School",
      "location": "Boston, MA"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `type` | string or null | `"public"` | Public, charter or private school. |
| `phone` | string or null | `"(503) 916-6036"` |  |
| `address` | string or null | `"2732 Northeast Fremont Street, Portland, OR 97212"` |  |
| `website` | string or null | `"http://www.pps.net/schools/alameda"` |  |
| `district` | string or null | `"Portland School District 1j"` |  |
| `school_name` | string | `"Alameda Elementary School"` |  |
| `equity_rating` | integer or null |  |  |
| `grades_served` | string or null | `"K-5"` |  |
| `greatschools_link` | string | `"https://www.greatschools.org/oregon/portland/866-Alameda-Elementary-School/"` |  |
| `number_of_students` | integer or null | `498` |  |
| `test_scores_rating` | integer or null | `10` |  |
| `greatschools_rating` | integer or null | `10` | GreatSchools rating from 1 to 10, if shown. |
| `student_teacher_ratio` | string or null | `"19:1"` | Students per teacher, such as 18:1. |
| `student_progress_rating` | integer or null | `6` |  |
| `college_readiness_rating` | integer or null | `6` |  |

**Example input**

```json
{
  "school": "Alameda Elementary School",
  "location": "Portland, OR"
}
```

**Example output**

```json
{
  "type": "public",
  "phone": "(503) 916-6036",
  "address": "2732 Northeast Fremont Street, Portland, OR 97212",
  "website": "http://www.pps.net/schools/alameda",
  "district": "Portland School District 1j",
  "school_name": "Alameda Elementary School",
  "equity_rating": null,
  "grades_served": "K-5",
  "greatschools_link": "https://www.greatschools.org/oregon/portland/866-Alameda-Elementary-School/",
  "number_of_students": 498,
  "test_scores_rating": 10,
  "greatschools_rating": 10,
  "student_teacher_ratio": "19:1",
  "student_progress_rating": 6,
  "college_readiness_rating": null
}
```

### Search schools

Operation `search_schools`, version 1. 1 credit per call.

Find GreatSchools schools within 5 miles of a US address, city, or ZIP code. Filter by grade and school type, and sort by distance or rating. Distances are straight-line estimates from the matched location; an unmatched location returns no schools.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `sort` | string | no | `"rating"` | Order results by proximity or GreatSchools rating, for example distance. |
| `location` | string | yes | `"1 Dr Carlton B Goodlett Place, San Francisco, CA"` | US street address, city and state, or ZIP code, for example 94107. |
| `grade_level` | string | no | `"elementary"` | Grade range to include, for example elementary. |
| `max_results` | integer | no | `7` | Maximum schools to return, for example 20. |
| `school_type` | string | no | `"public"` | Type of school to include, for example public. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "location"
  ],
  "properties": {
    "sort": {
      "enum": [
        "distance",
        "rating"
      ],
      "type": "string",
      "default": "distance",
      "description": "Order results by proximity or GreatSchools rating, for example distance.",
      "examples": [
        "rating",
        "distance"
      ]
    },
    "location": {
      "type": "string",
      "minLength": 2,
      "description": "US street address, city and state, or ZIP code, for example 94107.",
      "examples": [
        "1 Dr Carlton B Goodlett Place, San Francisco, CA",
        "94107",
        "Portland, OR"
      ]
    },
    "grade_level": {
      "enum": [
        "any",
        "preschool",
        "elementary",
        "middle",
        "high"
      ],
      "type": "string",
      "default": "any",
      "description": "Grade range to include, for example elementary.",
      "examples": [
        "elementary",
        "high"
      ]
    },
    "max_results": {
      "type": "integer",
      "default": 20,
      "maximum": 100,
      "minimum": 1,
      "description": "Maximum schools to return, for example 20.",
      "x-fous-developer": true,
      "examples": [
        7,
        5
      ]
    },
    "school_type": {
      "enum": [
        "any",
        "public",
        "charter",
        "private"
      ],
      "type": "string",
      "default": "any",
      "description": "Type of school to include, for example public.",
      "examples": [
        "public",
        "charter"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "sort": "rating",
      "location": "1 Dr Carlton B Goodlett Place, San Francisco, CA",
      "grade_level": "elementary",
      "max_results": 7,
      "school_type": "public"
    },
    {
      "location": "94107"
    },
    {
      "sort": "distance",
      "location": "Portland, OR",
      "grade_level": "high",
      "max_results": 5,
      "school_type": "public"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `schools` | array |  |  |
| `schools[].type` | string or null | `"Public"` |  |
| `schools[].address` | string or null | `"1250 Waller Street, San Francisco, CA 94117"` |  |
| `schools[].school_name` | string | `"Chinese Immersion School At Deavila"` |  |
| `schools[].grades_served` | string or null | `"K-5"` |  |
| `schools[].distance_miles` | number or null | `1.52` | Straight-line distance from the matched location, in miles. |
| `schools[].greatschools_link` | string | `"https://www.greatschools.org/california/san-francisco/25096-Chinese-Immersion-School-At-Deavila/"` |  |
| `schools[].number_of_students` | integer or null | `407` |  |
| `schools[].greatschools_rating` | integer or null | `10` | GreatSchools rating, 1 to 10, or null if unrated. |

**Example input**

```json
{
  "sort": "rating",
  "location": "1 Dr Carlton B Goodlett Place, San Francisco, CA",
  "grade_level": "elementary",
  "max_results": 7,
  "school_type": "public"
}
```

**Example output**

```json
{
  "schools": [
    {
      "type": "Public",
      "address": "1250 Waller Street, San Francisco, CA 94117",
      "school_name": "Chinese Immersion School At Deavila",
      "grades_served": "K-5",
      "distance_miles": 1.52,
      "greatschools_link": "https://www.greatschools.org/california/san-francisco/25096-Chinese-Immersion-School-At-Deavila/",
      "number_of_students": 407,
      "greatschools_rating": 10
    },
    {
      "type": "Public",
      "address": "3630 Divisadero Street, San Francisco, CA 94123",
      "school_name": "Lilienthal (Claire) Elementary School",
      "grades_served": "K-8",
      "distance_miles": 2.08,
      "greatschools_link": "https://www.greatschools.org/california/san-francisco/6394-Lilienthal-Claire-Elementary-School/",
      "number_of_students": 673,
      "greatschools_rating": 10
    },
    {
      "type": "Public",
      "address": "251 6th Avenue, San Francisco, CA 94118",
      "school_name": "Peabody (George) Elementary School",
      "grades_served": "K-5",
      "distance_miles": 2.52,
      "greatschools_link": "https://www.greatschools.org/california/san-francisco/6421-Peabody-George-Elementary-School/",
      "number_of_students": 269,
      "greatschools_rating": 10
    }
  ]
}
```

## Quick start

Call the API with a Fous API key (`FOUS_API_KEY`). To create one, turn on Developer mode in Fous Studio, then open Keys & connections → API keys (https://app.fous.com/keys).

```bash
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
: "${FOUS_API_KEY:?Set FOUS_API_KEY before running this example}"

curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 120 \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@greatschools",
  "visibility": "public",
  "operation": "get_school",
  "version": 1,
  "input": {
    "school": "Alameda Elementary School",
    "location": "Portland, OR"
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
import json
import os
import urllib.error
import urllib.request

api_key = os.environ.get("FOUS_API_KEY")
if not api_key:
    raise RuntimeError("Set FOUS_API_KEY before running this example")

body = json.loads("{\n  \"api\": \"@greatschools\",\n  \"visibility\": \"public\",\n  \"operation\": \"get_school\",\n  \"version\": 1,\n  \"input\": {\n    \"school\": \"Alameda Elementary School\",\n    \"location\": \"Portland, OR\"\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=120) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
// First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
const apiKey = process.env.FOUS_API_KEY;
if (!apiKey) throw new Error("Set FOUS_API_KEY before running this example");

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(120_000),
  body: JSON.stringify({
  "api": "@greatschools",
  "visibility": "public",
  "operation": "get_school",
  "version": 1,
  "input": {
    "school": "Alameda Elementary School",
    "location": "Portland, OR"
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

Or describe the data in plain language: send `{"api":"@greatschools","prompt":"Describe the data you need, with every detail"}` to the same URL. Fous fills in the input, runs the method that fits and returns only the fields you asked for; `data.route.calls[].request` is the exact call it made. Routing is free; the run costs the same.

## Use cases

- Compare school ratings and key facts by location.
- Find nearby schools by grade level and type.
- Sort nearby school options by distance or rating.
- Review enrollment, grade range, and student-teacher ratios.
- Identify schools with ratings for equity, progress, or college readiness.

## FAQ

### Is Fous affiliated with GreatSchools?

No. Fous is not affiliated with GreatSchools. This workflow reads the public greatschools.org website and returns its data.

### How much does it cost?

Each run costs 1 credit. With pay-as-you-go, a credit costs 1¢; monthly plans cost less per credit.

### Do I need a GreatSchools account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from greatschools.org when you run it; repeating the same request within a day may return the saved result. Fous checks this workflow automatically; it last passed a check on Sep 29, 2026.

### What is a school's GreatSchools rating?

Use Get school with the school name and city and state to retrieve its GreatSchools rating, if shown.

### Which schools are near a location?

Use Search schools with a US address, city and state, or ZIP code to find schools within 5 miles.

### How many students attend a school?

Get school returns the number of students for a named school and location; Search schools includes student counts for nearby results.

## Related

- [College Scorecard API](https://fous.com/workflows/college-scorecard.md): College Scorecard returns US college costs and outcomes, including admissions, graduation, debt, and earnings; some figures may be missing, and comparisons cover 2–5 colleges.
- [QS Top Universities API](https://fous.com/workflows/qs-top-universities.md): QS Top Universities provides rankings and profiles with latest world ranks, student figures, up to five subject ranks and listed tuition; subject editions may differ.
- [Yelp API](https://fous.com/workflows/yelp.md): Yelp returns local business matches, public profiles, ratings and up to 60 publicly shown reviews; matches are unsponsored and Yelp-ordered, but later results may lack contact or location details.
- [Google Maps API](https://fous.com/workflows/google-maps.md): Google Maps returns nearby places, public place details, up to 100 public reviews, and up to three routes; transit options vary by departure time.
- [Goodreads API](https://fous.com/workflows/goodreads.md): Goodreads returns public book searches, matched-book details with variable editions, popular or newest reviews, author books by popularity or date, and up to 100 quotes.
- [Realtor.com API](https://fous.com/workflows/realtor-com.md): Realtor.com returns home listings for sale, rent, or recently sold, property details and estimates, and local agent profiles; some fields or sold prices may be missing.
- [Apartments.com API](https://fous.com/workflows/apartments-com.md): Apartments.com returns U.S. apartments and homes matching location and optional filters, plus community details; rent and availability may be missing or change.
- [Zillow API](https://fous.com/workflows/zillow.md): Zillow provides homes for sale, rental listings, home details, estimates, and housing market figures; rental details, history, schools, estimates, and market figures may be missing or reflect different reporting dates.
- [All Education workflows](https://fous.com/workflows/category/education)
