ArchiveBox Logo
  • Contents
  • Overview
    • ArchiveBox Documentation
    • Key Features
    • 🤝 Professional Integration
    • Quickstart
      • ✳️  Easy Setup
      • 🛠  Package Manager Setup
      • 🎗  Other Options
      • ➡️  Next Steps
      • Usage
        • ⚡️  CLI Usage
        • ArchiveBox Subcommands
    • Overview
      • Input Formats: How to pass URLs into ArchiveBox for saving
      • Output Formats: What ArchiveBox saves for each URL
      • Configuration
      • Dependencies
      • Archive Layout
      • Static Archive Exporting
      • Caveats
        • Archiving Private Content
        • Security Risks of Viewing Archived JS
        • Working Around Sites that Block Archiving
        • Saving Multiple Snapshots of a Single URL
        • Storage Requirements
      • Screenshots
    • Background & Motivation
      • Comparison to Other Projects
      • Internet Archiving Ecosystem
    • Documentation
      • Getting Started
      • Advanced
      • Developers
      • More Info
    • ArchiveBox Development
      • Setup the dev environment
        • 1. Setup the monorepo
        • 2. Option A: Install the Python, JS, and system dependencies directly on your machine
        • 2. Option B: Build the docker container and use that for development instead
      • Common development tasks
        • Run in DEBUG mode
        • Install and run a specific GitHub branch
          • Use a Pre-Built Image
          • Build Branch from Source
        • Run the linters / tests
        • Make DB migrations, enter Django shell, other dev helper commands
        • Contributing a new extractor
        • Build the docs, pip package, and docker image
      • Further Reading
  • Getting Started
    • Quickstart
      • 1. Set up ArchiveBox
      • 2. Get your list of URLs to archive
      • 3. Add your URLs to the archive
      • ✅ Done!
    • Install
      • Supported Systems
      • Option A. Docker / Docker Compose Setup ⭐️
      • Option B. Automatic Setup Script
      • Option C. Bare Metal Setup
        • 1. Install uv or the ArchiveBox OS package
          • macOS
          • Ubuntu/Debian-based Systems
          • FreeBSD
          • OpenBSD
          • Arch Linux / Nix / Guix / etc. Other OSs
        • 2. Install ArchiveBox using uv
        • 3. Install runtime dependencies using archivebox install
        • Troubleshooting
        • Next Steps: Add some URLs to archive and try out CLI / Web UI
        • Next Steps: Upgrading Archivebox to a new version
        • Further Reading
    • Docker
      • Overview
      • Docker Compose
        • Setup
        • Upgrading
        • Usage
        • Accessing the data
        • Configuration
      • Docker
        • Setup
        • Upgrading
        • Usage
        • Accessing the data
        • Configuration
    • Configuration
      • General Settings
        • ONLY_NEW
        • TIMEOUT
        • RESOLUTION
        • CHECK_SSL_VALIDITY
        • USER_AGENT
        • COOKIES_FILE
        • DEFAULT_PERSONA
        • URL_DENYLIST
        • URL_ALLOWLIST
        • TAG_SEPARATOR_PATTERN
        • CRAWL_MAX_URLS
        • CRAWL_MAX_SIZE
        • CRAWL_TIMEOUT
        • CRAWL_MAX_CONCURRENT_SNAPSHOTS
        • SNAPSHOT_MAX_SIZE
        • DELETE_AFTER
        • PERMISSIONS
        • PLUGINS
      • Server Settings
        • ADMIN_USERNAME / ADMIN_PASSWORD
        • PUBLIC_INDEX / PUBLIC_ADD_VIEW
        • SECRET_KEY
        • BIND_ADDR
        • BASE_URL
        • SERVER_SECURITY_MODE
        • SNAPSHOTS_PER_PAGE
        • FOOTER_INFO
        • REVERSE_PROXY_USER_HEADER
        • REVERSE_PROXY_WHITELIST
        • LOGOUT_REDIRECT_URL
        • LDAP Settings
          • LDAP_ENABLED
          • LDAP_SERVER_URI
          • LDAP_BIND_DN
          • LDAP_BIND_PASSWORD
          • LDAP_USER_BASE
          • LDAP_USER_FILTER
          • LDAP_USERNAME_ATTR
          • LDAP_FIRSTNAME_ATTR
          • LDAP_LASTNAME_ATTR
          • LDAP_EMAIL_ATTR
          • LDAP_CREATE_SUPERUSER
      • Storage Settings
        • OUTPUT_PERMISSIONS
        • ENFORCE_ATOMIC_WRITES
        • TMP_DIR
        • ABXPKG_LIB_DIR
        • ALLOW_NO_UNIX_SOCKETS
      • Database Settings
        • DATABASE_ENGINE
        • DATABASE_HOST / DATABASE_PORT / DATABASE_USER / DATABASE_PASSWORD
        • DATABASE_NAME
        • SQLITE_JOURNAL_MODE
        • SQLITE_MMAP_SIZE
        • SQLITE_BUSY_TIMEOUT
        • SQLITE_LOCK_RETRY_TIMEOUT
        • SQLITE_LOCK_RETRY_INTERVAL
      • Search Settings
        • SEARCH_BACKEND_ENGINE
      • Shell Options
        • DEBUG
        • USE_COLOR
        • SHOW_PROGRESS
      • Plugin Configuration
        • Shared core options that plugins fall back to
        • Listing & setting plugin options
        • Why is plugin config documented separately?
    • Security Overview
      • Web UI Permissions
      • ArchiveBox Use-Cases
        • Archiving Public Content Only ⭐️ [Default, recommended for most people]
        • Archiving Content Behind Log-Ins 🚨 [Advanced users only]
        • ⚠️ Things to watch out for: ⚠️
        • Publishing
      • Run ArchiveBox as an unprivileged user
      • Output Folder
        • Database
        • Filesystem
          • Purging entries
          • Permissions
    • Usage
      • CLI Usage
        • Run ArchiveBox with configuration options
        • Import a single URL
        • Import a list of URLs from a text file
        • Import list of links from browser history
        • Import browser cookies into a persona
      • UI Usage
        • Explanation of buttons in the web UI - admin snapshots list
      • Browser Extension Usage
        • More Info
      • Disk Layout
        • Large Archives
      • SQL Shell Usage
      • Python Shell Usage
      • Python API Usage
  • Guides
    • Setting Up Storage
      • Supported Local Filesystems
        • EXT4 (default on Linux), APFS (default on macOS)
        • ZFS (recommended for experienced Linux/BSD operators) ⭐️
        • NTFS, HFS+, BTRFS
        • EXT2, EXT3, FAT32, exFAT
      • Supported Remote Filesystems
        • NFS (Docker Driver)
        • SMB / Ceph (Docker CIFS Driver)
        • Amazon S3 / Backblaze B2 / Google Drive / etc. (RClone)
          • Rclone Config Examples
          • Option A: Running Rclone on a bare-metal host
          • Option B: Running Rclone with the Docker storage plugin
        • More Docker Storage Plugins
    • Setting Up Authentication
      • Set Up Admin Web UI Permissions
      • Admin Web UI Authentication Methods
        • Username & Password (the default)
        • Reverse Proxy Authentication
        • LDAP Authentication
        • Not Yet Supported: SAML / OAuth2 / OpenID Authentication
      • REST API
        • API Bearer Token Authentication
        • API Request Header Authentication
        • API Query Parameter Authentication
          • Further Reading
    • Setting Up Search
      • How to Search in ArchiveBox
      • How Search Works
      • ArchiveBox Search Backends
        • ripgrep (the default)
          • Pros
          • Cons
        • ripgrep-all (aka rga)
        • ugrep
          • Pros
          • Cons
        • sonic ⭐️ (the recommended upgrade path for most people)
          • Pros
          • Cons
        • SQLite FTS5
          • Pros
          • Cons
        • Further Reading
    • Publishing Your Archive
      • 1. Use the built-in web server
      • 2. Export and host it as static HTML
      • Security Concerns
      • Copyright Concerns
        • Further Reading: USA Copyright Law & Fair Use Exemptions
    • Scheduled Archiving
      • How It Works
      • CLI Usage
      • Docker Compose
      • Examples
    • Chrome / Chromium Setup
      • Troubleshooting Chromium Install
    • Setting Up a Chromium User Profile
      • Docker VNC Setup
      • Non-Docker Setup (Local Host)
      • Non-Docker Setup (Remote Host)
      • More Info & Troubleshooting
    • Upgrading Versions
      • Upgrading with Docker Compose ⭐️
      • Upgrading with plain Docker
      • Upgrading with a package manager
      • Merge two or more existing archives
      • Related Documents
    • Upgrading or Merging Archives
    • Merging Collections
      • Modify the ArchiveBox SQLite3 DB directly
        • Example: Modifying an existing user’s email
        • Example: Adding a new user with a hashed password
      • Database Troubleshooting
      • Related Documents
    • Troubleshooting
      • Installing
        • macOS
        • Python and uv
        • Chromium/Google Chrome
        • Wget & Curl
        • NPM Dependencies
      • Archiving
        • No links parsed from export file
        • Lots of skipped sites
        • Lots of errors
        • Lots of broken links from the index
        • Removing unwanted links from the index
      • Hosting the Archive
        • Other database or filesystem issues
          • Docker Permissions issues
      • Database
        • Filesystem doesn’t support FSYNC (e.g. network mounts)
        • Database and filesystem contention issues when running multiple ArchiveBox processes
        • Database migrations errors or upgrade issues
        • Repairing a corrupted SQLite3 database file
  • Architecture
    • ArchiveBox Architecture Diagrams
      • High-Level Execution Flow
      • Persistent Data
      • Crawl State Machine
      • Snapshot State Machine
      • ArchiveResult Projection
  • API Reference
    • Filesystem
    • SQL API
    • REST API
    • Python API
      • archivebox
        • Subpackages
          • archivebox.machine
          • archivebox.progressmonitor
          • archivebox.ldap
          • archivebox.misc
          • archivebox.cli
          • archivebox.api
          • archivebox.workers
          • archivebox.core
          • archivebox.search
          • archivebox.mcp
          • archivebox.personas
          • archivebox.crawls
          • archivebox.config
          • archivebox.base_models
          • archivebox.opencode
          • archivebox.services
          • archivebox.plugins
        • Submodules
          • archivebox.uuid_compat
          • archivebox.__main__
          • archivebox.manage
        • Package Contents
          • Classes
          • Functions
          • Data
          • API
  • Meta
    • Roadmap
      • Planned Specification
        • v0.7: Schema improvements
        • v0.8:  Security
        • v0.9:  Performance
        • v1.0: Full headless browser control
        • v2.0 Federated or distributed archiving + paid hosted service offering
        • Major long-term changes
        • Smaller planned features
      • Past Releases
      • UI / UX Improvements Planned
      • New Extractors Planned
        • Social Media
        • Video/Streams
        • Audio/Music
        • Photos/Images/Comics
        • Text/Forums
        • MOOC/Educational Content
        • Re-Archiving / WARC Creation
        • Other
    • Changelog
    • Supporting Development
    • Web Archiving Community
      • The Master Lists
      • Web Archiving Projects
        • Bookmarking Services
        • From the Archive.org & Archive-It teams
        • From Webrecorder
        • From Rhizome.org (Conifer)
        • From the Old Dominion University: Web Science Team
        • From the Archives Unleashed Team
        • From the IIPC team
        • Other Public Archiving Services
        • Other ArchiveBox Alternatives
        • Smaller Utilities
      • Reading List
        • Blogs Friends of ArchiveBox
        • Articles We Like About Internet Archiving
        • ArchiveBox-Specific Posts, Tutorials, and Guides
        • ArchiveBox Discussions in News & Social Media
      • Communities
        • Most Active Communities
        • Web Archiving Communities
        • General Archiving Foundations, Coalitions, Initiatives, and Institutes
      • ArchiveBox Community Resources
        • ArchiveBox Chat Rooms
        • ArchiveBox on Social Media
        • ArchiveBox on Package Distribution Platforms
ArchiveBox
  • Contents
  • Setting Up Search
  • Edit on GitHub

Setting Up Search

How to Search in ArchiveBox

You can search your ArchiveBox data in a number of ways:

  • using the CLI: archivebox search 'text to search' (archivebox search --help for more)

  • using the Web UI: both the /public index and /admin/core/snapshot pages provide a search box

  • using the REST API: /api/v1/core/snapshots?search=text+to+search&search_mode=contents

  • by searching the archive data folder directly with external tools (e.g. macOS Spotlight, Cerebro, ag, Yacy, etc.)

image



How Search Works

ArchiveBox search works by doing substring matches in Snapshot metadata fields (url, title, timestamp, tags), and by searching the full archived content within each Snapshot (using the selected search backend below). You can find the search implementation source code here: archivebox/core/views.py: PublicIndex.get_queryset().

Note: ArchiveBox currently only returns the bare list of snapshots that match when performing a search.

This will be improved in the future to highlight the specific paragraph/line/area that matched within a Snapshot.
For now we recommend using Ctl+F in the browser or one of the external tools listed above to further filter for a term within a Snapshot’s contents.


ArchiveBox Search Backends

ArchiveBox provides a number of “Search Backend Engines” to tune its performance & behavior for different use-cases.

# this setting controls which search backend ArchiveBox uses
archivebox config --set SEARCH_BACKEND_ENGINE=ripgrep

# to see information about the backend you are currently using, run:
archivebox version
archivebox config --get SEARCH_BACKEND_ENGINE

By default out-of-the-box, the selected engine is a simple but efficient tool similar to grep -r called ripgrep.

Ripgrep is currently the fastest available filesystem search tool that scans over the raw archived files on every search. We chose it as the default so that beginners and 95% of users with small collections can have an experience that “just works”, without needing to install and maintain complex additional dependencies or background workers.

However, there are some fundamental limitations of scanning through every file on disk each time a search is done, so ArchiveBox provides a number of additional search backend options for when users outgrow ripgrep.

[!TIP] You should consider switching ArchiveBox to use sonic or another backend IF:

  • you have more than 1,000 Snapshots saved in your archive

  • your archive data is stored on a slower filesystem like a spinning hard drive or remote network mount

  • you want more advanced search features like stemming, boolean operators, and ability to search PDFs, eBooks, ZIP/tar files, etc.


ripgrep (the default)

ArchiveBox resolves ripgrep through abxpkg: a compatible host installation is used first, otherwise a managed copy is installed.

archivebox install ripgrep
archivebox config --set SEARCH_BACKEND_ENGINE=ripgrep

# check the resolved provider, version, and projected binary:
archivebox version

# then try it out by searching via the Web UI or CLI:
archivebox search 'text to search for'

Pros

  • supports advanced searching with regex patterns

  • simple, few moving parts, and broadly available for all OSs and CPU architectures

  • 0 idle resource use as there is no background indexer process running

  • 0 additional disk storage needed as it searches the original data instead of maintaining a separate index

  • reasonably fast on NVMe and SSD drives for small collections

Cons

  • very slow as archive collection size increases (doesn’t scale well beyond 500~1,000 Snapshots)

  • very slow if underlying filesystem is slow (e.g. HDDs or network mounts)

  • doesn’t support stemming, boolean operators, or other advanced full-text search features


ripgrep-all (aka rga)

ripgrep-all supports more binary file types such as PDFs, eBooks, Office documents, zip, and tar files. It is useful as an external companion tool, but it is not currently a supported drop-in binary for ArchiveBox’s ripgrep backend. The backend relies on rg’s command and output contract.


ugrep

ugrep is another capable external search tool, but it is not a supported drop-in binary for ArchiveBox’s ripgrep backend. Contributions adding a dedicated integration are welcome.

ugrep is similar to ripgrep and ripgrep-all in that it’s an indexless disk-search tool, but it provides some more of the full-text search features without the performance overhead of maintaining a separate search backend worker with an independent index.

https://github.com/Genivia/ugrep

Pros

  • supports boolean operators in search queries

  • supports binary formats like compressed archives, PDFs, eBooks, etc.

  • better support for Unicode, special characters, and searching across multiple lines of text

  • supports fuzzy search

Cons

  • not as fast as sonic and but also not as simple as ripgrep

  • not all of its features are fully integrated with ArchiveBox yet



sonic ⭐️ (the recommended upgrade path for most people)

Sonic is a fast, lightweight, rust-based alternative to super-heavy traditional search backends like Elasticsearch. It is capable of normalizing natural language search queries, fuzzy matching, and searching Unicode, without needing to maintain a duplicate document store index of all the searchable text.

Internally it functions as an index store, storing only the original IDs of the Snapshots with a super-compressed representation of the text. This allows it to scale to searching terabytes of archive data while maintaining an index only a fraction of that size.

ArchiveBox has supported Sonic for years, and it is the most thoroughly tested and recommended backend for ArchiveBox users that need to scale beyond ripgrep.

ArchiveBox resolves and starts Sonic through the same abxpkg lifecycle on both Docker and bare-metal installations.

archivebox config --set SEARCH_BACKEND_ENGINE=sonic
archivebox install sonic
archivebox update --index-only
archivebox search 'some text to search'

Run the same commands as docker compose run archivebox ... when using Docker Compose.

Fore more detailed instructions see here…

Pros

  • extremely fast, most queries complete in microseconds even with 100k+ snapshots

  • maintains lightweight, compressed search index that is minuscule compared to original data

  • all-in-one binary written in rust, available cross-platform and easy to deploy

  • supports advanced full-text search features like normalization, stemming, etc.

  • supports indexing and querying on a remote server (many ArchiveBox instances can share a single sonic instance)

Cons

  • one extra dependency to install and background worker to keep running (Docker Compose makes this easy though)

  • does not support searching binary files like PDFs, eBooks, compressed archives, etc.


SQLite FTS5

This is a recently added experimental option that uses a separate SQLite3 Database (similar to the one ArchiveBox already uses for Snapshot metadata) to provide full-text search.

archivebox config --set SEARCH_BACKEND_ENGINE=sqlite

# add existing data to index by running update:
archivebox update --index-only

# test it out using the archivebox Web UI or CLI:
archivebox search 'some text to search'

You can also inspect the separate FTS database directly:

sqlite3 ./search.sqlite3

> SELECT snapshot_id, url FROM search_index
      WHERE search_index MATCH 'some text to search';
# optional advanced tuning:
archivebox config --set FTS_SEPARATE_DATABASE=True
archivebox config --set FTS_TOKENIZERS="porter unicode61 remove_diacritics 2"
  • https://www.sqlite.org/fts5.html

  • https://github.com/ArchiveBox/ArchiveBox/pull/1241

Pros

  • No additional dependencies needed to install, SQLite3 is already available and used by ArchiveBox

  • No long-running background search worker process needed, 0 idle resource use

  • Supports advanced full-text search features like boolean operators, stemming, phrases, etc.

  • Comparable speed and efficiency to sonic for most use-cases (much faster than ripgrep/ugrep)

  • Durability and portability, SQLite is widely used and supported by every major platform on earth

Cons

  • Not as thoroughly-tested by ArchiveBox team as our sonic or ripgrep backends

  • Maintains a (compressed, but still potentially large) duplicate copy of all searchable text in search.sqlite3 db

  • Does not support searching binary files PDFs, eBooks, compressed archives, etc.

  • Search indexing and querying must be performed on same server as ArchiveBox data (we don’t yet support sending FTS5 queries to a remote server)




Further Reading

  • https://github.com/ArchiveBox/ArchiveBox/blob/dev/docker-compose.yml#:~:text=SEARCH_BACKEND_ENGINE

  • https://archivebox.github.io/abx-plugins/#search_backend_ripgrep

  • https://archivebox.github.io/abx-plugins/#search_backend_sonic

  • https://archivebox.github.io/abx-plugins/#search_backend_sqlite

  • #22 Original Issue where full-text search functionality was proposed

  • #543 + #570 Original PR where full-text search functionality was implemented

  • #956 Documentation: Document how search works

  • #654 Support: Search Backend only searching admin Snapshot fields instead of archive content

  • #1087 Support: Help setting up full text search

  • #1091 Support: Help switching to ripgrep-all

  • #1318 Troubleshooting: Search times out on v0.7.2 installed on Synology using Portainer

  • #1333 + #1316 Text Search and Filters don’t work at the same time in the web UI

  • #1320 Troubleshooting: Sonic backend Error: ENDED authentication_failed doesn’t contain protocol(NUMBER)

  • #1139 Feature Request: Add AI-assisted summarization, tagging, search, and more using LLMs / RAG

  • #1358 Django Admin general improvements: tree view, better filters, better sorting, custom pages, etc.

Previous Next

© Copyright 2026 ArchiveBox.