The National Archives Catalog

API for the National Archives Catalog

The National Archives API 2.0 is a read–write web Application Programming Interface (API) for querying the National Archives Catalog dataset. At its core, the National Archives catalog is a dataset of archival descriptions, authority records, and other information. While the browser-based catalog is a human-centered way to interface with these records, the API is an alternative method by which researchers, developers, and applications can interact with the same dataset—by following documented methods to retrieve or alter the structured data in the system.

The dataset for the catalog API contains all available archival descriptions, authority records, digitized records (images, videos, and so on) and their file metadata, and public contributions (tags, transcriptions, and comments). The API allows researchers and developers to retrieve metadata in JSON format for any given record or search results set. This method offers added flexibility in comparison to the user-centered interface in regards to advanced search or refinement options; this is because the API can search and retrieve using keywords for any field in the system, filter based on type of record, search within ranges, apply sorts, specify only particular fields to return, or any combination of these options. Bulk export of search results can then be generated. The API is also writable, which means it can be used to post and manipulate tags, transcriptions, or comments. In order to utilize write functions, users must request the user-specific API key associated with their active Catalog account by emailing api@nara.gov; for read-only functions, users must request an API key by emailing api@nara.gov

Structured API call return example in JSON:

{'body': {'hits': {'total': {'value': 1, 'relation': 'eq'}, 'max_score': None, 'hits': [{'_index': 'nac-records0', '_type': '_doc', '_id': '118712371', '_score': 25.481829, '_source': {'metadata': {'fileName': 'NAC_2022-11-18_Auth_0001.xml', 'controlGroup': {'indexName': 'records', 'type': 'authority', 'naId': 0}, 'ingestTime': '2022-11-20 22:30:25.356051', 'uuid': 'f3384de8-063d-448a-b9f6-5330cea6bdc2'}, 'record': {'role': {'reference': False, 'creator': False, 'contributor': True, 'donor': False}, 'sourceNotes': ['Presidential Photographs, 01/20/2009 - 01/20/2017 (Pete Souza contributed photographs to this series) https://catalog.archives.gov/id/81145631', 'LC authorities online. Dec.12, 2018. https://lccn.loc.gov/n96088871', 'Wikipedia.org, Dec. 12, 2018 (Pete Souza; Peter Joseph Souza; b. Dec. 31, 1954, New Bedford, Massachusetts; is an American photojournalist; official White House photographer for President Ronald Reagan, 1983–1989; Chief Official White House Photographer for U.S. President Barack Obama, January 20, 2009 – January 20, 2017; the former director of the White House Photography Office) https://en.wikipedia.org/wiki/Pete_Souza'], 'heading': 'Souza, Pete, 1954', 'recordType': 'authority', 'name': 'Souza, Pete,', 'variantPersonNames': [{'heading': 'Souza, Peter Joseph, 1954', 'name': 'Souza, Peter Joseph,', 'birthDate': {'year': 1954, 'logicalDate': '1954-01-01'}}], 'authorityType': 'person', 'birthDate': {'year': 1954, 'logicalDate': '1954-01-01'}, 'naId': 118712371, 'preferred': True, 'linkCounts': {'totalDescriptions': 7570, 'contributor': 7570}}}, 'sort': [25.481829, '118712371']}]}, 'aggregations': {'typeOfMaterials': {'doc_count_error_upper_bound': 0, 'sum_other_doc_count': 0, 'buckets': []}, 'collectionIdentifier': {'doc_count': 0, 'filter_collections': {'doc_count': 0, 'collections': {'doc_count_error_upper_bound': 0, 'sum_other_doc_count': 0, 'buckets': []}}}, 'referenceUnits': {'doc_count_error_upper_bound': 0, 'sum_other_doc_count': 0, 'buckets': []}, 'recordGroupNumber': {'doc_count': 0, 'filter_recordGroups': {'doc_count': 0, 'recordGroups': {'doc_count_error_upper_bound': 0, 'sum_other_doc_count': 0, 'buckets': []}}}, 'levelOfDescription': {'doc_count_error_upper_bound': 0, 'sum_other_doc_count': 0, 'buckets': []}, 'availableOnline': {'doc_count': 0}, 'dataSource': {'doc_count_error_upper_bound': 0, 'sum_other_doc_count': 0, 'buckets': [{'key': 'authority', 'doc_count': 1}]}, 'localIdentifierCount': {'doc_count': 0}, 'objectType': {'doc_count_error_upper_bound': 0, 'sum_other_doc_count': 0, 'buckets': []}}}, 'statusCode': 200, 'headers': {'date': 'Wed, 01 Feb 2023 17:40:54 GMT', 'content-type': 'application/json; charset=UTF-8', 'content-length': '2426', 'connection': 'keep-alive', 'access-control-allow-origin': '*'}}

The catalog API is open source. An API key is required for read functions; for write functions, both a Catalog account and the user-specific API key associated with the account are required. To request an API key, email api@nara.gov. All original API source code has been released under the Creative Commons Public Domain Dedication (CC0), which can be found in our Swagger API documentation. As a work of the federal government, all metadata is in the public domain (except excerpts, quotes, or transcription of copyrighted material); additionally, associated digital objects that represent exclusive works of the U.S. federal government can be freely reused without permission for any purpose. Note that the Catalog does contain some copyrighted works.

The catalog API affirms NARA’s commitment to “drive openness, cultivate public participation, and strengthen our nation’s democracy through public access to high-value government records.” The fundamental purpose of open data is to make our catalog data sharable and reusable in many contexts outside of NARA itself. The API is located at https://catalog.archives.gov/api/v2/, but we recommend you start out by reading our dedicated documentation at Swagger, our main technical hub for documentation and other aspects of this feature.

Top