survos / nara-bundle
Symfony integration for the National Archives Catalog client: env-configured key and user id, nara:search, nara:record and nara:contribute
Fund package maintenance!
2.43.19
2026-10-26 09:41 UTC
Requires
- php: ^8.5
- survos/kit-bundle: ^2.5
- survos/nara-client: ^2.5
- symfony/config: ^8.1
- symfony/console: ^8.1
- symfony/dependency-injection: ^8.1
- symfony/http-client: ^8.1
- symfony/http-kernel: ^8.1
Requires (Dev)
- phpunit/phpunit: ^13
- symfony/framework-bundle: ^8.1
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Symfony integration for survos/nara-client (National Archives Catalog API v2), built on survos/kit-bundle.
composer require survos/nara-bundle
Set the environment variables; no config file is needed:
NARA_API_KEY=... # email Catalog_API@nara.gov NARA_USER_ID=... # Catalog user UUID; only needed to contribute NARA_SUPPORT_EMAIL=Catalog_API@nara.gov # optional: sent as From / CC so NARA can reach heavy users NARA_SUPPORT_EMAIL_CC=DASNACSupport@nara.gov
To use other variable names, or literal values:
# config/packages/survos_nara.yaml survos_nara: api_key: '%env(MY_NARA_KEY)%'
Inject Survos\Nara\Client anywhere (see the client README for the API). It retries 429/5xx with backoff.
Commands
bin/console nara:search "widow pension" --record-group=15 --object-type=pdf --online --limit=50 bin/console nara:record 170821856 [--json] # dry-run unless --live; text from --text, --text-file or STDIN bin/console nara:contribute transcription 170821856 --object-id=170821859 --text-file=page1.txt [--live]