# Niche — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search and retrieve data on K-12 schools and colleges from Niche.com, including rankings, report card grades, stats, and user reviews.

**Category:** Education | **Website:** [niche.com/](https://niche.com/) | **Docs:** [parse.bot/marketplace/d794b14b-4423-431f-9d6f-2960f6fba703/niche-com-api](https://parse.bot/marketplace/d794b14b-4423-431f-9d6f-2960f6fba703/niche-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-niche-com-api-d794b14b/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### autocomplete_search

Autocomplete search for schools, districts, or places. Returns matching results with type, label, grade, and URL information. Results are sorted by relevance.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search query string (e.g. 'harvard', 'stanford'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-niche-com-api-d794b14b/autocomplete_search \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```

### get_k12_district_overview

Get detailed overview of a K-12 school district by its slug. Returns report card grades, rankings, stats, tags, and contact information. The slug is derivable from the urlFragment field returned by autocomplete_search for SchoolDistrict type results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `slug` | string | Yes | District slug from the URL path, derivable from autocomplete_search urlFragment for SchoolDistrict results (e.g. 'shawnee-mission-school-district-ks'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-niche-com-api-d794b14b/get_k12_district_overview \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"slug":"<string>"}'
```

### get_k12_school_overview

Get detailed overview of a K-12 school by its slug. Returns report card grades, rankings, stats, tags, and contact information. The slug is obtainable from search_k12_schools results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `slug` | string | Yes | School slug from the URL path, obtainable from search_k12_schools results (e.g. 'the-hotchkiss-school-lakeville-ct'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-niche-com-api-d794b14b/get_k12_school_overview \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"slug":"<string>"}'
```

### get_k12_school_reviews

Get reviews for a K-12 school by its slug. Returns paginated user reviews with ratings and author information. Each review includes author type, body text, numeric rating, and date.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination. |
| `slug` | string | Yes | School slug from the URL path, obtainable from search_k12_schools results (e.g. 'the-hotchkiss-school-lakeville-ct'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-niche-com-api-d794b14b/get_k12_school_reviews \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","slug":"<string>"}'
```

### search_colleges

Search for colleges ranked by Niche grade. Returns paginated results. Each result includes the college name, slug, URL, overall grade, and tagline.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-niche-com-api-d794b14b/search_colleges \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>"}'
```

### search_k12_schools

Search for K-12 schools with optional filters. Returns paginated results ranked by Niche grade. Supports filtering by school type and grade level. Each result includes the school name, slug, URL, overall grade, and tagline.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `grades` | string | No | Grade level filter. Accepted values: 'elementary', 'middle', 'high'. |
| `page` | integer | No | Page number for pagination. |
| `type` | string | No | School type filter. Accepted values: 'private', 'public', 'charter'. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-niche-com-api-d794b14b/search_k12_schools \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"grades":"<string>","page":"<integer>","type":"<string>"}'
```
