# 🗂️ Google Cache Viewer — Wayback + Archive Alternative (`nexgendata/google-cache-viewer`) Actor

Replaces Google's cached-page view (killed Feb 2024). Queries Wayback Machine + archive.today, returns latest snapshot URL, timestamp, and extracted text content.

- **URL**: https://apify.com/nexgendata/google-cache-viewer.md
- **Developed by:** [Stephan Corbeil](https://apify.com/nexgendata) (community)
- **Categories:** Developer tools, Automation, Business
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.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/platform/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

## 🗂️ Google Cache Viewer — Wayback + Archive Alternative

**Google killed their cache view in February 2024.** The `cache:` search operator, the "Cached" link in search results, and the `webcache.googleusercontent.com` subdomain — all gone. For two decades, Google Cache was how the web retrieved temporarily-dead pages, saw what a site looked like a week ago, and debugged deployment issues.

This actor replaces it with a drop-in lookup against **Internet Archive Wayback Machine + archive.today**, returning the freshest available snapshot for any URL.

### What it does

For every URL you provide, the actor:

1. Queries Wayback Machine's public "closest snapshot" API
2. Queries archive.today's `/newest/` endpoint (follows redirect chain)
3. Returns the freshest available snapshot with URL, ISO timestamp, and source
4. Optionally fetches the snapshot HTML and extracts title + 8K char text content
5. Emits a stable content hash for change detection

### Example

```python
import requests

r = requests.post(
    "https://api.apify.com/v2/acts/nexgendata~google-cache-viewer/run-sync-get-dataset-items?token=" + APIFY_TOKEN,
    json={
        "urls": [
            "https://example.com/blog/post-now-deleted",
            "https://techcrunch.com/2023/01/01/some-article"
        ],
        "fetchContent": True
    }
)

for item in r.json():
    if item["found"]:
        print(f"{item['url']}")
        print(f"  Archived: {item['latest_timestamp']} via {item['source']}")
        print(f"  Title: {item['content_title']}")
        print(f"  Preview: {item['content_text'][:200]}...")
    else:
        print(f"{item['url']} — NOT ARCHIVED")
````

Sample output:

```
https://example.com/blog/post-now-deleted
  Archived: 2023-11-04T08:22:17Z via wayback
  Title: How We Scaled to 10M Users
  Preview: When we hit 10 million monthly users last fall, we learned...
```

### cURL

```bash
curl -X POST "https://api.apify.com/v2/acts/nexgendata~google-cache-viewer/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"urls":["https://example.com/"],"fetchContent":true}'
```

### Why this replaces Google Cache

| | Google Cache (dead) | This actor |
|---|---|---|
| Status | Shut down Feb 2024 | Active |
| Access | `cache:URL` operator / `webcache.googleusercontent.com` | HTTPS API |
| Freshness | Last Google crawl | Last Wayback/archive.today snapshot (minutes to months) |
| Bulk mode | Manual, one URL at a time | 200 URLs/run |
| Text extraction | ❌ (raw HTML) | ✅ (8K char cleaned text) |
| Machine-readable | ❌ | ✅ (JSON) |
| Cost | Free | $0.003 per URL |

### Common use cases

- **Dead-link recovery** — find the last archived version of a page that 404'd
- **SEO audits** — see what a competitor's page used to say before they rewrote it
- **Journalism / OSINT** — pull the text of pages that were deleted after publication
- **Legal / compliance** — document what a contract/terms page said on a given date
- **Content monitoring** — track if an important page changed (via content\_hash)
- **Affiliate link repair** — bulk lookup of product pages that were removed

### Pricing

- **$0.005 per run** (startup)
- **$0.003 per URL looked up** (includes content extraction when requested)

100 URLs with content extraction = **$0.305**. Cheaper than Screaming Frog's archive plugin and no subscription.

### FAQ

**Q: Does archive.today always have the page?**
A: Not always. Wayback is broader; archive.today often has freshness Wayback doesn't. The actor queries both and returns the fresher of the two.

**Q: What if neither has it?**
A: Returns `found: false`. Can't conjure pages that were never archived.

**Q: Does this trigger a new archive capture?**
A: No — read-only. To *create* a fresh capture, use Wayback's Save Page Now endpoint separately (your request, not ours).

**Q: Rate limits?**
A: Wayback rate-limits shared usage at about 1 request/second per IP. This actor paces accordingly — expect ~1 URL/second.

**Q: How old can snapshots be?**
A: Wayback has archives dating to 1996. For any URL with a public history, you'll likely find something.

### Related tools

- [Website Content Crawler](https://apify.com/nexgendata/website-content-crawler?fpr=2ayu9b)
- [WHOIS Domain Lookup](https://apify.com/nexgendata/whois-domain-lookup?fpr=2ayu9b)
- [SSL Certificate Checker](https://apify.com/nexgendata/ssl-certificate-checker?fpr=2ayu9b)
- [DNS Propagation Checker](https://apify.com/nexgendata/dns-propagation-checker?fpr=2ayu9b)

### Try it

[🗂️ Google Cache Viewer on Apify](https://apify.com/nexgendata/google-cache-viewer?fpr=2ayu9b)

New to Apify? [Get free platform credits](https://www.apify.com/?fpr=2ayu9b).

# Actor input Schema

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

List of URLs to find in the archive. Up to 200 per run.

## `fetchContent` (type: `boolean`):

When true, fetches the archive snapshot and extracts the text content (title + first 8K chars). When false, returns only the snapshot URL.

## Actor input object example

```json
{
  "urls": [
    "https://en.wikipedia.org/wiki/Web_archiving"
  ],
  "fetchContent": true
}
```

# 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": [
        "https://en.wikipedia.org/wiki/Web_archiving"
    ],
    "fetchContent": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("nexgendata/google-cache-viewer").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": ["https://en.wikipedia.org/wiki/Web_archiving"],
    "fetchContent": True,
}

# Run the Actor and wait for it to finish
run = client.actor("nexgendata/google-cache-viewer").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 '{
  "urls": [
    "https://en.wikipedia.org/wiki/Web_archiving"
  ],
  "fetchContent": true
}' |
apify call nexgendata/google-cache-viewer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=nexgendata/google-cache-viewer",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "🗂️ Google Cache Viewer — Wayback + Archive Alternative",
        "description": "Replaces Google's cached-page view (killed Feb 2024). Queries Wayback Machine + archive.today, returns latest snapshot URL, timestamp, and extracted text content.",
        "version": "0.0",
        "x-build-id": "aefrwCVjF0FncdZPH"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/nexgendata~google-cache-viewer/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-nexgendata-google-cache-viewer",
                "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/nexgendata~google-cache-viewer/runs": {
            "post": {
                "operationId": "runs-sync-nexgendata-google-cache-viewer",
                "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/nexgendata~google-cache-viewer/run-sync": {
            "post": {
                "operationId": "run-sync-nexgendata-google-cache-viewer",
                "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",
                "required": [
                    "urls"
                ],
                "properties": {
                    "urls": {
                        "title": "URLs to look up",
                        "type": "array",
                        "description": "List of URLs to find in the archive. Up to 200 per run.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "fetchContent": {
                        "title": "Fetch archived page content",
                        "type": "boolean",
                        "description": "When true, fetches the archive snapshot and extracts the text content (title + first 8K chars). When false, returns only the snapshot URL.",
                        "default": true
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
