# Teachers Pay Teachers — 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 browse K-12 educational resources from Teachers Pay Teachers, view detailed resource information and reviews, and explore seller profiles and their offerings. Discover both premium and free teaching materials to find the perfect resources for your classroom needs.

**Category:** Education | **Website:** [teacherspayteachers.com/](https://teacherspayteachers.com/) | **Docs:** [parse.bot/marketplace/9204fd70-0018-45ca-a190-beeb05bbdcee/teacherspayteachers-com-api](https://parse.bot/marketplace/9204fd70-0018-45ca-a190-beeb05bbdcee/teacherspayteachers-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-teacherspayteachers-com-api-9204fd70/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### browse_resources

Browse educational resources with filters for subject, grade level, resource type, and price range. Returns paginated results in the same format as search. At least one filter is recommended to narrow results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `grade` | string | No | Grade level filter (e.g. preschool, kindergarten, 1st-grade) |
| `page` | integer | No | Page number for pagination |
| `price_range` | string | No | Price range filter (e.g. free, under-5, 5-10, 10-up) |
| `resource_type` | string | No | Resource type filter (e.g. worksheets, task-cards) |
| `subject` | string | No | Subject filter (e.g. math, science, reading) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-teacherspayteachers-com-api-9204fd70/browse_resources \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"grade":"<string>","page":"<integer>","price_range":"<string>","resource_type":"<string>","subject":"<string>"}'
```

### get_free_resources

Get free resources available on Teachers Pay Teachers. Returns a paginated listing of resources with no cost in the same format as search and browse endpoints.

**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-teacherspayteachers-com-api-9204fd70/get_free_resources \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>"}'
```

### get_resource_details

Retrieve detailed information about a single resource by its numeric product ID. Returns full metadata including name, description, author info, pricing, images, grades, subjects, file preview info, and evaluation rating via the TPT GraphQL API.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_id` | string | Yes | The numeric ID of the product (e.g. 2319927) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-teacherspayteachers-com-api-9204fd70/get_resource_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_id":"<string>"}'
```

### get_resource_reviews

Get reviews and aggregate rating for a resource by its product ID. Extracts structured review data from the product page's LD+JSON markup. Returns up to 10 most recent reviews and overall rating statistics.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_id` | string | Yes | The numeric ID of the product (e.g. 2319927) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-teacherspayteachers-com-api-9204fd70/get_resource_reviews \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_id":"<string>"}'
```

### get_seller_profile

Get a seller's profile and store information including bio, location, social media links, follower count, and ratings via the TPT GraphQL API. Requires the store's URL slug.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `slug` | string | Yes | The store's URL slug (e.g. little-achievers) |

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

### get_seller_resources

Get paginated resources from a specific seller's store. Returns the same product listing format as search and browse endpoints. Requires the store's URL slug.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination |
| `slug` | string | Yes | The store's URL slug (e.g. little-achievers) |

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

### search_resources

Full-text search over Teachers Pay Teachers educational resources by keyword. Returns paginated results with title, price, author, and thumbnail. Sort controls ordering; pagination via page number.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination |
| `query` | string | Yes | Search keyword or phrase |
| `sort` | string | No | Sort order for results |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-teacherspayteachers-com-api-9204fd70/search_resources \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","query":"<string>","sort":"<string>"}'
```
