About this endpoint
What it does
Returns school and district lookup results for U.S. education data, using the request body to select a mode such as search, near, school, district, or bulk. The response returns a JSON object with billing/count metadata and an items array of result rows.
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| lat | Number | No | near mode: centre latitude (use with lon instead of zip). |
| lon | Number | No | near mode: centre longitude. |
| zip | String | No | 5-digit ZIP. Search: schools in this ZIP; near: centre of the radius. |
| city | String | No | City name (search mode), e.g. Austin. |
| mode | ENUM | No | Allowed values: search, near, school, district, bulk. search filters by name/city/state/ZIP/district; near finds schools within radiusMiles of lat/lon or a ZIP; school returns one or more schools by NCES id; district returns all schools of a district (LEAID or name) plus a summary row; bulk accepts up to 50 queries in one call. |
| name | String | No | Part of the school name, case-insensitive (search mode), e.g. Lincoln. |
| level | String Array | No | Public schools only: elementary, middle, high, secondary, prekindergarten, other. |
| limit | Integer | No | 1-5000, default 100. |
| state | String | No | 2-letter code or full name, e.g. CA or California. |
| ncesIds | String Array | No | school mode: up to 50 NCES school ids (12-digit public NCESSCH or 8-character private PPIN). |
| queries | String Array | No | bulk mode: up to 50 objects, each one an input of another mode, e.g. {"mode":"near","zip":"10001","radiusMiles":1}. A failing query returns an error row; the others still answer. |
| district | String | No | District NCES LEAID (7 digits) or district name (search and district modes), e.g. 0622710 (Los Angeles Unified). |
| schoolType | ENUM | No | Allowed values: public, private, all. public is the default. |
| radiusMiles | Number | No | near mode: 0.1-50 miles, default 5. Rows are sorted by distanceMiles. |
Response
Returns a JSON object with billed and count integer fields plus an items array of result objects. Each item may contain school, district, location, status, and metadata fields depending on the mode and data available.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| billed | Integer | Yes | Units charged for this call: result rows only; not-found / unavailable / invalid rows are free. |
| count | Integer | Yes | Number of rows in items. |
| items | Object Array | Yes | Array of result rows. Each row may include the following fields: lat, lon, zip, city, name, error, level, metro, query, stale, state, county, locale, ncesId, source, status, street, charter, rowType, virtual, gradeLow, fetchedAt, gradeHigh, sourceUrl, districtId, enrollment, schoolType, schoolYear, localeLabel, teachersFte, districtName, distanceMiles, schoolCategory, studentTeacherRatio, congressionalDistrict, freeReducedLunchEligible. |



