185 releases

0.8.12 Oct 28, 2023
0.8.9 Jul 26, 2023
0.7.79 Mar 10, 2023
0.6.47 Dec 30, 2022
0.1.2 Mar 27, 2021

#2 in #web-crawler

Download history 159/week @ 2023-08-16 133/week @ 2023-08-23 31/week @ 2023-08-30 221/week @ 2023-09-06 21/week @ 2023-09-13 373/week @ 2023-09-20 242/week @ 2023-09-27 28/week @ 2023-10-04 43/week @ 2023-10-11 271/week @ 2023-10-18 203/week @ 2023-10-25 147/week @ 2023-11-01 56/week @ 2023-11-08 288/week @ 2023-11-15 287/week @ 2023-11-22 432/week @ 2023-11-29

1,068 downloads per month

MIT license



A gRPC web indexer turbo charged for performance.

This project is capable of handling millions of pages per second efficiently.

Getting Started

Make sure to have Rust installed or Docker.

This project requires that you start up another gRPC server on port 50051 following the proto spec.

The user agent is spoofed on each crawl to a random agent and the indexer extends spider as the base.

  1. cargo run or docker compose up


You can install easily with the following:


The crate is available to setup a gRPC server within rust projects.

cargo install website_crawler


You can use also use the docker image at a11ywatch/crawler.

Set the CRAWLER_IMAGE env var to darwin-arm64 to get the native m1 mac image.

  container_name: crawler
  image: "a11ywatch/crawler:${CRAWLER_IMAGE:-latest}"
    - 50055

Node / Bun

We also release the package to npm @a11ywatch/crawler.

npm i @a11ywatch/crawler

After import at the top of your project to start the gRPC server or run node directly against the module.

import "@a11ywatch/crawler";


This is a basic example crawling a web page, add spider to your Cargo.toml:

website_crawler = "0.8.3"

And then the code:

extern crate spider;

use website_crawler::website::Website;
use website_crawler::tokio;

async fn main() {
    let url = "https://choosealicense.com";
    let mut website: Website = Website::new(&url);

    for page in website.get_pages() {
        println!("- {}", page.get_url());

You can use Configuration object to configure your crawler:

// ..
let mut website: Website = Website::new("https://choosealicense.com");
website.configuration.respect_robots_txt = true;
website.configuration.subdomains = true;
website.configuration.tld = false;
website.configuration.sitemap = false;
website.configuration.sitemap_path = None; // Defaults to sitemap.xml
website.configuration.proxy = "http://username:password@localhost:1234";
website.configuration.delay = 0; // Defaults to 250 ms
website.configuration.user_agent = "myapp/version".to_string(); // Defaults to spider/x.y.z, where x.y.z is the library version

A basic example can also be done with:

One terminal run the server

cargo run --example server --release

Another terminal run the client/server

cargo run --example client --release



In order to build crawler locally >= 0.5.0, you need the protoc Protocol Buffers compiler, along with Protocol Buffers resource files.


proto compiler needs to be at v3 in order to compile. Ubuntu 18+ auto installs.

sudo apt update && sudo apt upgrade -y
sudo apt install -y protobuf-compiler libprotobuf-dev

Alpine Linux

sudo apk add protoc protobuf-dev


Assuming Homebrew is already installed. (If not, see instructions for installing Homebrew on the Homebrew website.)

brew install protobuf


jemalloc - use jemalloc memory allocator (default disabled). regex - use the regex crate for blacklist urls validation. ua_generator - use the ua_generator crate to spoof random user agent.


This crawler is optimized for reduced latency and uses isolated based concurrency as it can handle over 10,000 pages within several milliseconds. In order to receive the links found for the crawler you need to add the website.proto to your server. This is required since every request spawns a thread. Isolating the context drastically improves performance (preventing shared resources / communication ).


If you need help implementing the gRPC server to receive the pages or links when found check out the gRPC node example for a starting point .


Check the license file in the root of the project.


~542K SLoC