waybackpy
Python package that interfaces with the Internet Archive's Wayback Machine APIs. Archive pages and retrieve archived pages easily.
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 waybackpyuv
uv add waybackpypoetry
poetry add waybackpyInstalling 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
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
savepagenowWrapper and CLI tool to submit URLs to…
permissive · top 15,000 on PyPI
internetarchiveProgrammatic and command-line interface to…
agpl · top 15,000 on PyPI
arpyArpy reads and extracts files from ar archives…
permissive · top 15,000 on PyPI
zipfile36Provides a backport of Python 3.6's zipfile…
permissive · top 5,000 on PyPI
handy-archivesProvides utility functions for working with…
permissive · top 15,000 on PyPI
Wikipedia-APIWikipedia-API is a Python wrapper for…
permissive · top 5,000 on PyPI
fastdownloadDownloads, verifies, and extracts archives from…
permissive · top 15,000 on PyPI
extractcodeExtracts a wide range of archive formats (tar,…
permissive · top 15,000 on PyPI
cabarchiveA pure-Python library for creating and…
copyleft · top 15,000 on PyPI
libarchive-clibarchive-c provides a Python interface to…
permissive · top 15,000 on PyPI