Skip to content

omnistate/nara API reference

Floor
Provider · Omnistate
Version
1.x
Conformance suite
runs, no CI read
Verified for real
Its README does not say
Licence
MIT
composer require omnistate/nara:1.x-dev

Read from the package's own PHP files at the commit 12ccf05abb98: its namespaces, classes, interfaces and enums, their public constants, properties and methods with their PHPDoc, and the options its factories take. Nothing of it is run.

Omnistate\Nara

  • Nara class

    The National Archives Catalog of the United States (NARA), through its Catalog API v2: the federal records described file by file, many of them by the name of the person they are about - pension application files, compiled military service records, draft registration cards, indexes to naturalization papers, Indian census cards, homestead certificates, deceased personnel files... and, for a good share, their pages scanned.

    9 methods · 2 constants

Omnistate\Nara

Nara class

final class Nara implements CivilRegistryInterface Nara.php:39

The National Archives Catalog of the United States (NARA), through its Catalog API v2: the federal records described file by file, many of them by the name of the person they are about - pension application files, compiled military service records, draft registration cards, indexes to naturalization papers, Indian census cards, homestead certificates, deceased personnel files... and, for a good share, their pages scanned.

It is a catalogue of federal archives, NOT civil registration: births, marriages and deaths are kept by the states and counties, and the Catalog holds none of them as such. Every record is therefore of the kind OTHER: a file that names the person, with its series, its record group and the reference room that holds it, and the links to its scanned pages at NARA (never copied). The Catalog dates a file by its series only: the span of the series is the record's period, not the date of an event.

A key is needed (header x-api-key; ask Catalog_API@nara.gov), 10,000 calls a month per key: past it, the key is blocked until the first of the next month. Without a valid key the API answers the Catalog's HTML page with a 200, which is read as unavailable.

const URL = 'https://catalog.archives.gov/api/v2'
const PAGE = 'https://catalog.archives.gov/id/'

Nara::__construct()

public function __construct(readonly HttpClientInterface $http, readonly ?string $apiKey = null, readonly float $timeout = 10, readonly string $url = self::URL)

Nara::name()

public function name(): string

Nara::countries()

public function countries(): array

Nara::kinds()

public function kinds(): array

Nara::period()

public function period(): ?Period

Nara::hasImages()

public function hasImages(): bool

Nara::supports()

public function supports(CivilQuery $query): bool
public function search(CivilQuery $query): array

Nara::find()

public function find(string $identifier): ?CivilRecord