Every Wayback Machine capture of a URL (or of all URLs under a prefix, host or domain): timestamp, date, captured URL, snapshot link, raw-content link, MIME type, HTTP status, content digest and size. Filter by date range, status and MIME type; keep one capture per hour/day/month/year or per distinct content; oldest or newest first. Pass next_cursor back as cursor; null on the last page.
Every response includes credits_used: the credits this call cost.
Parameters
name
type
description
urlrequired
string
The URL (or prefix/host/domain with match). Example: example.com
from
string
From date: YYYY, YYYYMM, YYYYMMDD or YYYYMMDDhhmmss (dashes allowed).
to
string
To date, same formats.
match
exact | prefix | host | domain
exact (default), prefix (every URL starting with it), host, or domain (with subdomains).
status
string
HTTP status filter: 200, 3xx, or !404 to exclude.
mime
string
MIME type filter, e.g. text/html, application/pdf, image/*.
collapse
hour | day | month | year | content | url
Keep one capture per period, per distinct content, or per URL.
order
oldest | newest
Order (default oldest first).
limit
integer
Results per page (default 100, max 1000).
cursor
string
Pass next_cursor from the previous response; null on the last page.
import os, requests
res = requests.get(
"https://api.api.sh/web/v1/wayback/snapshots",
params={"url": "example.com"},
headers={"x-api-key": os.environ["APISH_KEY"]},
timeout=120,
)
res.raise_for_status()
data = res.json()
const url = new URL("https://api.api.sh/web/v1/wayback/snapshots");
url.searchParams.set("url", "example.com");
const res = await fetch(url, { headers: { "x-api-key": process.env.APISH_KEY } });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json();
Response
A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).
The fastest way to see the full response is the playground: it runs this endpoint with your account and shows the exact JSON.