Skip to content

Instantly share code, notes, and snippets.

@hym3242
Last active March 29, 2024 20:07
Show Gist options
  • Save hym3242/ed5785a8c5b4513af927919ba42b28d7 to your computer and use it in GitHub Desktop.
Save hym3242/ed5785a8c5b4513af927919ba42b28d7 to your computer and use it in GitHub Desktop.
NARA (catalog.archives.gov) API (reverse-engineered) sample usage
for n in {1..10}; do curl -s "https://catalog.archives.gov/proxy/records/search?ancestorNaId=533461&page=$n&limit=100&availableOnline=true&abbreviated=true&debug=true&datesAgg=true" | jq -r '.body.hits.hits[] | "https://catalog.archives.gov/id/\(._id)\t\(._source.record.ancestors[] | select(.distance == 2) | .title + "\t" + .creators[0].heading)\t\(._source.record.title)"' | colorevenoddlines; done
@hym3242
Copy link
Author

hym3242 commented Mar 29, 2024

SRC-OF-SRC:

  • Chrome DevTools

NOTES:

  • max. 10,000 results allowed, the same as in the webpage.
  • for "colorevenoddlines" program see my "misc_tools" repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment