# Wayback Machine Domain History (`maged120/wayback-domain-history`) Actor

Bulk domain history from the Wayback Machine: first and last archive dates, years online, status timeline, redirects, and a list of archived pages with snapshot links.

- **URL**: https://apify.com/maged120/wayback-domain-history.md
- **Developed by:** [Maged](https://apify.com/maged120) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $7.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

**Wayback Machine Domain History** turns the [Internet Archive's Wayback Machine](https://web.archive.org) into a **bulk domain-history report**. For every domain you get the **first and last archive date**, **years online**, total captures, a **year-by-year timeline**, whether the site ever **redirected or broke**, its **last working month**, and optionally a list of its **archived pages** with snapshot links.

### What does Wayback Machine Domain History do?

Paste a list of domains and get one clean summary row per domain: when it first appeared on the web, when it was last captured, how many captures exist, which years it was active, what share of archived months it was serving a working site, and whether it ever redirected elsewhere or returned errors. Switch on **archived pages** to also get the domain's historical URLs, each with its first capture date and a direct snapshot link.

On the Apify platform you also get API access, scheduling, integrations (Google Sheets, Zapier, Make, webhooks) and run monitoring, so domain research can plug straight into your workflow.

### Why check a domain's history?

- **Expired & aged domain buying**: verify a domain's age and continuous history, and spot years where it redirected elsewhere or went dark, before you pay for it.
- **SEO & link building**: see how long a site has really been around, and recover old URLs to redirect after a migration.
- **Content recovery**: find pages that no longer exist on the live site, with snapshot links to their archived copies.
- **Due diligence & fraud checks**: a "10-year-old company" whose domain first appears last month is a red flag.
- **Competitor research**: see when competitors launched and how their site evolved.

### How to look up domain history in bulk

1. Open the Actor and go to the **Input** tab.
2. Paste domains into **Domains**, one per line (URLs work too).
3. Keep **Include archived pages** on to also list historical URLs, and set how many per domain.
4. Click **Start**.
5. Open the **Output** tab and switch between the **Domain history** and **Archived pages** views, or download as JSON, CSV, Excel or HTML.

### Input

| Field | Type | Description |
|---|---|---|
| `domains` | array | Domains or website URLs. **Required.** |
| `includeArchivedUrls` | boolean | Also list archived pages. Default `true`. |
| `maxArchivedUrls` | integer | Max archived pages per domain. Default `100`. |

```json
{
    "domains": ["apify.com", "example.com"],
    "includeArchivedUrls": true,
    "maxArchivedUrls": 100
}
```

### Output

Two row types, marked by `entityType`. You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

**Domain summary**

```json
{
    "entityType": "domain",
    "domain": "apify.com",
    "hasArchive": true,
    "firstSnapshotAt": "2007-05-31T10:15:38+00:00",
    "firstSnapshotUrl": "https://web.archive.org/web/20070531101538/apify.com",
    "lastSnapshotAt": "2026-09-22T12:48:48+00:00",
    "lastSnapshotUrl": "https://web.archive.org/web/20260922124848/apify.com",
    "lastWorkingMonth": "2026-09",
    "totalCaptures": 1557,
    "monthsArchived": 126,
    "yearsArchived": [2007, 2008, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 2026],
    "archiveSpanYears": 20,
    "capturesByYear": { "2007": 3, "2008": 1, "2011": 3, "…": "…", "2026": 112 },
    "workingMonthsPercent": 98.4,
    "wasRedirected": true,
    "hadErrors": false,
    "error": null
}
```

**Archived page**

```json
{
    "entityType": "archived_url",
    "domain": "apify.com",
    "url": "https://apify.com/0code0/yellowpages-in-categories",
    "firstCapturedAt": "2024-05-23T00:16:16+00:00",
    "statusCode": 200,
    "mimeType": "text/html",
    "snapshotUrl": "https://web.archive.org/web/20240523001616/https://apify.com/0code0/yellowpages-in-categories"
}
```

### Output data fields

| Field | Description |
|---|---|
| `firstSnapshotAt` / `lastSnapshotAt` | First and most recent archive capture, with snapshot links. |
| `lastWorkingMonth` | Latest month in which the archived site returned a working page. |
| `totalCaptures` / `monthsArchived` | Total number of captures, and how many distinct months have at least one. |
| `yearsArchived` / `archiveSpanYears` / `capturesByYear` | Which years the domain was captured, the span, and captures per year. |
| `workingMonthsPercent` | Share of archived months where the site was working (not redirecting or erroring). |
| `wasRedirected` / `hadErrors` | Whether the domain ever redirected elsewhere or returned errors in the archive. |
| `url` / `firstCapturedAt` / `snapshotUrl` | For archived pages: the page, when it was first captured, and a link to that copy. |
| `error` | Why something couldn't be loaded, otherwise `null`. |

### How many results will I get?

One summary row per domain, plus up to **Max archived pages per domain** page rows when **Include archived pages** is on. 10 domains with 100 pages each give up to 1,010 rows. Turn the page list off to get exactly one row per domain.

### Tips

- **Fastest runs**: turn off **Include archived pages**. Summaries take about a second per domain; page lists take longer for very large sites.
- **Buying an aged domain?** Look at `yearsArchived` for gaps, and at `wasRedirected` / `workingMonthsPercent`. Long redirect periods often mean the domain was dropped and reused.
- **Migration planning**: list archived pages, then check which old URLs still need redirects.

### FAQ

**Why is `hasArchive` false for my domain?** The archive has never captured it. This is common for new, private or very small sites.

**Why does the page list only show some pages?** For each domain the Actor samples archived pages from across the whole site, up to your limit, and includes only working HTML pages. Very large sites have far more archived pages than one run lists; raise **Max archived pages per domain** for more.

**Is this legal?** Yes. The Actor only reads publicly available archive records.

**Found a bug or need a custom feature?** Open an issue in the **Issues** tab. Custom solutions are available on request.

# Actor input Schema

## `domains` (type: `array`):

Domains to look up, one per line. Website URLs are accepted too.

## `includeArchivedUrls` (type: `boolean`):

Also list the domain's archived pages (URL, first capture date and snapshot link). Great for recovering old content or planning redirects.

## `maxArchivedUrls` (type: `integer`):

How many archived pages to list per domain.

## Actor input object example

```json
{
  "domains": [
    "apify.com",
    "example.com"
  ],
  "includeArchivedUrls": true,
  "maxArchivedUrls": 100
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

# 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 = {
    "domains": [
        "apify.com",
        "example.com"
    ],
    "maxArchivedUrls": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("maged120/wayback-domain-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 = {
    "domains": [
        "apify.com",
        "example.com",
    ],
    "maxArchivedUrls": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("maged120/wayback-domain-history").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "domains": [
    "apify.com",
    "example.com"
  ],
  "maxArchivedUrls": 100
}' |
apify call maged120/wayback-domain-history --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,maged120/wayback-domain-history"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/muTOlTzzuVNnrQpfU/builds/PhZtm8qOIGMyN4oJ9/openapi.json
