# Website History (Wayback Machine): Age, Gaps, Status (`lx112/website-history`) Actor

Get a website's history from the Internet Archive's Wayback Machine in bulk: first and last capture, years archived, activity by year, the longest gap, the last capture's HTTP status and snapshot links. For domain age, due diligence and spotting parked or re-registered domains.

- **URL**: https://apify.com/lx112/website-history.md
- **Developed by:** [Jing Peng Xing](https://apify.com/lx112) (community)
- **Categories:** SEO tools, Developer tools, Business
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 site checkeds

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/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

## Website History (Wayback Machine): Age, Gaps, Status

See how long a website has really existed, in bulk. For each domain or page you get its record in the
Internet Archive's **Wayback Machine**: **first and last capture**, how many **years** it was archived,
**activity by year**, the **longest gap**, the last capture's **HTTP status** and direct links to the
first and last snapshots.

- **Domain age you can trust:** a site archived since 2004 has been running since at least 2004,
  whatever the WHOIS creation date says after a transfer.
- **Spot parked, dropped and re-registered domains:** long gaps, or a last capture that redirects or
  errors, show when a domain went dark or changed hands.
- **Pages too:** pass `stripe.com/pricing` to get that page's own history.

### Who uses this

- **Fraud, trust and safety teams:** check that a merchant's or applicant's website isn't brand new.
- **SEO and domain investors:** vet expired and aftermarket domains before buying.
- **Due diligence and journalism:** when did this company's site appear, and when did it go quiet?
- **AI agents:** a site's archive record as JSON.

### Input

| Field | Example | Notes |
|---|---|---|
| Websites or pages | `basecamp.com`, `stripe.com/pricing` | One result per entry |

### Output (one dataset item per site)

```json
{
  "input": "basecamp.com",
  "target": "basecamp.com",
  "firstCapture": "1996-10-29T20:48:28Z",
  "lastCapture": "2026-10-01T00:35:11Z",
  "lastCaptureStatus": 301,
  "lastLiveCapture": "2026-09-14T08:12:40Z",
  "yearsArchived": 31,
  "archivedSinceYears": 30,
  "monthsWithCaptures": 300,
  "monthsWithCapturesByYear": { "1996": 2, "1997": 5, "...": 12 },
  "longestGap": { "months": 10, "from": "1999-05", "to": "2000-02" },
  "firstSnapshotUrl": "https://web.archive.org/web/19961029204828/basecamp.com",
  "lastSnapshotUrl": "https://web.archive.org/web/20261001003511/basecamp.com",
  "checkedAt": "2026-11-08T17:45:00.000Z",
  "error": null
}
```

Sites the Wayback Machine has never archived come back with an `error`; those aren't charged.

### Pricing

Pay per event: charged per **site** with a result.

### Limits

- Captures depend on the Internet Archive's crawlers, so a gap can mean the site was down, blocked
  archiving or simply wasn't crawled that month. Small sites may have few captures.
- Counts are months with at least one capture, not the raw number of snapshots.

# Actor input Schema

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

Domains (stripe.com) or page URLs (stripe.com/pricing). Each entry is one result.

## Actor input object example

```json
{
  "urls": [
    "basecamp.com",
    "stripe.com",
    "apify.com"
  ]
}
```

# Actor output Schema

## `results` (type: `string`):

One item per site; failed ones carry an error and are not charged.

# 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 = {
    "urls": [
        "basecamp.com",
        "stripe.com",
        "apify.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("lx112/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 = { "urls": [
        "basecamp.com",
        "stripe.com",
        "apify.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("lx112/website-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 '{
  "urls": [
    "basecamp.com",
    "stripe.com",
    "apify.com"
  ]
}' |
apify call lx112/website-history --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,lx112/website-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/3GEIk18EcGrANzXom/builds/lVNhUOwMfnCxJMcCi/openapi.json
