# Discovery Nationalarchives — 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 The National Archives Discovery catalogue to find historical records, discover their creators, and explore archived collections. Get detailed information about specific records and navigate through the archive's organizational structure to uncover primary sources and historical documents.

**Category:** Government & Public Data | **Website:** [discovery.nationalarchives.gov.uk/](https://discovery.nationalarchives.gov.uk/) | **Docs:** [parse.bot/marketplace/32b0e1a1-8d29-49f1-88e8-f8c55473935f/discovery-nationalarchives-gov-uk-api](https://parse.bot/marketplace/32b0e1a1-8d29-49f1-88e8-f8c55473935f/discovery-nationalarchives-gov-uk-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-discovery-nationalarchives-gov-uk-api-32b0e1a1/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### browse_archives

Browse contributing archives alphabetically.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `letter` | string | No | Starting letter (A-Z) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-discovery-nationalarchives-gov-uk-api-32b0e1a1/browse_archives \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"letter":"<string>"}'
```

### browse_catalogue

Browse the catalogue hierarchy by listing child records of a given parent reference. Returns immediate children at the next level down, allowing navigation through the archival tree structure from department level to individual items.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `reference` | string | No | Parent catalogue ID to list children of (e.g. 'C1' for top level, 'C4' for Admiralty). IDs can be found in search_records results or in browse_catalogue items. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-discovery-nationalarchives-gov-uk-api-32b0e1a1/browse_catalogue \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"reference":"<string>"}'
```

### browse_creators

Browse creators by type.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `type` | string | No | Creator type: Person, Family, CorporateBody, or Manor |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-discovery-nationalarchives-gov-uk-api-32b0e1a1/browse_creators \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type":"<string>"}'
```

### get_creator_details

Retrieve details about a specific record creator.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `id` | string | Yes | Creator ID (e.g., F30484) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-discovery-nationalarchives-gov-uk-api-32b0e1a1/get_creator_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id":"<string>"}'
```

### get_record_details

Retrieve full details for a specific archival record by its catalogue ID. Returns comprehensive metadata including title, citable reference, dates, holding repository, scope and content description, administrative history background, catalogue hierarchy position, and closure status.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `id` | string | Yes | Record catalogue ID (e.g. 'C4', 'C3478849'). Typically starts with 'C' followed by digits. IDs can be found in search_records results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-discovery-nationalarchives-gov-uk-api-32b0e1a1/get_record_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id":"<string>"}'
```

### search_creators

Search for record creators (persons, families, organisations).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `offset` | integer | No | Result offset for pagination |
| `page_size` | integer | No | Number of results per page |
| `query` | string | Yes | Search keyword |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-discovery-nationalarchives-gov-uk-api-32b0e1a1/search_creators \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"offset":"<integer>","page_size":"<integer>","query":"<string>"}'
```

### search_records

Search for archival records in the Discovery catalogue. Returns results matching the query keyword, with optional date range and repository filters. Results are returned in relevance order.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `end_year` | string | No | Filter results to records covering dates up to this year. Four-digit year (e.g. '1945'). |
| `held_by` | string | No | Filter by holding repository name (e.g. 'The National Archives, Kew') |
| `page_size` | integer | No | Number of results to return per request |
| `query` | string | Yes | Search keyword or phrase (e.g. 'world war', 'Churchill', 'navy') |
| `start_year` | string | No | Filter results to records covering dates from this year onwards. Four-digit year (e.g. '1939'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-discovery-nationalarchives-gov-uk-api-32b0e1a1/search_records \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"end_year":"<string>","held_by":"<string>","page_size":"<integer>","query":"<string>","start_year":"<string>"}'
```
