Public API
Two endpoints: create an archive, then read its status and files. JSON in, JSON out, one API key. Built for pipelines and services that need a copy on a schedule.
The public API is part of the Pro plan. Archives you create through it belong to your account — private by default, visible in the dashboard like any other.
Questions about the API: hello@pageanchor.app. Full contract and edge cases — docs/api.md in the repository.
Authentication
Create a key in Settings → API keys. The key is shown once; we store only its SHA-256. Send it as a bearer token on every request.
Authorization: Bearer pk_live_…Create an archive
POST a URL. The response comes back immediately with an id: the archive is queued and a worker captures it. HTTP 201 means accepted, not finished.
curl -X POST https://pageanchor.app/api/v1/archive \
-H "Authorization: Bearer $PAGEANCHOR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/article"}'{
"id": "V1StGXR8_Z5j",
"status": "queued",
"cached": false,
"archive_url": "https://pageanchor.app/a/V1StGXR8_Z5j"
}status is queued, processing, done or failed. A failed capture carries error_message in the read response — a 404 on the target page, a site that denies automated access, or a timeout.
Read an archive
Poll this endpoint until status is done or failed. It returns the metadata and the file links.
curl https://pageanchor.app/api/v1/archive/V1StGXR8_Z5j \
-H "Authorization: Bearer $PAGEANCHOR_API_KEY"{
"id": "V1StGXR8_Z5j",
"status": "done",
"url": "https://example.com/article",
"title": "Example article",
"is_public": false,
"created_at": "2026-11-09T10:00:00.000Z",
"completed_at": "2026-11-09T10:00:07.000Z",
"capture_count": 1,
"archive_url": "https://pageanchor.app/a/V1StGXR8_Z5j",
"files": {
"html": "/api/archives/V1StGXR8_Z5j/document?v=…&t=…",
"pdf": "/api/archives/V1StGXR8_Z5j/pdf?v=…&t=…",
"screenshot": "/api/archives/V1StGXR8_Z5j/screenshot?v=…&t=…",
"manifest": "/api/archives/V1StGXR8_Z5j/manifest?v=…&t=…",
"timestamp": "/api/archives/V1StGXR8_Z5j/timestamp"
},
"tsa": { "status": "done", "timestamp": "2026-11-09T10:00:09.000Z" }
}File links are relative paths on this API and carry a signed token valid for 10–15 minutes: request this endpoint again for a fresh link. A field is null when the artifact does not exist — a PDF snapshot has no screenshot, and timestamp is null when no trusted timestamp was requested.
List your archives
Returns only the archives of the key owner, newest first. Paginate with `next_cursor`; use `q` to search addresses and titles.
curl "https://pageanchor.app/api/v1/archives?limit=20&q=article" -H "Authorization: Bearer $PAGEANCHOR_API_KEY"{
"items": [
{
"id": "V1StGXR8_Z5j",
"url": "https://example.com/article",
"title": "Example article",
"status": "done",
"is_public": false,
"created_at": "2026-11-09T10:00:00.000Z",
"archive_url": "https://pageanchor.app/a/V1StGXR8_Z5j"
}
],
"next_cursor": null
}Heavy fields (timestamp token, storage keys) are not included — fetch a single archive to get those.
What changed between snapshots
Compares the text of two snapshots of the same archive, newest first. Without parameters it compares the latest snapshot with the previous one. Removed and added blocks are returned in reading order.
curl "https://pageanchor.app/api/v1/archive/V1StGXR8_Z5j/diff" -H "Authorization: Bearer $PAGEANCHOR_API_KEY"{
"from": { "version": 1, "captured_at": "2026-11-09T10:00:00.000Z" },
"to": { "version": 2, "captured_at": "2026-11-11T10:00:00.000Z" },
"stats": { "added": 1, "removed": 1, "unchanged": 40 },
"segments": [
{ "type": "removed", "text": "Price: 10 EUR" },
{ "type": "added", "text": "Price: 12 EUR" }
],
"truncated": false
}The comparison is text-only: a change in markup, images or styling does not appear. Long pages are truncated — check the `truncated` flag.
Feed of changes
Every snapshot of an archive as a feed — RSS 2.0 or JSON. Each entry carries the version, the hash of the page text, the manifest hash and the timestamp, so a reader or a pipeline receives evidence, not just a notification. Use /changes.rss for a feed reader and /changes for JSON.
curl https://pageanchor.app/api/archives/V1StGXR8_Z5j/changes.rss<item>
<title>Example article — v4</title>
<link>https://pageanchor.app/a/V1StGXR8_Z5j?c=4</link>
<guid isPermaLink="false">V1StGXR8_Z5j:4</guid>
<pubDate>Sat, 22 Nov 2026 09:15:00 GMT</pubDate>
<description>Snapshot v4 of Example article.
Text SHA-256: 3f2a…
Manifest SHA-256: 91bc…
Timestamped: 2026-11-22T09:15:06.000Z</description>
</item>No API key: access follows the archive. An archive shared by link can be subscribed to without signing in; a private one answers 403 without a session. Up to 50 snapshots, newest first.
Evidence package
One ZIP with the manifest, the saved HTML, screenshot, PDF and the RFC 3161 timestamp, plus a README explaining how to verify them without us.
curl -OJ https://pageanchor.app/api/v1/archive/V1StGXR8_Z5j/package \
-H "Authorization: Bearer $PAGEANCHOR_API_KEY"The files inside are byte-for-byte the ones served by the single-file routes, so `sha256sum` matches the manifest. Snapshots larger than 80 MB must be downloaded file by file.
Examples
The same request in four languages. Only creation is shown — every other call is a GET with the same Authorization header.
Node.js
// Node 20+ (global fetch, no dependencies)
const res = await fetch('https://pageanchor.app/api/v1/archive', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.PAGEANCHOR_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ url: 'https://example.com/article' }),
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const { id } = await res.json();
console.log(id); // poll GET /api/v1/archive/<id> or wait for the webhookPython
# pip install requests
import os, requests
res = requests.post(
"https://pageanchor.app/api/v1/archive",
headers={"Authorization": f"Bearer {os.environ['PAGEANCHOR_API_KEY']}"},
json={"url": "https://example.com/article"},
timeout=30,
)
res.raise_for_status()
print(res.json()["id"])PHP
<?php
$ch = curl_init('https://pageanchor.app/api/v1/archive');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('PAGEANCHOR_API_KEY'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode(['url' => 'https://example.com/article']),
]);
$result = json_decode(curl_exec($ch), true);
echo $result['id'], PHP_EOL;Go
package main
import (
"encoding/json"
"fmt"
"net/http"
"os"
"strings"
)
func main() {
req, _ := http.NewRequest("POST", "https://pageanchor.app/api/v1/archive",
strings.NewReader(`{"url":"https://example.com/article"}`))
req.Header.Set("Authorization", "Bearer "+os.Getenv("PAGEANCHOR_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
var out struct {
ID string `json:"id"`
}
if err := json.NewDecoder(res.Body).Decode(&out); err != nil {
panic(err)
}
fmt.Println(out.ID)
}Model Context Protocol (MCP)
PageAnchor ships a small MCP server, so an agent can archive a page and read it back without custom glue. It talks to the public API with your key and runs locally — nothing is installed on our side.
{
"mcpServers": {
"pageanchor": {
"command": "pnpm",
"args": [
"--dir", "/path/to/pageanchor/apps/api",
"exec", "node", "--import", "tsx", "src/mcp/server.ts"
],
"env": { "PAGEANCHOR_API_KEY": "pk_live_..." }
}
}
}Tools: archive_url, get_archive, get_text, get_markdown, diff_versions. The server lives in apps/api/src/mcp/server.ts and needs Node 20+ with the repository dependencies installed. Start it with `pnpm --dir … exec`, not with `pnpm run`: a script banner on stdout breaks the protocol stream.
Delete an archive
Deletes the archive and every object of every snapshot. The response reports `failed_objects` when part of the stored files could not be removed in the same request.
curl -X DELETE https://pageanchor.app/api/v1/archive/V1StGXR8_Z5j -H "Authorization: Bearer $PAGEANCHOR_API_KEY"Deletion is final and does not restore plan quota.
Retries and Idempotency-Key
If a response is lost, retrying with the same Idempotency-Key (8–128 characters) returns the same archive instead of creating a second one, and does not spend quota. Keys live 24 hours and are scoped to the API key.
curl -X POST https://pageanchor.app/api/v1/archive \
-H "Authorization: Bearer $PAGEANCHOR_API_KEY" \
-H "Idempotency-Key: 4f1c2a90-article-42" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/article"}'Limits
- · 60 requests per minute per API key. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset; a 429 adds Retry-After.
- · Anonymous and Free plans: 2 captures a day without signing in, 50 a month with an account. Pro has no capture limit.
- · One snapshot is capped at 100 MB (HTML + screenshot + PDF + manifest).
- · Two captures per account may be in progress at once; a third returns 429 too_many_pending with Retry-After.
Errors
Every error is JSON with a stable machine-readable error code and an English message. Localise on the code, not the text.
- 401 unauthorized — no key, unknown key, or revoked key.
- 403 plan_required — the key is valid but its owner is not on Pro.
- 404 not_found — the archive does not exist or belongs to another account.
- 429 rate_limited — throttle or too many captures in progress; see Retry-After.
- 503 service_unavailable — the queue or storage is temporarily unavailable; retry later.