Introduction
ArchiveBox provides a REST API for programmatic access to your web archiving server. The API is built with django-ninja and follows RESTful conventions.API Base URL
The API is available at:- Local development:
http://127.0.0.1:8000/api/v1/ - Docker setup:
http://web.archivebox.localhost:8000/api/v1/
Interactive API Documentation
ArchiveBox provides an interactive Swagger UI for exploring and testing the API:- Browse all available endpoints
- View request/response schemas
- Test API calls directly from your browser
- Generate code examples
API Status
Available Endpoints
The API is organized into several categories:Core Models (/api/v1/core/)
- Snapshots - Manage archived URLs and their metadata
- ArchiveResults - Access individual archiving outputs (PDF, screenshot, etc.)
- Tags - Organize snapshots with tags
Crawls (/api/v1/crawls/)
- Crawls - Manage crawl sessions (groups of snapshots from a single import)
Authentication (/api/v1/auth/)
- API Tokens - Generate and validate API tokens
CLI (/api/v1/cli/)
- Command Execution - Run ArchiveBox CLI commands via API
Workers (/api/v1/workers/)
- Background Workers - Monitor and manage background processing
Machine (/api/v1/machine/)
- System Info - View server and system information
Response Format
All API responses return JSON with consistent structure:Error Responses
Errors return JSON with error details:200- Success400- Bad request (invalid parameters)403- Forbidden (authentication failed or insufficient permissions)404- Resource not found503- Service error
Authentication
API access requires authentication. See the Authentication page for details on:- API token generation
- Authentication methods
- Permission requirements
Pagination
List endpoints support pagination with the following query parameters:limit- Number of items per page (default: 200, max: 500)offset- Number of items to skippage- Page number (alternative to offset)
Filtering
Many list endpoints support filtering via query parameters. See individual endpoint documentation for available filters. Example:CORS and Security
The API uses token-based authentication and does not set session cookies by default. This allows cross-origin API access when properly configured.
- All endpoints require superuser authentication
- API responses include
Cache-Control: no-storeheader - Debug headers include execution details (stdout/stderr)
Next Steps
Authentication
Set up API tokens and authentication
Snapshots API
Manage archived snapshots
Crawls API
Work with crawl sessions
Tags API
Organize with tags