Find Wayback Machine Snapshots
ia_find_snapshotsFind Wayback Machine snapshots of a URL. Mode "closest" returns the single nearest capture to a given timestamp, or the latest capture when timestamp is omitted, via the Availability API, falling back to a CDX closest-capture query when the Availability API finds no capture or answers with a rate limit, a server error, an unreadable response, or an error in place of a capture (one result). Mode "history" returns the full capture list via the CDX API — filterable by date range and HTTP status code, collapsed by default to one capture per day (collapse "timestamp:8"); collapse "timestamp:14" lists one row per distinct capture second, "digest" one row each time the content changed, and "urlkey" one row per URL, for a url ending in "*", which lists every URL under that prefix. Use history mode to survey how a page changed over time; use closest mode when you need the snapshot nearest a specific date. History mode returns up to limit records (at most 10,000 per call) and supports resume-key pagination for URLs with very large capture histories. A history query that no capture matches returns an empty snapshots list and a notice saying why.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"url": "<url>",
"mode": "<mode>"
},
"name": "ia_find_snapshots"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | End of the date range (history mode only), in the same forms as from, and inclusive: a prefix ends at the end of the period it names, so "2015" reaches December 31, 2015, and "20231231" the end of that day. | |
| url | Yes | The URL to look up in the Wayback Machine. A Wayback capture URL — web.archive.org/web/<timestamp>/<url>, such as a replay_url — reads as the URL it archives: history mode lists that URL's captures, and closest mode looks up its timestamp, where a timestamp naming a different one fails as ambiguous_timestamp. In history mode, a url ending in "*", such as "example.com/docs/*", lists the captures of every URL under that prefix, ordered by URL and then by time, and a url starting with "*.", such as "*.example.com", lists the captures of that domain and its subdomains; a "*" anywhere else is part of the URL. A wide prefix can run past the call deadline and fail as cdx_unavailable: narrow the prefix, or from and to. | |
| from | No | Start of the date range (history mode only): 1–14 digits — YYYYMMDDHHMMSS or a prefix of it — or an ISO 8601 date or UTC date-time such as "2020-01-01". A prefix starts at the beginning of the period it names: "2015" is January 1, 2015. | |
| mode | Yes | Lookup mode: "closest" returns the single nearest snapshot to the given timestamp, or the latest capture when timestamp is omitted; "history" returns the paginated full capture list via the CDX API. | |
| limit | No | Maximum number of CDX records to return (history mode only, default 100). One call returns at most 10,000: a larger value (up to 150,000) is served as 10,000, and the resume_key continues from there. | |
| collapse | No | CDX collapse (history mode only): consecutive captures that share a key are listed once, as the first of them. "timestamp:N" keys on the first N timestamp digits (4=year, 6=month, 8=day, 10=hour): "timestamp:14" lists one row per distinct capture second, an N above 14 reads as 14, and "timestamp:0" lists only the first capture in range. "digest" keys on content: it lists the first capture in range and each capture whose digest differs from the one before it, so a change back to earlier content is listed as a change. "urlkey" lists one row per URL, its first capture in range: one row for an exact url, one per URL under a url ending in "*". status_filter applies before the collapse, so with "digest", status_filter "200" leaves out redirect captures, whose own digests otherwise list the page again after each one. Omitted or blank, it is "timestamp:8", one capture per day. | |
| timestamp | No | Target timestamp for mode "closest": 1–14 digits — YYYYMMDDHHMMSS or a prefix of it, such as "20200615" — or an ISO 8601 date or UTC date-time such as "2020-06-15" or "2020-06-15T12:34:56Z". A shorter value names a period and resolves to the capture nearest its end: "2015" can resolve to one from early January 2016. Omitted or blank, it is the timestamp of a Wayback capture URL passed as url, else the latest capture. | |
| resume_key | No | Opaque pagination key from a previous history mode response. Pass this to continue from where the last page left off. Server cursors expire after one hour and bind the URL and original filters; omit filters on continuation or repeat their original values. Page size may change. A wildcard url, or a key this server did not issue, pages by CDX's own key, which can omit the row at a page boundary; a wildcard page can instead return that row as a later capture of the same URL. | |
| status_filter | No | Filter CDX results to a specific HTTP status code (history mode only). Must be a 3-digit numeric code. Example: "200" to return only successful captures. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cap | No | The limit applied: limit, or 10,000 when a larger value was capped. | |
| error | No | Present when the call failed. Absent on success. | |
| shown | No | Number of snapshots returned. | |
| notice | No | Why a history page holds no snapshots (no captures of the URL or under its wildcard, none matching the from, to, or status_filter sent, or none left past resume_key), pagination guidance, cap disclosure, or what CDX's own continuation can omit for a wildcard url or a resume_key the server did not issue, joined into one notice when several apply. | |
| snapshots | No | Snapshots matching the query: one in closest mode; in history mode, empty when CDX lists no capture that matches, with notice saying why. | |
| truncated | No | True when the snapshot list was capped at the limit. | |
| resume_key | No | Opaque key to pass as resume_key in the next call to continue paginating CDX history results. |