Information Gatheringwaybackarchiveapipythoncliinternet-archive

waybackpy

waybackpy is a Python package and CLI tool that interfaces with the Wayback Machine's APIs. It provides access to SavePageNow API, CDX Server API, and Availability API for archiving and retrieving web page snapshots.

Description

waybackpy enables users to interact with Internet Archive's Wayback Machine APIs through either Python scripting or command-line interface. The tool supports three key public APIs: SavePageNow (Save API) for archiving web pages, CDX Server API for querying archived content, and Availability API for checking snapshot availability.

This tool is particularly useful for researchers, security professionals, and web archivists who need programmatic access to historical web data. It simplifies tasks like bulk archiving, snapshot retrieval, and availability checks that would otherwise require manual interaction with the Wayback Machine website.

waybackpy is lightweight with an installed size of 97 KB and depends on common Python libraries. It's released under the MIT License and actively maintained with comprehensive CLI documentation available.

How It Works

waybackpy operates by making HTTP requests to the Wayback Machine's public REST APIs using Python's requests library. It supports the SavePageNow API to submit URLs for archiving, CDX Server API for indexed search queries across time ranges and parameters, and Availability API for checking if specific snapshots exist. The CLI wrapper uses Python's click library to parse command-line arguments and execute API calls with configurable user agents.

Installation

bash
sudo apt install waybackpy

Flags

-u, --urlURL on which Wayback machine operations are to be performed.
-ua, --user-agent, --user_agentUser agent, default value is 'waybackpy 3.0.6 - https://github.com/akamhy/waybackpy'.
-v, --versionwaybackpy version.
-l, --show-license, --show_license, --licenseShow license information.

Examples

Display comprehensive help information and available options for the waybackpy CLI.
waybackpy --help
Show the current version of waybackpy.
waybackpy --version
Display the MIT license information for waybackpy.
waybackpy --show-license
Perform Wayback Machine operations on the specified URL (saves or queries depending on subcommand).
waybackpy -u https://example.com
Perform operations on URL with custom user agent string.
waybackpy --url https://example.com --user-agent 'Custom UA'
Use specified user agent for Wayback Machine API requests on kali.org.
waybackpy -ua 'Mozilla/5.0' -u https://kali.org
Updated 2026-04-16kali.org ↗