Get Wayback Machine Snapshot Content
ia_get_snapshotFetch the archived content of a URL at a specific Wayback Machine timestamp, or of the capture a Wayback capture URL such as a replay_url names. Resolves to the nearest available capture when the exact timestamp has no snapshot. Returns the capture as text — an HTML page as readable plain text in lines, its markup stripped and its table cells separated by tabs, another text type (plain text, JSON, XML, JavaScript) as stored — and the replay URL of the capture Wayback served, for browser access. With include_links, it also returns the links on the page as text and URL, so a linked page can be read next. A capture of a PDF, image, or other non-text file fails as non_text_capture. Long text comes one page at a time: has_more and total_chars say what remains, and char_offset reads further — pass it with the url and timestamp the notice names, so every page comes from the same capture; after an archived redirect that url differs from the one sent. Use ia_find_snapshots first to discover valid timestamps for a URL.
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>",
"timestamp": "<timestamp>"
},
"name": "ia_get_snapshot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The URL whose archived content to retrieve. A Wayback capture URL — web.archive.org/web/<timestamp>/<url>, such as a replay_url — reads as the URL it archives at its timestamp; a timestamp naming a different one fails as ambiguous_timestamp. | |
| max_chars | No | Maximum characters this page holds. Defaults to the server-configured maximum (IA_MAX_SNAPSHOT_CHARS, typically 50 000); a larger value is served at that maximum, with a notice. | |
| timestamp | Yes | Target Wayback timestamp: 1–14 digits — YYYYMMDDHHMMSS or a prefix of it — or an ISO 8601 date or UTC date-time such as "2020-01-01" or "2020-01-01T12:00:00Z". A full 14 digits, such as resolved_timestamp or a timestamp from ia_find_snapshots, reads that capture, or the one Wayback redirects it to; a shorter value names a period and resolves to the capture nearest its end ("2015" can resolve to one from early January 2016); blank reads the timestamp of a Wayback capture URL passed as url, else the latest capture. Example: "20200101120000" for noon on January 1, 2020. | |
| char_offset | No | Character offset (UTF-16 code units) into the capture's text where this page starts. For the next page, pass the previous char_offset plus max_chars with the url and timestamp the previous page's notice names, so the page comes from the same capture; after an archived redirect that url differs from the one sent. An offset at or past total_chars returns empty text. | |
| include_links | No | Also return the page's links: links holds each http(s) link target whose first occurrence starts in this page of text, as { text, url }, and total_links counts the links in the capture's whole text. It adds no request. Keep it set for the next page, as the next-page notice does, so a read that follows has_more lists each link once. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | One page of the capture's text: up to max_chars characters from char_offset. An HTML page is reduced to readable plain text in lines: scripts, styles, comments, and tags removed and character references decoded; each block element (paragraph, heading, list item, table row) and <br> starts a new line; the cells of a table row are separated by tabs, empty cells included; <pre> text keeps its spacing and line breaks, and elsewhere a whitespace run reads as one space and blank lines collapse to one. Another text type (plain text, JSON, XML, JavaScript) is the body as archived, line breaks and markup kept. Taken from at most the first 4 MiB of the capture; a notice says so when it is longer. | |
| error | No | Present when the call failed. Absent on success. | |
| links | No | Set when include_links is true: the links whose first occurrence starts in this page of text, in document order. Each http(s) target is listed once, with the first non-empty text it is linked by; the page's own URL is left out. The last page also takes the links at the very end of the text, so the pages of a read that follows has_more list each link once. Empty for a capture that is not HTML. | |
| notice | No | Set when the replay passed through an archived redirect (a capture of the site's own 3xx) — the capture requested is one, or Wayback first redirected the requested timestamp to a nearest capture that is one — naming each archived redirect's capture timestamp, HTTP status, and target, the text then coming from the capture Wayback served for the last target; when the capture is longer than the 4 MiB read limit (the text comes from its first bytes only); when max_chars is above the server maximum; or when more text follows this page — naming the url, char_offset, and timestamp that read the next one, and include_links when this call set it. | |
| has_more | No | True when the capture's text continues past this page; the notice names the url, char_offset, and timestamp that read the next one, and include_links when this call set it. | |
| max_chars | No | Maximum characters this page could hold — the requested max_chars, or the server maximum when the request omitted it or asked for more. | |
| replay_url | No | Wayback Machine replay URL (https://web.archive.org) of the capture the text came from — where the replay's redirects ended: Wayback's own to the nearest capture, and archived redirects (a capture of the site's own 3xx, which the notice names), followed for up to 10 redirects on the Wayback Machine. | |
| char_offset | No | Character offset (UTF-16 code units) this page starts at. | |
| total_chars | No | Length of the capture's whole text in characters (UTF-16 code units), counted over the same first 4 MiB the text comes from. | |
| total_links | No | Set when include_links is true: how many links the capture's whole text holds, counted over the same first 4 MiB the text comes from; 0 for a capture that is not HTML. | |
| resolved_status | No | HTTP status Wayback replayed the capture the text came from with — the same capture as resolved_timestamp and replay_url. | |
| resolved_timestamp | No | Timestamp (YYYYMMDDHHMMSS) of the capture the text came from, read from replay_url. |