> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ihuus.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Schools by District

> Returns schools belonging to a specific school district, identified by its
NCES Local Education Agency (LEA) identifier. Results are ordered alphabetically
by school name.

Use the districts endpoint to look up LEA identifiers for a given location.



## OpenAPI

````yaml /openapi.json get /schools/search/school-by-district
openapi: 3.1.0
info:
  title: Neighborhood Intelligence API
  description: >-
    High-performance geospatial API for neighborhood-level intelligence. Covers
    K-12 school search and four scored dimension groups: Vibe (privacy,
    walkability, visual appeal, dog friendliness, urban-rural character,
    liveliness), Environment (acoustic comfort, air quality, industrial
    proximity), Demographics (health insurance coverage, ideological lean,
    population age profile), and Risk (flood and fire hazard).
  contact:
    name: iHuus, Inc.
    url: https://ihuus.com/
  version: 0.1.0
servers:
  - url: https://api.ihuus.com/v1
    description: iHuus API v1
security:
  - BearerAuth: []
tags:
  - name: Schools & Ratings
    description: >-
      Search for K-12 schools by geographic coordinates. Results include
      distance, school level, district information, demographics, and
      performance metrics where available.
  - name: Vibe
    description: >-
      Neighborhood vibe dimension scores. Each endpoint returns a 0-255 score
      for a single dimension (privacy, walkability, visual appeal, dog
      friendliness, urban-rural character) along with a semantic description.
  - name: Environment
    description: >-
      Environment dimension scores (0-255). Includes composite noise levels, air
      quality, and other environmental factors accompanied by detailed source
      breakdowns.
  - name: Demographics
    description: >-
      Demographic dimension scores (0-255) derived from US Census Bureau data.
      Includes health insurance coverage and other population-level indicators.
  - name: Risk
    description: >-
      Risk dimension scores (0-255). Covers natural hazard exposure including
      flood and fire risk, derived from FEMA and other authoritative hazard
      datasets. Lower scores indicate higher risk.
  - name: Tools
    description: >-
      Auxiliary tools for processing data and agent assistance, such as
      geocoding addresses into geospatial coordinates.
paths:
  /schools/search/school-by-district:
    get:
      tags:
        - Schools & Ratings
      summary: Schools by District
      description: >-
        Returns schools belonging to a specific school district, identified by
        its

        NCES Local Education Agency (LEA) identifier. Results are ordered
        alphabetically

        by school name.


        Use the districts endpoint to look up LEA identifiers for a given
        location.
      operationId: ihuus_schools_search_school_by_district
      parameters:
        - name: lea_id
          in: query
          required: true
          schema:
            type: string
            title: Lea Id
            description: >-
              The NCES Local Education Agency (LEA) identifier for the school
              district to search within (e.g. '0602310').
          description: >-
            The NCES Local Education Agency (LEA) identifier for the school
            district to search within (e.g. '0602310').
        - name: level
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              enum:
                - elementary
                - middle
                - high
          description: >-
            Optional filter for school level. Valid values: 'elementary',
            'middle', 'high'. You can include multiple levels separated by
            commas (e.g. 'elementary,middle'). If not specified, schools of all
            levels will be included.
          style: form
          explode: false
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 50
            minimum: 1
            default: 10
            title: Limit
            description: >-
              The maximum number of schools to return (defaults to 10, maximum
              50).
          description: >-
            The maximum number of schools to return (defaults to 10, maximum
            50).
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SchoolSearchResponse'
        '401':
          description: Unauthorized — API key is missing, invalid, or expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Too Many Requests — rate limit or monthly quota exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SchoolSearchResponse:
      properties:
        schools:
          items:
            $ref: '#/components/schemas/SchoolSummary'
          type: array
          title: Schools
          description: >-
            A list of matching schools, sorted by proximity (only for
            location-based searches).
        data_source:
          type: string
          title: Data Source
          description: The authoritative source dataset for the school information.
          default: NCES Common Core of Data (CCD)
        data_vintage:
          anyOf:
            - type: integer
            - type: 'null'
          title: Data Vintage
          description: The calendar year of the dataset used for these results.
          default: 2025
        additional_info:
          anyOf:
            - type: string
            - type: 'null'
          title: Additional Info
          description: Any additional information or disclaimers about the search results.
      type: object
      required:
        - schools
      title: SchoolSearchResponse
      description: Schools matching the search criteria.
      examples:
        - data_source: NCES Common Core of Data (CCD)
          data_vintage: 2025
          schools:
            - distance_meters: 1240.5
              highest_grade: 12
              lat: 37.3382
              lea_id: '0602310'
              lea_name: San Jose Unified School District
              level: High
              lon: -121.8863
              lowest_grade: 9
              name: Lincoln High School
              nces_id: '060231001587'
              rating: 7
    ErrorResponse:
      type: object
      properties:
        detail:
          type: string
          description: Human-readable error message.
      required:
        - detail
      title: ErrorResponse
      description: >-
        Standard error response returned on authentication failure and
        rate-limit violations.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SchoolSummary:
      properties:
        nces_id:
          type: string
          title: Nces Id
          description: >-
            The unique 12-digit National Center for Education Statistics (NCES)
            identifier for the school.
        name:
          type: string
          title: Name
          description: The official name of the school institution.
        lea_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Lea Id
          description: >-
            The NCES Local Education Agency (LEA) identifier, identifying the
            school district.
        lea_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Lea Name
          description: The name of the school district or Local Education Agency (LEA).
        level:
          anyOf:
            - type: string
            - type: 'null'
          title: Level
          description: >-
            The educational level(s) served by the school (e.g. 'Elementary',
            'Middle', 'High').
        lowest_grade:
          anyOf:
            - type: integer
            - type: 'null'
          title: Lowest Grade
          description: >-
            The lowest grade level served by the school. Values:
            -1=Pre-Kindergarten (PK), 0=Kindergarten (KG), 1-12=Grades 1-12,
            13=Ungraded (UG), 14=Adult Education (AE).
        highest_grade:
          anyOf:
            - type: integer
            - type: 'null'
          title: Highest Grade
          description: >-
            The highest grade level served by the school. Values:
            -1=Pre-Kindergarten (PK), 0=Kindergarten (KG), 1-12=Grades 1-12,
            13=Ungraded (UG), 14=Adult Education (AE).
        rating:
          anyOf:
            - type: integer
              maximum: 10
              minimum: 0
            - type: 'null'
          title: Rating
          description: >-
            An overall rating for the school on a scale of 1 to 10, where 10
            represents the highest quality. 0 or null if no rating is available
            or if the school is outside the supported coverage area.
        lat:
          anyOf:
            - type: number
            - type: 'null'
          title: Lat
          description: The latitude of the school's location in decimal degrees (WGS 84).
        lon:
          anyOf:
            - type: number
            - type: 'null'
          title: Lon
          description: The longitude of the school's location in decimal degrees (WGS 84).
        distance_meters:
          anyOf:
            - type: number
            - type: 'null'
          title: Distance Meters
          description: >-
            The distance in meters from the search query coordinates to the
            school location. Only populated for coordinate-based searches.
      type: object
      required:
        - nces_id
        - name
      title: SchoolSummary
      description: Key school attributes returned in search results.
      examples:
        - distance_meters: 1240.5
          highest_grade: 12
          lat: 37.3382
          lea_id: '0602310'
          lea_name: San Jose Unified School District
          level: High
          lon: -121.8863
          lowest_grade: 9
          name: Lincoln High School
          nces_id: '060231001587'
          rating: 7
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: 'Your access token or API key. Pass as ``Authorization: Bearer <token>``.'

````