# Quiltindex — 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.

> Access data from quiltindex.org.

**Category:** Government & Public Data | **Website:** [quiltindex.org/](https://quiltindex.org/) | **Docs:** [parse.bot/marketplace/6a9fde9d-9f2f-42c6-9a68-98e3f94a1c0c/quiltindex-org-api](https://parse.bot/marketplace/6a9fde9d-9f2f-42c6-9a68-98e3f94a1c0c/quiltindex-org-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-quiltindex-org-api-6a9fde9d/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_quilt

Retrieve the complete record for a single quilt by its Quilt Index ID (KID). Returns structured fields (title, maker, date, location, dimensions, materials, techniques, inscriptions, provenance, contributing institution) plus an all_fields dictionary containing every field from the raw record. Records come from heterogeneous contributors with varying field naming conventions; structured fields use fallback lookups across known variants, while all_fields preserves the raw record exactly as contributed.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `kid` | string | Yes | Quilt Index ID (KID) in format like '19-15-5793' or '38-36-3620'. Obtainable from search_quilts results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-quiltindex-org-api-6a9fde9d/get_quilt \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"kid":"<string>"}'
```

### search_quilts

Full-text search across the Quilt Index database. Matches keywords against quilt titles, patterns, makers, locations, materials, techniques, and descriptions. Returns paginated results (60 per page) with summary information for each quilt. Results can be sorted by maker name, pattern name, or date.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `keywords` | string | Yes | Search terms to match against quilt records. Matches titles, patterns, makers, locations, materials, techniques, and descriptions. |
| `page` | integer | No | Page number for paginated results (60 results per page). |
| `sort_by` | string | No | Sort order for results. Omitting returns relevance-based ordering. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-quiltindex-org-api-6a9fde9d/search_quilts \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"keywords":"<string>","page":"<integer>","sort_by":"<string>"}'
```
