GreatSchools API: Search schools near a location
Finds GreatSchools schools within 5 miles of a US address, city or ZIP code. Results can be filtered by grade and school type and sorted by distance or rating.
Unofficial. Not affiliated with or endorsed by GreatSchools.
Inputs
Values from the run on Oct 23, 2026, shown under Output.
- Sort optional
sort Order results by proximity or GreatSchools rating, for example distance.
distance (default)
One of
distance,rating.- Location, required
location US street address, city and state, or ZIP code, for example 94107.
94107
2 characters or more.
- Grade Level optional
grade_level Grade range to include, for example elementary.
any (default)
One of
any,preschool,elementary,middle,high.- Max Results optional
max_results Maximum schools to return, for example 20.
20 (default)
Whole number from 1 to 100.
- School Type optional
school_type Type of school to include, for example public.
any (default)
One of
any,public,charter,private.
Input as JSON
{ "location": "94107"}Output
{ "schools": [ { "type": "Private", "address": "465 Missouri St., San Francisco, CA 94107", "school_name": "Potrero Kids at Daniel Webster (PKDW) Preschool", "grades_served": "PK", "distance_miles": 0.11, "greatschools_link": "https://www.greatschools.org/california/san-francisco/25201-Potrero-Kids-At-Daniel-Webster-PKDW-Preschool/" , "number_of_students": null, "greatschools_rating": null }, { "type": "Other", "address": "455 Arkansas Street, San Francisco, CA 94107", "school_name": "Bertrand D Hsu American & Chinese Bicultural Academy", "grades_served": "K-8", "distance_miles": 0.12, "greatschools_link": "https://www.greatschools.org/california/san-francisco/33953-Bertrand-D-Hsu-American--Chinese-Bicultural-Academy/" , "number_of_students": null, "greatschools_rating": null }, { "type": "Public", "address": "465 Missouri Street, San Francisco, CA 94107", "school_name": "Daniel Webster Elementary School", "grades_served": "K-5", "distance_miles": 0.14, "greatschools_link": "https://www.greatschools.org/california/san-francisco/6451-Daniel-Webster-Elementary-School/" , "number_of_students": 354, "greatschools_rating": 8 } ]}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"greatschools.org/search_schools","input":{"location":"94107"}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "greatschools.org/search_schools" , "input": { "location": "94107" }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "greatschools.org/search_schools" , "input": { "location": "94107" } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run greatschools.org/search_schools# with {"location":"94107"}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "required": [ "location" ], "properties": { "sort": { "enum": [ "distance", "rating" ], "type": "string", "default": "distance", "description": "Order results by proximity or GreatSchools rating, for example distance." }, "location": { "type": "string", "minLength": 2, "description": "US street address, city and state, or ZIP code, for example 94107." }, "grade_level": { "enum": [ "any", "preschool", "elementary", "middle", "high" ], "type": "string", "default": "any", "description": "Grade range to include, for example elementary." }, "max_results": { "type": "integer", "default": 20, "maximum": 100, "minimum": 1, "description": "Maximum schools to return, for example 20." }, "school_type": { "enum": [ "any", "public", "charter", "private" ], "type": "string", "default": "any", "description": "Type of school to include, for example public." } }}Output schema
{ "type": "object", "required": [ "schools" ], "properties": { "schools": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": [ "string", "null" ] }, "address": { "type": [ "string", "null" ] }, "school_name": { "type": "string" }, "grades_served": { "type": [ "string", "null" ] }, "distance_miles": { "type": [ "number", "null" ] }, "greatschools_link": { "type": "string" }, "number_of_students": { "type": [ "integer", "null" ] }, "greatschools_rating": { "type": [ "integer", "null" ] } } } } }}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
greatschools.org/search_schools- Returns
- school name, rating, grades, type, distance, address, enrollment, link
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method greatschools.org/search_schools with the inputs above.
Ask your agent
- Find the top rated public elementary schools within 5 miles of ZIP code 78701, sorted by rating.
- What schools are near 412 Maple Ave, Springfield, IL? I only want high schools and charter schools.
- Show me private middle schools close to Portland, Oregon, closest first, up to 15 results.
- On greatschools.org, list preschools within 5 miles of 60614 sorted by distance.
- I'm relocating to Austin, TX and need a list of any-type schools near 30301 Peachtree area, ranked by GreatSchools rating, maximum 50.
See more
All GreatSchools methodsFinds a school on GreatSchools by name, city and state. Returns its ratings and key facts; anything the profile does not publish is null.
greatschools.org/get_schoolSearches Zillow homes for sale in a city and state, neighborhood or ZIP code, with optional price, bedroom, bathroom and property type filters and sort order, from Zillow's public search pages (up to 100 listings).
zillow.com/search_homesFinds real estate agents working in a city and state or ZIP code on Realtor.com, in Realtor.com's relevance order, with ratings, sales figures, price range, languages and phone number when published.
realtor.com/search_agentsFinds recent USGS earthquakes near a city, address, or region, with distances and times in the searched place's time zone.
earthquake.usgs.gov/search_earthquakesFinds McDonald's restaurants within 50 miles of a US city, address or ZIP code, nearest first. Each result includes today's hours, services and directions. Open-now status follows the listed hours.
mcdonalds.com/search_restaurantsFinds the AutoZone stores nearest a US ZIP code, city or street address, with contact details, opening hours, whether each is open now, distance and store page links.
autozone.com/search_storesFinds OfferUp items for sale near a US city or ZIP code, with prices, condition, seller names, distance and links. Distances use approximate listing locations.
offerup.com/search_listingsLists UK postcodes nearest to a postcode or named place, with distance, ward, council and coordinates. For places sharing a name, a city or town is preferred.
postcodes.io/list_nearby_postcodes