Skip to content
프로젝트

소개

Rust로 만든 웹 크롤러 및 스크레이퍼입니다. Spider Cloud의 엔진입니다.

데이터 및 분석

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
+2
in 7 days
+9
in 15 days
+18
in 1 month
+54

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

Spider

Spider

A web crawler and scraper for Rust.

Crates.io version Crates.io downloads Documentation Build status

Docs · Examples · Spider Cloud · Discord

Spider crawls a site concurrently and hands you each page as it lands. It fetches over plain HTTP, and with the chrome feature it renders pages that need JavaScript in headless Chrome. On an Apple M1 Max it crawled 100,000 pages over loopback in 3.9 seconds. The benchmark has the setup.

Quickstart

cargo add spider
use spider::{tokio, website::Website};

#[tokio::main]
async fn main() {
    let mut website = Website::new("https://example.com");
    let mut rx = website.subscribe(0);

    let printer = tokio::spawn(async move {
        while let Ok(page) = rx.recv().await {
            println!("{}  {}", page.status_code, page.get_url());
        }
    });

    website.crawl().await;
    website.unsubscribe();
    let _ = printer.await;
}

Spider finds the links, fetches them concurrently and hands you each page the moment it lands. It stops when the site runs out or a limit you set is reached.

Scale it on Spider Cloud

A crawl outgrows one machine when it needs proxies and a fleet of browsers. Spider Cloud runs both, and moving to it takes one feature flag and a config.

[dependencies]
spider = { version = "2", features = ["spider_cloud"] }
use spider::configuration::{SpiderCloudConfig, SpiderCloudMode, SpiderCloudReturnFormat};

let cloud = SpiderCloudConfig::new("YOUR_API_KEY")
    .with_mode(SpiderCloudMode::Smart)
    .with_return_format(SpiderCloudReturnFormat::Markdown);

let mut website = Website::new("https://example.com")
    .with_spider_cloud_config(cloud)
    .build()
    .unwrap();

Smart mode sends each request through Spider's proxies. When that fetch fails, it hands the page to the scrape API, which can render it in a browser. Pages come back as markdown, ready for a model or a vector store.

Get an API key · No card required.

What runs where

The crate, on your machine Spider Cloud
Crawl, follow links, stream pages Yes Yes, same engine
Pages that need JavaScript Your own Chrome, with the chrome feature Browsers run on Spider's side
Proxies Bring your own In every request, exits in 199+ countries
Scale One machine, or your own spider_worker hosts Managed, nothing to run
Price Free, MIT licensed Pay as you go, with cost set by the site and its tier. Unlimited from $40 a month.

The open source and cloud comparison has the measured difference, and pricing has the rates.

Install

You want Run
Rust library cargo add spider
Command-line tool cargo install spider_cli
Node.js package npm i @spider-rs/spider-rs
Python package pip install spider_rs
MCP server cargo install spider_mcp

What it does

  • HTTP first, Chrome when a page needs it. With the smart feature, crawl_smart() fetches over plain HTTP and opens Chrome only for pages that build their content with JavaScript. See smart.rs.
  • Streaming. subscribe() delivers each page as it is fetched, on both the HTTP and the Chrome path. See subscribe.rs.
  • Limits you set. Page count, depth, a budget per path, delay, concurrency, retries, robots.txt, and allow and deny lists that take regex patterns with the regex feature.
  • Scheduled and cached crawls. Cron schedules, HTTP caching to disk or memory, sitemap discovery and WARC 1.1 output.
  • More than one machine. The decentralized feature moves fetching to spider_worker processes on other hosts.
  • Chrome control. Screenshots, request interception, ad blocking and remote Chrome over CHROME_URL.
  • Your own proxies. with_proxies takes a list of proxy URLs for local crawls, with SOCKS5 under the socks feature.
let mut website = Website::new("https://example.com")
    .with_limit(500)                        // stop after 500 pages
    .with_depth(10)                         // how far to follow links
    .with_concurrency_limit(Some(50))       // requests in flight
    .with_delay(250)                        // pause between requests, in ms
    .with_respect_robots_txt(true)
    .build()
    .unwrap();

Every option is in the Configuration docs, and every feature flag is in the features reference.

For AI agents

Spider Cloud hosts an MCP server at https://mcp.spider.cloud/mcp. It signs in with OAuth on the first tool call. To run an MCP server on your own machine, install the spider_mcp crate. Coding agents working in this repository start at AGENTS.md.

Learn more

Contributing

Pull requests are welcome. CONTRIBUTING.md covers setup and tests.

License

MIT

관련 프로젝트 살펴보기

불러오는 중…