Discover/Gov API
live

Gov APIdiscovery.nationalarchives.gov.uk

Search and browse The National Archives Discovery catalogue via API. Access archival records, creators, repository info, and catalogue hierarchy metadata.

Endpoint health
verified 3d ago
get_record_details
browse_catalogue
search_records
3/3 passing latest checkself-healing
Endpoints
7
Updated
21d ago

What is the Gov 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.

Try it
Search keyword or phrase (e.g. 'world war', 'Churchill', 'navy')
Filter by holding repository name (e.g. 'The National Archives, Kew')
Filter results to records covering dates up to this year. Four-digit year (e.g. '1945').
Number of results to return per request
Filter results to records covering dates from this year onwards. Four-digit year (e.g. '1939').
api.parse.bot/scraper/4987305c-bd8a-4973-9efd-fc7f6bc25118/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/4987305c-bd8a-4973-9efd-fc7f6bc25118/search_records?query=world+war&held_by=The+National+Archives%2C+Kew&end_year=1945&page_size=5&start_year=1939' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace discovery-nationalarchives-gov-uk-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

"""Walkthrough: National Archives Discovery API — search, browse, and explore archival records."""
from parse_apis.the_national_archives_discovery_api import NationalArchives, RecordNotFound

client = NationalArchives()

# Search for records about "world war" — limit caps total items fetched.
for record in client.recordsummaries.search(query="world war", limit=5):
    print(record.title, "|", record.reference, "|", record.date)

# Drill into one result's full details via the summary→detail navigation op.
summary = client.recordsummaries.search(query="Churchill", limit=1).first()
if summary:
    detail = summary.details()
    print(detail.title, detail.reference, detail.catalogue_level, detail.closure_status)

# Fetch a known record directly by ID.
try:
    admiralty = client.recorddetails.get(id="C4")
    print(admiralty.title, admiralty.date, admiralty.held_by)
except RecordNotFound as exc:
    print(f"Record not found: {exc}")

# Browse the catalogue hierarchy from a known parent.
entry = client.catalogueentry(id="C4")
for child in entry.browse(limit=3):
    print(child.title, "|", child.reference, "|", child.is_parent)

print("exercised: recordsummaries.search / summary.details / recorddetails.get / catalogueentry.browse")
All endpoints · 7 totalmissing one? ·

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.

Input
ParamTypeDescription
queryrequiredstringSearch keyword or phrase (e.g. 'world war', 'Churchill', 'navy')
held_bystringFilter by holding repository name (e.g. 'The National Archives, Kew')
end_yearstringFilter results to records covering dates up to this year. Four-digit year (e.g. '1945').
page_sizeintegerNumber of results to return per request
start_yearstringFilter results to records covering dates from this year onwards. Four-digit year (e.g. '1939').
Response
{
  "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": "C7394009",
          "date": "1914 June-July",
          "title": "Department IA: World War I: World War I Files",
          "context": "German Foreign Ministry Archives: Photostat Copies.",
          "held_by": "The National Archives, Kew",
          "reference": "GFM 33/2280/5273",
          "description": "Department IA: World War I: World War I Files."
        }
      ],
      "total_count": 9140468
    },
    "status": "success"
  }
}

About the Gov API

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.

Reliability & maintenanceVerified

The Gov API is a managed, monitored endpoint for discovery.nationalarchives.gov.uk — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when discovery.nationalarchives.gov.uk changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official discovery.nationalarchives.gov.uk API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Last verified
3d ago
Latest check
3/3 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Building a genealogy research tool that queries search_records by surname and date range to surface relevant archival holdings
  • Mapping catalogue hierarchy depth using catalogue_level and parent_id fields from get_record_details
  • Identifying which repositories hold records on a specific topic using the held_by filter in search_records
  • Indexing record creators and their associated collections via search_creators and get_creator_details
  • Generating citable references for historical research by extracting the reference field from record detail responses
  • Browsing contributing archives A–Z using browse_archives to discover lesser-known holding institutions
  • Filtering for open-access records by checking the closure_status field returned by get_record_details
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 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.

Frequently asked questions
Does The National Archives have an official developer API?+
Yes. The National Archives provides the Discovery API at https://discovery.nationalarchives.gov.uk/API/. It covers search and some record metadata but has different endpoint structure and access constraints compared to this Parse API.
What does `catalogue_level` mean in the `get_record_details` response?+
It is an integer indicating the record's depth in the archival hierarchy. Level 1 represents a department or top-level body (e.g. the Admiralty). Higher integers indicate sub-series, pieces, or individual items further down the hierarchy. You can use parent_id alongside this field to traverse up the tree.
Does the API return the full text content of digitised documents?+
No. The API returns catalogue metadata — title, reference, description, administrative background, closure status, and hierarchy position — not the content of digitised or scanned documents themselves. You can fork this API on Parse and revise it to add an endpoint that retrieves document image URLs or transcriptions where the source exposes them.
Can I retrieve records held by archives other than The National Archives at Kew?+
Yes. The Discovery catalogue includes records held by many contributing UK archives. The 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?+
The 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.
Page content last updated . Spec covers 7 endpoints from discovery.nationalarchives.gov.uk.
Related APIs in Government PublicSee all →
insolvencydirect.bis.gov.uk API
Search and retrieve detailed information about UK individual insolvency records, including bankruptcies, Individual Voluntary Arrangements (IVAs), Debt Relief Orders (DROs), and bankruptcy restrictions for individuals and sole traders in England and Wales. Access comprehensive insolvency data to verify financial history and legal status of individuals.
companieshouse.gov.uk API
Search for UK companies and officers, then access detailed information including company profiles, filing history, charges, and officers with significant control. Get comprehensive corporate records and appointment details all in one place.
examplecourt.gov API
Search and retrieve court judgments, case details, and legal metadata from a national court reporting portal, with support for advanced filtering by court and case category. Access complete case information including full text and browse paginated results to find relevant legal precedents.
nationalrail.co.uk API
Check live train departure and arrival times at UK stations, search for specific stations, and get real-time service disruption alerts. Stay informed about rail service delays and changes to plan your journeys efficiently.
grantwatch.com API
Search and browse thousands of grants from GrantWatch.com to find funding opportunities tailored to individuals, nonprofits, small businesses, and foundations. Get detailed grant information, filter by category, and discover newly posted grants to match your eligibility and funding needs.
find-and-update.company-information.service.gov.uk API
Search and access detailed information about UK companies registered at Companies House, including company profiles, filing histories, officers, and financial charges. Filter companies by name, status, type, SIC code, and more.
tenders.gov.uk API
Search and access UK government public procurement notices, tenders, and contract opportunities in real-time, with the ability to retrieve detailed notice information and browse standardized classification codes. Get comprehensive procurement data in structured formats to analyze tender patterns and find relevant contracting opportunities.
shopdisney.com API
Search and browse the Disney Store catalog by keyword, category, or new arrivals. Retrieve detailed product information including name, price, images, availability, and attributes across the full shopDisney merchandise range.