# The Palace Museum — 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 explore the Palace Museum's vast collection of artifacts organized by category and dynasty, then view detailed information about specific items. Discover historical objects spanning different periods and classifications to learn about the museum's treasures.

**Category:** Education | **Website:** [dpm.org.cn/](https://dpm.org.cn/) | **Docs:** [parse.bot/marketplace/96be3d60-6b72-4377-a36c-5fe6710f8795/dpm-org-cn-api](https://parse.bot/marketplace/96be3d60-6b72-4377-a36c-5fe6710f8795/dpm-org-cn-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-dpm-org-cn-api-96be3d60/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_collection_item_detail

Get full details for a single collection item including title, description, dynasty, category, artifact number, keywords (dimensions), and image URLs. The item_url parameter must be a detail page URL from search_collections results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `item_url` | string | Yes | The full URL of the item detail page on dpm.org.cn, as returned in search_collections results detail_url field. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-dpm-org-cn-api-96be3d60/get_collection_item_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"item_url":"<string>"}'
```

### list_categories

List all collection categories available in the Palace Museum digital database. Returns the full vocabulary of category objects (id plus Chinese name). No pagination, always returns all categories in one call.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-dpm-org-cn-api-96be3d60/list_categories \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### list_dynasties

List all dynasties and historical eras available as filters in the Palace Museum digital database. Returns the complete set of dynasty objects (id plus Chinese name) spanning from the Neolithic era through modern times. No pagination.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-dpm-org-cn-api-96be3d60/list_dynasties \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### search_collections

Search the Palace Museum main collection by category and optional keyword. Returns paginated results with 12 items per page. Each item includes name, detail URL, thumbnail image, period, and category. Navigate from a summary to full details via the details() method.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category` | string | No | Category slug for filtering. |
| `keyword` | string | No | Search keyword to filter results within the category. |
| `page` | integer | No | Page number for pagination. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-dpm-org-cn-api-96be3d60/search_collections \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category":"<string>","keyword":"<string>","page":"<integer>"}'
```
