# Wayback Machine API

> Wayback Machine returns archived web pages and website snapshots, available as a workflow and API.

Wayback Machine’s Get archived page returns a page’s closest archived version to a requested date, given a website address and date. List snapshots returns archived captures, status details, and content changes for a website address, with optional date and result filters.

- Page: https://fous.com/workflows/wayback-machine
- Handle: `@wayback-machine`
- Category: [Data](https://fous.com/workflows/category/data)
- Source website: https://web.archive.org
- Last verified: Sep 29, 2026
- Fous is not affiliated with Wayback Machine.

## Methods

### Get archived page

Operation `get_archived_page`, version 1. 1 credit per call.

See the closest available archived version of a web page to a past date, with its title and readable text. Month and year dates use their first day; the nearest capture may fall outside the requested period.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `date` | string | yes | `"2019-08-12"` | Past date as YYYY-MM-DD, YYYY-MM or YYYY, for example 2019-08-12. |
| `page` | string | yes | `"https://en.wikipedia.org/wiki/Ada_Lovelace"` | Website address to view, for example nike.com/pricing or https://example.com/. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "page",
    "date"
  ],
  "properties": {
    "date": {
      "type": "string",
      "description": "Past date as YYYY-MM-DD, YYYY-MM or YYYY, for example 2019-08-12.",
      "examples": [
        "2019-08-12",
        "2019-03-01",
        "2019"
      ]
    },
    "page": {
      "type": "string",
      "minLength": 3,
      "description": "Website address to view, for example nike.com/pricing or https://example.com/.",
      "examples": [
        "https://en.wikipedia.org/wiki/Ada_Lovelace",
        "example.com",
        "https://www.wikipedia.org/"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "date": "2019-08-12",
      "page": "https://en.wikipedia.org/wiki/Ada_Lovelace"
    },
    {
      "date": "2019-03-01",
      "page": "example.com"
    },
    {
      "date": "2019",
      "page": "example.com"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `days_away` | integer | `1` | Number of calendar days between the requested date and capture date. |
| `main_text` | string | `"Example Domain\nThis domain is established to be used for illustrative examples in documents. You may use this domain i` | Readable text from the archived page, up to 20,000 characters. |
| `page_title` | string or null | `"Example Domain"` | Title from the archived page, if present. |
| `snapshot_url` | string | `"https://web.archive.org/web/20190302000151/http://www.example.com/"` | Link to the captured page in the Wayback Machine. |
| `snapshot_datetime` | string | `"2019-03-02T00:01:51+00:00"` | Closest archived capture date and time in UTC (ISO 8601). |

**Example input**

```json
{
  "date": "2019-03-01",
  "page": "example.com"
}
```

**Example output**

```json
{
  "days_away": 1,
  "main_text": "Example Domain\nThis domain is established to be used for illustrative examples in documents. You may use this domain in examples without prior coordination or asking for permission.\nMore information..…",
  "page_title": "Example Domain",
  "snapshot_url": "https://web.archive.org/web/20190302000151/http://www.example.com/",
  "snapshot_datetime": "2019-03-02T00:01:51+00:00"
}
```

### List snapshots

Operation `list_snapshots`, version 1. 1 credit per call.

List archived captures of a web page, oldest first, with HTTP status and content changes. The total counts matching captures before the result limit; the first capture is retained as a baseline, with content_changed false. A change is determined by comparing consecutive archived content digests; missing digests cannot establish a change.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `page` | string | yes | `"openai.com/pricing"` | Website address to look up, for example openai.com/pricing. |
| `to_date` | string | no | `"2023-02-28"` | Last capture date to include, for example 2023-12-31. Omit for all later dates. |
| `from_date` | string | no | `"2023-02-27"` | First capture date to include, for example 2023-02-01. Omit for all earlier dates. |
| `max_results` | integer | no | `2` | Maximum captures returned, for example 50. The total still counts all matching captures. |
| `changes_only` | boolean | no | `false` | Include only the first capture and later captures with changed content, for example true. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "page"
  ],
  "properties": {
    "page": {
      "type": "string",
      "description": "Website address to look up, for example openai.com/pricing.",
      "examples": [
        "openai.com/pricing",
        "example.com/somethingunlikely123412341234"
      ]
    },
    "to_date": {
      "type": "string",
      "format": "date",
      "description": "Last capture date to include, for example 2023-12-31. Omit for all later dates.",
      "examples": [
        "2023-02-28",
        "2020-12-31"
      ]
    },
    "from_date": {
      "type": "string",
      "format": "date",
      "description": "First capture date to include, for example 2023-02-01. Omit for all earlier dates.",
      "examples": [
        "2023-02-27",
        "2020-01-01"
      ]
    },
    "max_results": {
      "type": "integer",
      "default": 50,
      "maximum": 1000,
      "minimum": 1,
      "description": "Maximum captures returned, for example 50. The total still counts all matching captures.",
      "x-fous-developer": true,
      "examples": [
        2
      ]
    },
    "changes_only": {
      "type": "boolean",
      "default": true,
      "description": "Include only the first capture and later captures with changed content, for example true.",
      "examples": [
        false
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "page": "openai.com/pricing",
      "to_date": "2023-02-28",
      "from_date": "2023-02-27",
      "max_results": 2,
      "changes_only": false
    },
    {
      "page": "example.com/somethingunlikely123412341234",
      "to_date": "2020-12-31",
      "from_date": "2020-01-01"
    },
    {
      "page": "openai.com/pricing",
      "to_date": "2023-02-28",
      "from_date": "2023-02-27"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `snapshots` | array |  |  |
| `snapshots[].http_status` | string or null | `"200 OK"` | Archived HTTP status number and name, if recorded. |
| `snapshots[].snapshot_link` | string | `"https://web.archive.org/web/20230227230602/https://openai.com/pricing"` | Link to the archived page. |
| `snapshots[].content_digest` | string or null | `"AJMLKGSJXNTXTRO73KBQ6UIESMDFJO7K"` | Archived content digest, if recorded. |
| `snapshots[].content_changed` | boolean | `false` | Whether the content digest differs from the previous capture within the date range. |
| `snapshots[].http_status_code` | integer or null | `200` | Archived HTTP status number, if recorded. |
| `snapshots[].snapshot_datetime` | string | `"2023-02-27T23:06:02Z"` | Capture time in UTC. |
| `total_snapshots` | integer | `5` | Number of matching captures after change filtering, before the result limit. |

**Example input**

```json
{
  "page": "openai.com/pricing",
  "to_date": "2023-02-28",
  "from_date": "2023-02-27",
  "max_results": 2,
  "changes_only": false
}
```

**Example output**

```json
{
  "snapshots": [
    {
      "http_status": "200 OK",
      "snapshot_link": "https://web.archive.org/web/20230227230602/https://openai.com/pricing",
      "content_digest": "AJMLKGSJXNTXTRO73KBQ6UIESMDFJO7K",
      "content_changed": false,
      "http_status_code": 200,
      "snapshot_datetime": "2023-02-27T23:06:02Z"
    },
    {
      "http_status": "200 OK",
      "snapshot_link": "https://web.archive.org/web/20230228014742/https://openai.com/pricing",
      "content_digest": "JXR2SYZQHQ5WPR2JFYRWMQCFVWRZB4EB",
      "content_changed": true,
      "http_status_code": 200,
      "snapshot_datetime": "2023-02-28T01:47:42Z"
    }
  ],
  "total_snapshots": 5
}
```

## Quick start

Call the API with a Fous API key (`FOUS_API_KEY`). To create one, turn on Developer mode in Fous Studio, then open Keys & connections → API keys (https://app.fous.com/keys).

```bash
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
: "${FOUS_API_KEY:?Set FOUS_API_KEY before running this example}"

curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 120 \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@wayback-machine",
  "visibility": "public",
  "operation": "get_archived_page",
  "version": 1,
  "input": {
    "date": "2019-08-12",
    "page": "https://en.wikipedia.org/wiki/Ada_Lovelace"
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
import json
import os
import urllib.error
import urllib.request

api_key = os.environ.get("FOUS_API_KEY")
if not api_key:
    raise RuntimeError("Set FOUS_API_KEY before running this example")

body = json.loads("{\n  \"api\": \"@wayback-machine\",\n  \"visibility\": \"public\",\n  \"operation\": \"get_archived_page\",\n  \"version\": 1,\n  \"input\": {\n    \"date\": \"2019-08-12\",\n    \"page\": \"https://en.wikipedia.org/wiki/Ada_Lovelace\"\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=120) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
// First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
const apiKey = process.env.FOUS_API_KEY;
if (!apiKey) throw new Error("Set FOUS_API_KEY before running this example");

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(120_000),
  body: JSON.stringify({
  "api": "@wayback-machine",
  "visibility": "public",
  "operation": "get_archived_page",
  "version": 1,
  "input": {
    "date": "2019-08-12",
    "page": "https://en.wikipedia.org/wiki/Ada_Lovelace"
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

Or describe the data in plain language: send `{"api":"@wayback-machine","prompt":"Describe the data you need, with every detail"}` to the same URL. Fous fills in the input, runs the method that fits and returns only the fields you asked for; `data.route.calls[].request` is the exact call it made. Routing is free; the run costs the same.

## Use cases

- Review how a web page appeared on a past date
- Track archived captures of a website over time
- Identify captures with changed content
- Compare archived page titles and readable text
- Check archived HTTP status details

## FAQ

### Is Fous affiliated with Wayback Machine?

No. Fous is not affiliated with Wayback Machine. This workflow reads the public web.archive.org website and returns its data.

### How much does it cost?

Each run costs 1 credit. With pay-as-you-go, a credit costs 1¢; monthly plans cost less per credit.

### Do I need a Wayback Machine account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from web.archive.org when you run it; repeating the same request within a day may return the saved result. Fous checks this workflow automatically; it last passed a check on Sep 29, 2026.

### What did a web page look like on a past date?

Get archived page returns the closest available archived version to the requested date, including its title and readable text when present.

### When was a website captured in the archive?

List snapshots returns archived capture dates for a website, with optional date filters.

### Which archived captures had changed content?

List snapshots can include the first capture and later captures with changed content when changes-only filtering is requested.

## Related

- [Merriam-Webster API](https://fous.com/workflows/merriam-webster.md): Merriam-Webster provides definitions, pronunciations, examples, word histories, synonyms, antonyms, and related words for publicly listed entries, plus Word of the Day entries for today or published archive dates.
- [NASA API](https://fous.com/workflows/nasa.md): NASA provides astronomy pictures from June 16, 1995 onward, up to 100 media matches, inclusive UTC asteroid approaches, recent approximate natural events, and upcoming ISS sightings for listed cities.
- [Wikipedia API](https://fous.com/workflows/wikipedia.md): Wikipedia returns article summaries, images, facts, relevant search matches, readable text and daily historical events, plus human-view counts from July 2015 onward.
- [Weather Underground API](https://fous.com/workflows/weather-underground.md): Historical and current weather conditions from stations worldwide.
- [AP News API](https://fous.com/workflows/ap-news.md): AP News provides reporting, up to 50 public-page headlines, searchable articles visible in its search, and full text when accessible.
- [The Verge API](https://fous.com/workflows/the-verge.md): The Verge provides technology, science, entertainment, and policy headlines and searchable articles, including public stories and older archives, with search limited to the first 100 matches.
- [arXiv API](https://fous.com/workflows/arxiv.md): arXiv returns up to 100 matching research preprints or individual paper details, and newly announced subject papers in announcement order; announcement dates may differ from today, and replacements are excluded.
- [National Archives API](https://fous.com/workflows/national-archives.md): Search the public U.S. National Archives Catalog for historical records.
- [All Data workflows](https://fous.com/workflows/category/data)
