Get one Wayback Machine snapshot per year of any website with one curl (CDX API, no key)
Disclosure: I built the Apify Actor linked at the end and charge per result. The raw endpoints below are free and need no key. Want to see how a site evolved, or build a yearly timeline of a page? The Internet Archive's
Disclosure: I built the Apify Actor linked at the end and charge per result. The raw endpoints below are free and need no key.
Want to see how a site evolved, or build a yearly timeline of a page? The Internet Archive's CDX server can collapse captures by timestamp prefix.
One successful capture per year
curl -s "https://web.archive.org/cdx/search/cdx?url=example.com&output=json&fl=timestamp,statuscode&collapse=timestamp:4&filter=statuscode:200&limit=4"
collapse=timestamp:4 keeps one row per distinct first 4 characters of the timestamp (the year). Checked 2026-11-01, the first rows were 20020120142510, 20030207055228, 20040105045515 and 20050101025054.
Open any of them at https://web.archive.org/web/<timestamp>/<url>.
The most recent capture
curl -s "https://web.archive.org/cdx/search/cdx?url=example.com&output=json&fl=timestamp&limit=-1"
A negative limit returns the last rows instead of the first. Checked 2026-11-01: it returned 20261101041731.
Gotchas
- Timestamps are
YYYYMMDDhhmmss, UTC. - Use
collapse=timestamp:6for monthly,timestamp:8for daily. - Heavy domain-wide queries can time out; keep them narrow and rate-limit yourself.
Hosted version
If you'd rather not script it, I packaged this as an Apify Actor (pay per result, no subscription): https://apify.com/northgrid-data/wayback-snapshots-cdx
Feedback welcome in the Actor's issues.
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.