# Zumper School Districts

view=districts (default) lists the school districts of a city. view=levels returns the schools of one level in a district and needs district_id and level. Take district_id from the districts list.

- **Documentation:** [https://scrappa.co/docs/zumper-api/zumper_school_districts](https://scrappa.co/docs/zumper-api/zumper_school_districts)
- **API group:** Zumper API
- **Endpoint:** `GET https://scrappa.co/api/zumper/school-districts`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `city` | string | Yes | City slug: lower-case words and the state or province code, for example san-francisco-ca or toronto-on. |
| `view` | string | No | districts (default) or levels. Allowed: districts, levels. |
| `district_id` | string | No | School district id. Required for view=levels. |
| `level` | string | No | School level. Required for view=levels. Allowed: elementary, middle, high. |

## Example response

```json
{
    "data": {
        "school_districts": [
            {
                "name": "San Francisco Unified School District",
                "distance": null,
                "high_count": 17,
                "middle_count": 21,
                "total_schools": 106,
                "total_students": 48785,
                "elementary_count": 76,
                "school_district_id": "6739ad45-3827-4000-998c-fdd4f5029e17"
            }
        ]
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 404 | Not Found | The requested listing, building, or page was not found. This response is not billable. |
| 422 | Validation Error | A required public parameter is missing or invalid. This response is not billable. |
| 503 | Service Unavailable | The service could not obtain a complete result. This response is not billable. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
