# Wayback Machine Scraper API - Archived URLs & Website History (`pink_comic/wayback-machine-archived-urls-website-history`) Actor

Search the Internet Archive Wayback Machine CDX index for archived URLs and website history. Filter captures by exact URL, prefix, host/domain, date, HTTP status, MIME type, and duplicate rule. Get timestamps, replay URLs, content hashes, status codes, sizes, and source evidence.

- **URL**: https://apify.com/pink\_comic/wayback-machine-archived-urls-website-history.md
- **Developed by:** [Ava Torres](https://apify.com/pink_comic) (community)
- **Categories:** SEO tools, Developer tools, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 wayback capture evidence records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Wayback Machine Scraper API - Archived URLs & Website History

Search the public **Internet Archive Wayback Machine CDX index** for archived URLs and historical website captures. Use it for SEO recovery, redirect planning, deleted-page research, website-history timelines, OSINT, compliance research, and change investigations.

No Internet Archive API key, login, browser, or proxy is required for normal queries.

### What you can search

- One URL/domain or a batch of up to 20 targets
- Exact URL, path prefix, host, or domain plus subdomains
- Capture date/timestamp range
- Archived HTTP status such as 200, 301, 404, or all statuses
- Exact MIME type such as `text/html` or `application/pdf`
- Every capture, unique content, one row per URL, or monthly/daily/hourly buckets
- Latest or earliest captures first
- Up to 10,000 total bounded output records

Empty input uses a fast deterministic exact `example.org/` fixture with up to **5** successful unique-content captures. At current pricing, that first run costs at most **$0.0101** (`$0.0001` start + 5 × `$0.002` records). A buyer-set maximum total charge reduces `maxResults` before the archive query. When `urls` contains targets, it takes precedence over the single `url` field. For batch input, `maxResults` is a **total** response cap split evenly across targets.

### Example inputs

#### Latest unique versions of one page

```json
{
  "url": "example.org/",
  "matchType": "exact",
  "statusCode": "200",
  "collapseBy": "DIGEST",
  "sortDirection": "latest",
  "maxResults": 5
}
````

#### Recover archived URLs for an entire domain

```json
{
  "url": "example.com",
  "matchType": "domain",
  "fromDate": "2020",
  "toDate": "2025",
  "statusCode": "200",
  "mimeType": "text/html",
  "collapseBy": "URL",
  "sortDirection": "latest",
  "maxResults": 1000
}
```

#### Find historical redirects and deleted pages

```json
{
  "urls": ["example.com/old-section", "example.com/retired-product"],
  "matchType": "prefix",
  "statusCode": "ALL",
  "collapseBy": "MONTH",
  "sortDirection": "latest",
  "maxResults": 200
}
```

### Output

Each found capture-index row includes:

- requested target and match type;
- raw Wayback timestamp and UTC capture date;
- original archived URL;
- public replay URL and raw replay URL;
- archived HTTP status and MIME type;
- Wayback content digest and compressed record length;
- success/redirect flags;
- bounded-result disclosure;
- exact public CDX query URL, retrieval time, source link, and interpretation caveat.

No-match and source-unavailable outcomes are explicit dataset items instead of silent empty datasets. Request, HTTP-status, and response-body failures use bounded retries.

### Important interpretation limits

Wayback CDX rows are archive-index evidence. They are **not**:

- proof that archived content is authentic, complete, current, or legally effective;
- proof of who owned or controlled a page;
- a complete record of every historical version;
- proof that a missing page was never published or captured;
- the website's current HTTP status;
- a guarantee that a replay URL still renders every original asset or script.

Captures can be delayed, missing, excluded by archive policy, replay-imperfect, or later unavailable. Content hashes show archive-record equality, not meaning or legal authenticity. Open important replay links and corroborate consequential conclusions with other evidence.

### Source and operational notes

- CDX endpoint: [Internet Archive Wayback Machine CDX index](https://web.archive.org/cdx/search/cdx)
- Replay service: [Wayback Machine](https://web.archive.org/)
- No-key public endpoint; response time varies with archive load and query breadth
- Broad host/domain searches can hit the selected result bound; every found row discloses when its per-target limit was filled

# Actor input Schema

## `url` (type: `string`):

One URL or domain to search, such as example.org/, https://example.org/page, or example.org/blog. Ignored when URLs contains one or more targets.

## `urls` (type: `array`):

Optional batch of up to 20 URL/domain targets. If supplied, this list takes precedence over URL. The total maxResults budget is split evenly across targets.

## `matchType` (type: `string`):

Exact searches one URL; prefix includes subpaths; host searches the same host; domain includes subdomains. Broad host/domain queries can be slower and hit the result bound.

## `fromDate` (type: `string`):

Optional 4-14 digit timestamp prefix: YYYY, YYYYMM, YYYYMMDD, or full YYYYMMDDhhmmss.

## `toDate` (type: `string`):

Optional 4-14 digit ending timestamp prefix: YYYY, YYYYMM, YYYYMMDD, or full YYYYMMDDhhmmss.

## `statusCode` (type: `string`):

Filter by the HTTP status recorded at capture time, or choose All. This is not the website's current status.

## `mimeType` (type: `string`):

Optional exact MIME filter such as text/html, application/pdf, image/jpeg, or application/json.

## `collapseBy` (type: `string`):

Return every capture, unique content digests, one capture per archived URL, or one capture per month/day/hour bucket.

## `sortDirection` (type: `string`):

Return the newest or oldest matching captures first. Latest uses the CDX negative-limit optimization for faster bounded queries.

## `maxResults` (type: `integer`):

Total capture rows across all targets. For batch input, this budget is split evenly across targets so output remains bounded.

## Actor input object example

```json
{
  "url": "example.org/",
  "matchType": "exact",
  "statusCode": "200",
  "collapseBy": "DIGEST",
  "sortDirection": "latest",
  "maxResults": 5
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "url": "example.org/",
    "matchType": "exact",
    "statusCode": "200",
    "collapseBy": "DIGEST",
    "sortDirection": "latest",
    "maxResults": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("pink_comic/wayback-machine-archived-urls-website-history").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "url": "example.org/",
    "matchType": "exact",
    "statusCode": "200",
    "collapseBy": "DIGEST",
    "sortDirection": "latest",
    "maxResults": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("pink_comic/wayback-machine-archived-urls-website-history").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "url": "example.org/",
  "matchType": "exact",
  "statusCode": "200",
  "collapseBy": "DIGEST",
  "sortDirection": "latest",
  "maxResults": 5
}' |
apify call pink_comic/wayback-machine-archived-urls-website-history --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=pink_comic/wayback-machine-archived-urls-website-history",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Wayback Machine Scraper API - Archived URLs & Website History",
        "description": "Search the Internet Archive Wayback Machine CDX index for archived URLs and website history. Filter captures by exact URL, prefix, host/domain, date, HTTP status, MIME type, and duplicate rule. Get timestamps, replay URLs, content hashes, status codes, sizes, and source evidence.",
        "version": "0.1",
        "x-build-id": "WmwGR3jCcIRzkdpd2"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/pink_comic~wayback-machine-archived-urls-website-history/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-pink_comic-wayback-machine-archived-urls-website-history",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/pink_comic~wayback-machine-archived-urls-website-history/runs": {
            "post": {
                "operationId": "runs-sync-pink_comic-wayback-machine-archived-urls-website-history",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/pink_comic~wayback-machine-archived-urls-website-history/run-sync": {
            "post": {
                "operationId": "run-sync-pink_comic-wayback-machine-archived-urls-website-history",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "url": {
                        "title": "URL or Domain",
                        "minLength": 1,
                        "maxLength": 2048,
                        "type": "string",
                        "description": "One URL or domain to search, such as example.org/, https://example.org/page, or example.org/blog. Ignored when URLs contains one or more targets.",
                        "default": "example.org/"
                    },
                    "urls": {
                        "title": "URLs or Domains (Batch)",
                        "maxItems": 20,
                        "type": "array",
                        "description": "Optional batch of up to 20 URL/domain targets. If supplied, this list takes precedence over URL. The total maxResults budget is split evenly across targets.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "matchType": {
                        "title": "URL Match Type",
                        "enum": [
                            "exact",
                            "prefix",
                            "host",
                            "domain"
                        ],
                        "type": "string",
                        "description": "Exact searches one URL; prefix includes subpaths; host searches the same host; domain includes subdomains. Broad host/domain queries can be slower and hit the result bound.",
                        "default": "exact"
                    },
                    "fromDate": {
                        "title": "Captured On or After",
                        "pattern": "^$|^[0-9]{4}([0-9]{2}([0-9]{2}([0-9]{2}([0-9]{2}([0-9]{2})?)?)?)?)?$",
                        "type": "string",
                        "description": "Optional 4-14 digit timestamp prefix: YYYY, YYYYMM, YYYYMMDD, or full YYYYMMDDhhmmss."
                    },
                    "toDate": {
                        "title": "Captured On or Before",
                        "pattern": "^$|^[0-9]{4}([0-9]{2}([0-9]{2}([0-9]{2}([0-9]{2}([0-9]{2})?)?)?)?)?$",
                        "type": "string",
                        "description": "Optional 4-14 digit ending timestamp prefix: YYYY, YYYYMM, YYYYMMDD, or full YYYYMMDDhhmmss."
                    },
                    "statusCode": {
                        "title": "Archived HTTP Status",
                        "enum": [
                            "ALL",
                            "200",
                            "301",
                            "302",
                            "304",
                            "400",
                            "401",
                            "403",
                            "404",
                            "410",
                            "429",
                            "500",
                            "502",
                            "503"
                        ],
                        "type": "string",
                        "description": "Filter by the HTTP status recorded at capture time, or choose All. This is not the website's current status.",
                        "default": "200"
                    },
                    "mimeType": {
                        "title": "Archived MIME Type",
                        "pattern": "^$|^[A-Za-z0-9][A-Za-z0-9.+_-]*/[A-Za-z0-9][A-Za-z0-9.+_-]*$",
                        "type": "string",
                        "description": "Optional exact MIME filter such as text/html, application/pdf, image/jpeg, or application/json."
                    },
                    "collapseBy": {
                        "title": "Collapse Duplicate Captures",
                        "enum": [
                            "NONE",
                            "DIGEST",
                            "URL",
                            "MONTH",
                            "DAY",
                            "HOUR"
                        ],
                        "type": "string",
                        "description": "Return every capture, unique content digests, one capture per archived URL, or one capture per month/day/hour bucket.",
                        "default": "DIGEST"
                    },
                    "sortDirection": {
                        "title": "Capture Order",
                        "enum": [
                            "latest",
                            "earliest"
                        ],
                        "type": "string",
                        "description": "Return the newest or oldest matching captures first. Latest uses the CDX negative-limit optimization for faster bounded queries.",
                        "default": "latest"
                    },
                    "maxResults": {
                        "title": "Maximum Capture Records",
                        "minimum": 1,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Total capture rows across all targets. For batch input, this budget is split evenly across targets so output remains bounded.",
                        "default": 5
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
