October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk6 min

ArchiveBox API: How to Add URLs and Check Capture Status

ArchiveBox’s API docs vary by installation. Learn how to authenticate and list snapshots—and why you must verify the add-URL route and completion fields on your own server.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

ArchiveBox’s REST API documentation is served by your own installation at /api/v1/docs. Use that live schema to confirm the URL-submission route and payload before sending a request: the official guide documents authentication and snapshot listing, but does not establish one universal add-URL endpoint or capture-completion field. Once you have a token, the documented snapshot endpoint can retrieve records; a record listing alone is not proof that a capture is finished.

Find the API documentation for your ArchiveBox instance

Open http://api.archivebox.localhost:5797/api/v1/docs as an example of the interactive API documentation address. The hostname and port vary by deployment, so replace this example with the address configured for your server. The REST API has been available since ArchiveBox v0.8.0, but the project labels it alpha; use the documentation served by the version you actually run rather than assuming routes or schemas are identical across installations. ArchiveBox’s authentication guide explains the entry point.

As an Amazon Associate I earn from qualifying purchases.

In the interactive schema, locate the operation for creating or adding a snapshot. Verify its HTTP method, path, required request body or parameters, response shape, and required permissions. Do not infer the REST route from a CLI command or Python function: those interfaces are documented separately and do not establish the REST request format.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Authenticate with a token

ArchiveBox documents creating an API token through the Admin UI or by posting your username and password to /api/v1/auth/get_api_token. This example follows the official guide’s local-host convention; replace the host and credentials with those for your installation.

#1 Best Overall
curl -X POST 'http://api.archivebox.localhost:5797/api/v1/auth/get_api_token' 
  -H 'Content-Type: application/json' 
  -d '{"username":"YOURUSERNAMEHERE","password":"YOURPASSWORDHERE"}'

Use the returned token as a bearer token for subsequent calls. The guide also documents X-ArchiveBox-API-Key for deployments where a reverse proxy consumes the bearer header. Avoid putting a key in a query parameter unless you understand the exposure risk: anyone who obtains that URL may be able to use the API. See the authentication documentation for the supported options.

Add a URL through the REST API

There is no verified, universal REST add-URL route or payload to copy here. Open /api/v1/docs on the running instance and use the operation it exposes for adding a URL. Follow that operation’s exact method, path, body, and response schema. The REST API is alpha, so confirming these details against the installed version is part of making the integration reliable.

For a documented REST call, supply the bearer token in the Authorization header. The particular submission request depends on the schema shown by your server; do not substitute a guessed endpoint or assume that parameters from another interface apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Retrieve snapshot records and interpret status carefully

The official authentication guide demonstrates retrieving snapshot records with GET /api/v1/core/snapshots?limit=10. Using the same example host, an authenticated request is:

curl -X GET 'http://api.archivebox.localhost:5797/api/v1/core/snapshots?limit=10' 
  -H 'accept: application/json' 
  -H 'Authorization: Bearer YOURAPITOKENHERE'

This lists snapshot records; it does not by itself establish that a capture has completed. The reviewed API guidance does not define a universal completion field, whether adding a URL is synchronous, or a recommended polling interval. Inspect the response schema and lifecycle details in your instance’s interactive docs before building status logic. In particular, distinguish a record existing from its capture work being finished.

For local operational checks, the installation documentation also describes archivebox list and archivebox status. These can help inspect snapshots and collection health, but they are not documented as equivalent to a specific REST status field. See the installation and configuration guide.

Choose between REST, CLI, and Python

Interface Best fit What the documentation establishes Important qualification
REST API A separate process or service that needs HTTP access to ArchiveBox. Token authentication and snapshot listing are documented. The API is alpha; check the running instance’s schema for add routes, payloads, and status behavior.
CLI Local workflows running where ArchiveBox is installed. archivebox add URL, stdin and file imports, and input formats including RSS, XML, Netscape bookmarks, and URL text are documented. CLI behavior does not specify the REST endpoint or its request body.
Python Local Python integration with access to the ArchiveBox data directory and environment. The usage guide shows Django initialization followed by a call to the add function. The Python API is labeled beta; it is not a REST request recipe.

Documented local alternatives for adding URLs

Use the command line

For a local installation, the usage documentation gives these forms:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
archivebox add 'https://example.com'
echo 'https://example.com' | archivebox add
cat urls_to_archive.txt | archivebox add
archivebox add < urls_to_archive.txt

The CLI also documents --depth=1 for including a URL’s one-hop outlinks. These examples are CLI workflows; use the instance API schema when the caller must submit through REST. ArchiveBox’s usage guide covers these imports.

Call the Python function locally

The documented Python example changes to the data directory, initializes Django, and calls add. It requires local access to that installation’s environment and data directory:

import os
from pathlib import Path

DATA_DIR = Path("~/archivebox/data").expanduser()
os.chdir(DATA_DIR)

from archivebox.config.django import setup_django
setup_django(check_db=True)

from archivebox.cli.archivebox_add import add
crawl, snapshots = add(urls=["https://example.com"], index_only=True)
print(crawl.id, list(snapshots.values_list("id", flat=True)))

The example’s index_only=True behavior and returned crawl and snapshot objects belong to the Python interface. Do not treat them as a specification for REST fields. The usage documentation provides the local integration context.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot common integration problems

  • The docs URL does not load: confirm the hostname, port, and API path for your deployment. The api.archivebox.localhost:5797 address is an example, not a universal server address.
  • A request is unauthorized: confirm the token was created for this instance and is sent as Authorization: Bearer YOURAPITOKENHERE. If a reverse proxy consumes that header, check whether the documented X-ArchiveBox-API-Key header is appropriate for your setup.
  • You are unsure how to submit a URL: inspect the live API schema for the installed version. A CLI command or Python call does not verify a REST route or body.
  • A snapshot appears, but your client says the capture is done: do not equate record presence with completion. Confirm the response fields and lifecycle semantics in the instance docs before defining a completion condition.
  • A query-string key may have leaked: treat the URL as sensitive because possession of it may grant API access. Prefer the documented header-based authentication method and handle exposed credentials according to your deployment’s security procedures.

Or skip the browser setup

If your task is to capture a rendered website screenshot rather than add an archive to your own ArchiveBox installation, ScreenshotNeo can return an image or PDF with one request. It is a separate screenshot API, not an ArchiveBox REST client; it does not add records to an ArchiveBox collection.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For an image response, use cURL:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp

See the ScreenshotNeo API documentation for the available parameters. Cookie banners, newsletter popups, and chat widgets are removed before the shot; bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots, and 1,000 screenshots a month are free with no card; paid plans start at $5 for 3,000. Sign up for free ScreenshotNeo access.

Frequently Asked Questions

Does ArchiveBox document a universal REST endpoint for adding a URL?

The endpoint and request schema must be confirmed in the interactive API docs served by the ArchiveBox instance you run.

Does the snapshots endpoint prove that a capture has finished?

No. It retrieves snapshot records, but completion semantics must be verified in the running instance’s API schema.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.