skillfed

waybackpy

Python package that interfaces with the Internet Archive's Wayback Machine APIs. Archive pages and retrieve archived pages easily.

waybackpy v3.0.6 4.9M downloads/30d#2,212 on PyPI602
Permissive license MIT DORMANT released

What it is and what it does

Waybackpy is a Python library and command-line tool that wraps three Internet Archive Wayback Machine APIs: SavePageNow (to archive a live page), CDX Server (to query historical snapshots with filtering), and Availability (to find oldest, newest, or near-date snapshots). It lets you programmatically save web pages to the archive, retrieve snapshots from specific dates, and iterate over all archived versions of a URL without writing raw HTTP requests.

The package is pure Python, depends only on click, requests, and urllib3, and supports Python 3.6 and later. It works both as an importable module for scripts and as a standalone CLI tool. The library is marked Production/Stable but has been dormant since early 2022, meaning it is unlikely to receive updates for new Wayback Machine API changes, though it remains functional for standard archiving and retrieval tasks.

Use it for:

  • Archive a live web page to the Wayback Machine and retrieve its archive URL for documentation or citation.
  • Query historical snapshots of a website to find when content changed or to retrieve a specific version from a known date.
  • Automate bulk archiving of multiple URLs or iterate over all snapshots of a site within a date range.
  • Build a CLI tool or script that lets non-developers search and retrieve archived web pages without API knowledge.
  • Verify that a page was archived at a specific time or retrieve the oldest available snapshot of a URL.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Waybackpy provides Python and CLI access to the Internet Archive's Wayback Machine APIs—save pages, retrieve snapshots, and query historical web archives via SavePageNow, CDX Server, and Availability APIs.

Yes, if you need to interact with the Wayback Machine APIs and don't require active maintenance. The package is stable, has no known vulnerabilities, low install friction, and a permissive license. However, be aware that it has been dormant since 2022—if the Wayback Machine APIs change significantly, you may need to fork or patch it yourself. For read-heavy use it is low-risk; for heavy archiving workloads, test thoroughly first.

Install

waybackpy on PyPI

pip

pip install waybackpy

uv

uv add waybackpy

poetry

poetry add waybackpy

Installing waybackpy

Before you install

Low install friction: pure Python wheel with three common dependencies (click, requests, urllib3). Maintenance is dormant—last release was 2022-03-15 and last commit 2024-02-26—but the package is marked Production/Stable and has no known vulnerabilities, so it remains usable for read-heavy Wayback Machine queries.

License in practice

MIT license (permissive) means you can use, modify, and distribute waybackpy freely in commercial or private projects with minimal restrictions—only attribution and license inclusion are required.

Quickstart

pip install waybackpy

from waybackpy import WaybackMachineSaveAPI
url = "https://example.com"
user_agent = "Mozilla/5.0 (Windows NT 5.1; rv:40.0) Gecko/20100101 Firefox/40.0"
save_api = WaybackMachineSaveAPI(url, user_agent)
archive_url = save_api.save()
print(archive_url)

Requires a user-agent string when instantiating API classes; the Wayback Machine APIs enforce this for request identification.

Verify before relying

  • Whether the package's dormant status affects reliability of Wayback Machine API calls as the Internet Archive's APIs evolve.
  • Performance characteristics when querying large date ranges or handling high-volume snapshot iteration.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.6)
Install friction low — pure-Python wheel
Runtime dependencies 3 — click, requests, urllib3
Maintenance dormant — 1,613 days since the last release
Last repo commit
First released
Downloads 4,861,941/month — #2,212 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: waybackpy-3.0.6-py3-none-any.whl

Keywords: Archive Website, Wayback Machine, Internet Archive, Wayback Machine CLI, Wayback Machine Python, Internet Archiving, Availability API, CDX API, savepagenow

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: End Users/DesktopLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonTyping :: Typed

Tags

wayback machine api pythoninternet archive snapshotssave web pages to archivecdx server api clienthistorical web page retrievalweb archiving automationwayback machine cli tool
web-archivinginternet-archivecli-tool

More WWW/HTTP packages