Skip to main content

Archivist

Preserve the web and retrieve archives with a typed Python API.

Archivist gives Python applications a consistent interface to the stable APIs published by Internet Archive and Archive.today. Search capture history, find the version nearest a point in time, or submit a page to the Wayback Machine without building around each service's response format.

Both synchronous and asynchronous clients are included, with matching models and errors.

Features

  • Search Internet Archive's Wayback capture history
  • Save pages through Internet Archive's Save Page Now service
  • Check capture progress, service availability, and account capacity
  • Browse Archive.today history and find first, latest, or closest captures
  • Use the same models from synchronous and asynchronous code
  • Keep credentials and sensitive URL data out of representations and logs

Installation

Archivist requires Python 3.11 or later.

uv add archivist-py

Using pip:

pip install archivist-py

Internet Archive

Find the oldest Wayback Machine capture without an account:

from archivist import (
    InternetArchiveCdxRecord,
    InternetArchiveCdxResult,
    InternetArchiveClient,
)

with InternetArchiveClient() as client:
    captures: InternetArchiveCdxResult = client.search("https://example.com/", limit=1)

oldest: InternetArchiveCdxRecord | None = next(iter(captures), None)
if oldest is not None:
    print(f"{oldest.timestamp:%Y-%m-%d}: {oldest.archive_url()}")

Save a page anonymously and wait for the finished capture in one call:

from archivist import InternetArchiveClient, InternetArchiveSuccessStatus

with InternetArchiveClient() as client:
    capture: InternetArchiveSuccessStatus = client.save("https://example.com/")

print(capture.archive_url())

Credentials are optional. Provide them for account features and restricted save options such as screenshots, emailed results, and WACZ files.

Archive.today

Find the oldest Archive.today capture through its Memento interface:

from archivist import ArchiveTodayClient, ArchiveTodayMemento

with ArchiveTodayClient() as client:
    oldest: ArchiveTodayMemento | None = client.first("https://example.com/")

if oldest is not None:
    print(f"{oldest.archived_at:%Y-%m-%d}: {oldest.archive_url}")

Archivist can browse existing Archive.today captures, but cannot create new ones because the service's bot protection prevents reliable automated access.

Async Support

Async clients mirror the synchronous API. Use AsyncInternetArchiveClient or AsyncArchiveTodayClient with async with, then await the same operations.

Documentation

Read the full documentation for authentication, save options, async examples, error handling, and the complete API reference.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

archivist_py-1.0.1.tar.gz (38.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

archivist_py-1.0.1-py3-none-any.whl (50.9 kB view details)

Uploaded Python 3

File details

Details for the file archivist_py-1.0.1.tar.gz.

File metadata

  • Download URL: archivist_py-1.0.1.tar.gz
  • Upload date:
  • Size: 38.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for archivist_py-1.0.1.tar.gz
Algorithm Hash digest
SHA256 e28c2f292c914d1c40ca9b789c0a12a2b8cc7d719ea039950362f7ed06e83050
MD5 3eac7ff6b371ee3d441b932f3f1ab4d7
BLAKE2b-256 1c204c8819d1cd1f7b527864314560e4a80776fdc4a1aec7ab1529e054935037

See more details on using hashes here.

File details

Details for the file archivist_py-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: archivist_py-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 50.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for archivist_py-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 23bf412ea97962af837f8428ed3ebd4f6f799d9c7672a2a0d5e2ac3bf8b3a7d6
MD5 eaa1dc1297d243d1faad620321c15056
BLAKE2b-256 a9283eb8deb9bb0b419651b51473efe8098c744dce30d9295e5ff668d4575f45

See more details on using hashes here.

Release history Release notifications | RSS feed

1.1.0

2 files

1.0.2

2 files

This release

1.0.1 This release

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page