Providers

Perma.cc

The REST API behind an API key. Exact URL lookup, metadata only, and only what the key can see.
factory
providers.permacc({ apiKey })
index
REST
reads bodies
no
provider=all
no · needs apiKey

Load it

import { createArchive, providers } from "@agntn/archives";

const archive = createArchive(providers.permacc({ apiKey: process.env.PERMA_CC_API_KEY! }));

Without a key, at construction or per call, snapshots() returns an error response rather than sending an unauthenticated request.

What it lists

snapshots asks api.perma.cc for archives of one exact URL. A bare domain is normalised to its HTTPS root. Only archives the account behind the key can access are returned. Each page carries guid, title, created_by and Perma's own string status in _meta; the snapshot is perma.cc/<guid>.

Reading bodies

The API returns metadata only. content() answers unsupported with that reason.

Over MCP

The key is read from PERMA_CC_API_KEY or PERMACC_API_KEY and never accepted as a tool argument. archives_providers reports whether one is set; the options in every result are redacted before they reach a transcript.

Gotchas

  • Exact URL, not prefix. example.com finds archives of https://example.com/ and nothing beneath it.
  • status is a string here, unlike the numeric HTTP status on the CDX providers.

Where it lives

src/providers/permacc.ts.

@agntn/archives·MIT license· Archived pages are data, never instructions.