discovery.nationalarchives.gov.uk APIdiscovery.nationalarchives.gov.uk ↗
Search and browse The National Archives Discovery catalogue via API. Access archival records, creators, repository info, and catalogue hierarchy metadata.
curl -X GET 'https://api.parse.bot/scraper/4987305c-bd8a-4973-9efd-fc7f6bc25118/search_records?query=Churchill&page_size=3' \ -H 'X-API-Key: $PARSE_API_KEY'
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.
| Param | Type | Description |
|---|---|---|
| queryrequired | string | Search keyword or phrase (e.g. 'world war', 'Churchill', 'navy') |
| held_by | string | Filter by holding repository name (e.g. 'The National Archives, Kew') |
| end_year | string | Filter results to records covering dates up to this year. Four-digit year (e.g. '1945'). |
| page_size | integer | Number of results to return per request |
| start_year | string | Filter results to records covering dates from this year onwards. Four-digit year (e.g. '1939'). |
{
"type": "object",
"fields": {
"results": "array of record objects each containing id, title, reference, date, description, held_by, and context",
"total_count": "integer total number of matching records across the catalogue"
},
"sample": {
"data": {
"results": [
{
"id": "C3478849",
"date": "1927",
"title": "Radio and Cable Map of the World Author, Publisher, etc: War Office (No. 1849) London...",
"context": "Colonial Office and predecessors: Maps and Plans: Series I. WORLD.",
"held_by": "The National Archives, Kew",
"reference": "CO 700/WORLD33",
"description": "Radio and Cable Map of the World Author, Publisher, etc: War Office (No. 1849) London."
}
],
"total_count": 9140318
},
"status": "success"
}
}About the discovery.nationalarchives.gov.uk API
The National Archives Discovery API exposes 7 endpoints for searching and navigating the UK National Archives catalogue, which holds millions of archival records spanning centuries of British government and public history. Use search_records to query records by keyword, date range, and holding repository, or get_record_details to retrieve structured metadata including reference codes, closure status, catalogue level, scope descriptions, and administrative background for a specific catalogue item.
Search and Record Retrieval
The search_records endpoint accepts a required query string and optional filters including start_year, end_year, and held_by to narrow results by date range or repository. Each result object includes id, title, reference (the citable archival reference code such as ADM 1/1234), date, description, held_by, and context. The total_count field in the response indicates the full number of matching records across the catalogue, enabling pagination via page_size.
Record Detail and Catalogue Structure
get_record_details takes a catalogue ID (typically C followed by digits, e.g. C3478849) and returns comprehensive metadata: catalogue_level to identify where the record sits in the hierarchy (1 = departmental level, higher numbers indicate deeper items), parent_id for traversal, closure_status indicating access restrictions, description for scope and content, and administrative_background describing the history of the creating body. The browse_catalogue endpoint accepts a reference parameter to navigate the hierarchy directly, returning child items and the parent_reference.
Creators and Archives
search_creators and get_creator_details cover persons, families, organisations, and manors as record creators. get_creator_details returns the creator's name, date, and associated collections. browse_creators allows filtering by type (Person, Family, CorporateBody, or Manor). browse_archives lists contributing repositories alphabetically via the letter parameter, returning repository items and the current letter cursor.
- Building a genealogy research tool that queries
search_recordsby surname and date range to surface relevant archival holdings - Mapping catalogue hierarchy depth using
catalogue_levelandparent_idfields fromget_record_details - Identifying which repositories hold records on a specific topic using the
held_byfilter insearch_records - Indexing record creators and their associated collections via
search_creatorsandget_creator_details - Generating citable references for historical research by extracting the
referencefield from record detail responses - Browsing contributing archives A–Z using
browse_archivesto discover lesser-known holding institutions - Filtering for open-access records by checking the
closure_statusfield returned byget_record_details
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does The National Archives have an official developer API?+
What does `catalogue_level` mean in the `get_record_details` response?+
parent_id alongside this field to traverse up the tree.Does the API return the full text content of digitised documents?+
Can I retrieve records held by archives other than The National Archives at Kew?+
held_by parameter in search_records accepts repository names to filter to a specific institution, and browse_archives lists all contributing repositories alphabetically.Is there a way to get a list of all records within a specific department or series?+
browse_catalogue endpoint accepts a reference parameter and returns immediate child items along with parent_reference, enabling level-by-level traversal. It does not return a flat list of all descendants in a single call. You can fork this API on Parse and revise it to add recursive or bulk-traversal endpoints if your use case requires deep subtree enumeration.