What it does
The Wayback Machine holds years of captures for most public websites, but browsing its calendar one day at a time is slow, and the raw CDX index is awkward to query. This actor turns the official Wayback CDX API into clean dataset rows: capture time, original URL, HTTP status, MIME type, size, content digest and archive links with and without the Wayback toolbar.
You can look up a single page, a folder (example.com/blog/*), a host or a whole domain with subdomains. By default it keeps only unique content versions and flags each with changedFromPrevious, so a page captured thousands of times collapses to the moments it really changed. Alternatively keep one capture per hour, day, month or year, or one row per distinct URL to list every page ever archived on a site.
Summary mode returns one row per site with first and last capture, totals, captures per year, missing years and longest gap. You can also fetch the archived HTML of captures as Markdown or text. Snapshots cost $2 per 1,000 rows, summaries $0.004 per exact URL or $0.01 per prefix, host or domain, and archived content $0.004 per page. The data comes from the Internet Archive; ActorForge is not affiliated with it.
How it works
- You list pages, folders or domains in
urlsand choose amatchType: exact, prefix, host or domain. - The actor queries archive.org's CDX index, applying your
from/todates,statusFilter,mimeFilterandcollapsemode. - Requests are paced (about one per second, two URLs in parallel) and retried with back-off on rate limits, server errors and timeouts.
- Rows are written per capture (snapshots mode) or per input (summary mode), capped by
maxSnapshotsPerUrl. - With
fetchContenton, the firstmaxContentPagesHTML captures with status 200 are downloaded and their title and main content added as Markdown or text.
Input example
A typical run input (JSON). Every field is also available as a form in the Apify console.
{
"urls": [
"https://apify.com/pricing",
"example.com"
],
"matchType": "exact",
"outputMode": "snapshots",
"collapse": "digest",
"from": "2018",
"statusFilter": "200",
"mimeFilter": "text/html",
"maxSnapshotsPerUrl": 300
}All input fields
| Field | Type | Required | Default | What it does |
|---|---|---|---|---|
urls | array | yes | Pages, folders or domains to look up in the Wayback Machine, e.g. example.com, https://example.com/pricing. Shortcuts: example.com/blog/* = everything under that path, *.example.com = the whole domain with subdomains. | |
matchType | string | no | "exact" | Exact: that one URL. Prefix: every URL starting with it (a folder). Host: every URL on that host name. Domain: the host and all its subdomains. Prefix/host/domain queries are slow on archive.org's side (20–40 s per… |
outputMode | string | no | "snapshots" | Snapshots: one row per archived capture. Summary: one row per input — first and last capture, total captures, captures per year, missing years (charged per summary, not per capture). |
collapse | string | no | "digest" | Busy pages are captured thousands of times with identical content. Unique versions (default) keeps a capture only when the content changed. Hourly/daily/monthly/yearly keep the first capture of each period. Unique URLs… |
from | string | no | Only captures on or after this date: 2015, 201505, 20150501 or 2015-05-01. | |
to | string | no | Only captures on or before this date (the whole period is included: 2018 means up to 31 Dec 2018). | |
statusFilter | string | no | Only captures with these HTTP status codes, comma-separated: 200, 2xx, 200,301 — or exclude with !404, !5xx. Empty = all (includes redirects and errors). | |
mimeFilter | string | no | Only captures of these content types: text/html, application/pdf, image/* — or exclude with !image/*. Empty = all. | |
newestFirst | boolean | no | false | Exact URLs only: return the most recent captures (up to the max per URL) newest first, instead of the oldest first. |
maxSnapshotsPerUrl | integer | no | 1000 | Stop after this many snapshot rows for each input. Each row is charged, so this is also your cost cap per URL. |
fetchContent | boolean | no | false | Download the archived HTML of snapshots and add the page title and main content as Markdown/text (charged per page, see pricing). Only HTML captures with status 200 are fetched. |
maxContentPages | integer | no | 10 | Fetch content for at most this many snapshots in the run (the first ones delivered). Failed fetches don't count. |
contentFormat | string | no | "markdown" | What to include when fetching content. |
maxIndexPagesPerUrl | integer | no | 10 | Prefix, host and domain queries walk archive.org's index page by page (each ~3,000–7,000 captures, 20–40 s). Stop after this many pages per input, even if fewer snapshots than the max were found (e.g. with tight… |
proxyConfiguration | object | no | {"useApifyProxy": false} | Not needed normally — archive.org's CDX API is public. Turn on Apify Proxy only if your runs keep hitting rate limits. |
Output example
Each row below is one archived capture with its timestamp, status, MIME type, change flag and a ready-to-open Wayback link.
| inputUrl | capturedAt | statusCode | mimeType | changedFromPrevious | archiveUrl | contentTitle |
|---|---|---|---|---|---|---|
| https://apify.com/store | 2019-07-04T11:02:25Z | 200 | text/html | https://web.archive.org/web/20190704110225/https://apify.com/store | Store · Apify | |
| example.com | 2015-07-17T01:53:29Z | 200 | text/html | true | https://web.archive.org/web/20150717015329/http://www.example.com/ | Example Domain |
| *.apify.com | 2023-06-10T23:36:51Z | 301 | text/html | https://web.archive.org/web/20230610233651/https://www.apify.com/.well-known/ai-plugin.json |
Pricing
Pay per event: you are charged only for the results you receive, with no subscription. Set a maximum total charge on any run and it stops cleanly at the cap.
| Charged for | When | Price | Per 1,000 | Worked example |
|---|---|---|---|---|
| Snapshot | Charged per archived capture row delivered | $0.002 | $2 | Unique versions of one page over 10 years (~300 rows) = $0.60; 1,000 URLs of a domain = $2.00 |
| Url summary | Charged per summary row for an exact URL (summary mode) | $0.004 | $4 | Archive history of 500 home pages = $2.00 |
| Domain summary | Charged per summary row for a prefix, host or whole domain (scans the archive index) | $0.01 | $10 | Capture history of 100 entire domains = $1.00 |
| Page content | Charged per archived page fetched as Markdown/text (only when Fetch archived page content is on) | $0.004 | $4 | 10 snapshots with content = $0.02 + $0.04 |
| Actor Start (platform start fee) | Charged when the Actor starts running. Number of events charged depends on Actor memory (one event per GB, minimum one event). | $0.00005 | — | One run at up to 1 GB = $0.00005 (charged as one event) |
Prices are read from the live Apify Store listing when this page is built. The listing is always authoritative.
Try Wayback Machine Scraper on Apify. Pay only for the results you get.
Run on Apify →Use cases
Recover lost content and old URLs
Use collapse set to unique-urls with a host or domain match to list every page ever archived on a site, then rebuild missing pages or map old URLs to redirects.
Domain history before buying
Summary mode shows first and last capture, captures per year and the longest gap for a domain, a quick check of what an expired domain was used for and when.
Competitor price and copy history
Look up a competitor's pricing page with unique versions to see each date its content changed, then open the archive links or fetch the content to compare wording. See the Wayback snapshots API guide.
Evidence of what a page said
For compliance or legal research, list the captures of a terms or policy page within a date range and keep the archive links as references to the archived versions.
How it compares
| ActorForge Wayback Snapshots | Browsing the Wayback calendar | Querying the CDX API yourself | |
|---|---|---|---|
| Same underlying data | Yes, the official CDX API | Yes | Yes |
| Bulk URLs and domains | Yes | No | Yes, with your own code |
| Unique versions with change flag | Yes | No | Partial, digest collapse without the flag |
| Yearly summary and gaps | Yes | Visual only | You compute it |
| Archived page as Markdown | Yes, optional | No | You fetch and parse it |
| Retries and pacing | Built in | Not needed | Your responsibility |
| Cost | $2 per 1,000 snapshots | Free | Free |
For one page and a quick look, the Wayback Machine website is free and perfectly fine, and developers comfortable with the CDX API can query it directly. This actor saves the paging, retries, change flags and summaries when you have many URLs or need the data in a spreadsheet or pipeline.
Limits and honest notes
- Data comes from the Internet Archive's public Wayback CDX API. Captures the archive doesn't have (never crawled, excluded by the site owner, or very recent) can't be returned; such inputs get a free row saying so.
- archive.org is a non-profit and sometimes slow: exact-URL lookups take about a second, but prefix/host/domain lookups take 20–40 s per index page (each page covers several thousand captures). The actor paces its requests (about one per second, two URLs in parallel) and retries rate limits (HTTP 429), server errors and timeouts with backoff; a URL that still fails gets a free error row.
- Prefix/host/domain results come in URL order (then time), not purely by date. Newest-first is available for exact URLs only. These queries stop after 10 index pages per input by default (raise Max index pages to go deeper). On multi-URL results, collapsing works per URL: "one per day" keeps one capture per day for each URL.
- Unique-versions mode compares each capture with the previous one (archive.org's digest collapse), so a page that changes back to an earlier version shows up again — that is a real change.
- Summary counts for exact URLs come from the Wayback Machine's capture calendar (all captures, monthly precision for date ranges). With status/MIME filters, or for prefix/host/domain, they are counted from the index (up to 100,000 captures or the index page cap; scanComplete says whether the count is complete).
- Archived page content is extracted from the raw capture as archived; pages that were built by JavaScript may come out nearly empty, and images/CSS are not downloaded. Content is fetched only for HTML captures with HTTP 200 and is capped at 200,000 characters.
- Respects your run budget: set a maximum total charge and the run stops cleanly at the cap, with no row charged twice.
FAQ
How do I get all Wayback Machine snapshots of a URL?
Put the URL in urls with matchType exact and set collapse to none to get every capture, or leave the default digest to keep only captures where the content changed. Raise maxSnapshotsPerUrl (1,000 by default) for heavily archived pages.
How do I list every archived page of a domain?
Use matchType domain (or the *.example.com shortcut) with collapse set to unique-urls. Domain lookups are slow on archive.org's side, about 20-40 seconds per index page, and stop after maxIndexPagesPerUrl pages (10 by default).
Can I get the newest captures first?
Yes, for exact URLs only: set newestFirst to true. Prefix, host and domain results come in URL order, then time.
Why does a page show up as changed back to an old version?
Unique-versions mode compares each capture with the previous one, so a page that reverts to earlier content is flagged again. That is a real change in the archive.
What if a URL has never been archived?
Captures the archive does not have, because the page was never crawled, was excluded by its owner or is very recent, cannot be returned. Such inputs get a free row saying so.
Use it from code
Run the actor through the Apify API with the input above.
cURL
curl -X POST "https://api.apify.com/v2/acts/actor-forge~wayback-snapshots/run-sync-get-dataset-items" \
-H "Authorization: Bearer $APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"urls": ["https://apify.com/pricing", "example.com"], "matchType": "exact", "outputMode": "snapshots", "collapse": "digest", "from": "2018", "statusFilter": "200", "mimeFilter": "text/html", "maxSnapshotsPerUrl": 300}'JavaScript (Node.js)
// Node.js 18+ (built-in fetch). Set APIFY_TOKEN in your environment.
const input = {
"urls": [
"https://apify.com/pricing",
"example.com"
],
"matchType": "exact",
"outputMode": "snapshots",
"collapse": "digest",
"from": "2018",
"statusFilter": "200",
"mimeFilter": "text/html",
"maxSnapshotsPerUrl": 300
};
const res = await fetch(
"https://api.apify.com/v2/acts/actor-forge~wayback-snapshots/run-sync-get-dataset-items",
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.APIFY_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify(input),
}
);
const items = await res.json();
console.log(items.length, items[0]);Python
# pip install apify-client (set APIFY_TOKEN in your environment)
import os
from apify_client import ApifyClient
client = ApifyClient(os.environ["APIFY_TOKEN"])
run_input = {
"urls": [
"https://apify.com/pricing",
"example.com"
],
"matchType": "exact",
"outputMode": "snapshots",
"collapse": "digest",
"from": "2018",
"statusFilter": "200",
"mimeFilter": "text/html",
"maxSnapshotsPerUrl": 300
}
run = client.actor("actor-forge/wayback-snapshots").call(run_input=run_input)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item)The run-sync-get-dataset-items endpoint waits for the run (up to 5 minutes) and returns the dataset rows directly. For longer runs, start the run asynchronously and read the dataset when it finishes, as the Python example does. Replace APIFY_TOKEN with your own token from the Apify console.
Step-by-step guides
How to Use a Wayback Machine Snapshots API and See When a Page Changed
Query archive.org's captures through the Wayback Snapshots actor with collapse set to digest to keep only versions where the content changed, then…
Related actors
SEO Audit Crawler — On-Page SEO Checker for Whole Sites
Crawl a whole website and audit every page for technical and on-page SEO: titles, meta descriptions, H1s, canonicals, noindex, duplicates, broken…
$6 per 1,000 · page auditedAny URL to Markdown — Web Pages, PDF, Word, Excel & OCR
Turn any URL into clean, LLM-ready Markdown: web pages, PDFs, Word, Excel, PowerPoint, EPUB, CSV and JSON, plus OCR for images and scanned PDFs. One…
$1 per 1,000 · page resultTry Wayback Machine Scraper on Apify. Pay only for the results you get.
Run on Apify →