xxl-crawler is a free, open source data extraction & web scraping project written in Java and released under Apache-2.0. It has 756 GitHub stars, 316 forks and 7 open issues, and was last pushed 3 months ago. On this registry it ranks #131 of 149 tracked projects in Data Extraction & Web Scraping, with 5 head-to-head comparisons available.

What is xxl-crawler?

XXL-CRAWLER is a lightweight, open-source Java web crawler framework that lets a developer start a multi-threaded crawler with a single line of code and map collected page data into Java objects through annotations, built for Java teams that need to gather web data without adopting a heavyweight scraping platform.

What it is

XXL-CRAWLER is a crawler framework written in Java and published under the Apache License, Version 2.0, by xuxueli. Its stated design goal is a "lightweight web crawler framework" whose underlying implementation depends strongly on only one library, jsoup, and whose feature list covers multi-threaded execution, fully annotated extraction, JS rendering, proxy support, and distributed extension. The project lives in the Java ecosystem and is distributed as a library that a developer embeds in an application, rather than as a standalone crawling service or hosted product. It carries 758 stars, 318 forks, and 7 open issues, and its source repository is actively maintained, with the last push recorded on 2026-08-08.

The concrete problem it solves is the boilerplate that surrounds routine page collection in Java. Instead of hand-writing thread pools, retry loops, duplicate suppression, and per-field parsing logic, a developer annotates a plain Java class such as a PageVO, and the framework performs the extraction and object assembly automatically. It replaces the ad-hoc combination of an HTTP client, an HTML parser, and a custom scheduling layer that teams would otherwise assemble themselves, and it provides a documented path from a single-machine crawl to a distributed one when the volume of URLs grows beyond what one process can handle.

Key capabilities

  • Annotated page extraction: page data maps to PageVO objects via annotations, and a single page can yield one or more PageVO instances without hand-written parsing code.
  • Pluggable page loading through the PageLoader module, which ships with a native Jsoup implementation for speed and a Selenium + ChromeDriver implementation for JavaScript-rendered content, and accepts further custom implementations.
  • Distributed crawling by extending the RunUrlPool module and sharing run data through Redis or a database, while a LocalRunUrlPool single-machine pool is provided by default.
  • Proxy IP support to counter anti-collection WAF rules, with runtime adjustment of the proxy pool and custom proxy pool routing strategies.
  • Idempotent deduplication that prevents pages from being crawled twice, plus URL diffusion filtering through configurable page whitelist regular expressions.
  • Failure retry with configurable retry counts, request timeout control, and deliberate pauses after page processing to reduce the chance of being blocked.
  • Custom request information including request parameters, Cookie, Header, rotating UserAgent, and Referrer, all of which can be adjusted dynamically at runtime.

Who uses it and how

  • Teams extracting paginated article listings, as in the sample crawler that diffuses across pages of CNBlog digest articles and annotates the extracted fields into PageVO output.
  • Data collection jobs that need raw HTML rather than parsed fields, such as downloading source pages to local HTML files.
  • Media and image harvesting workflows, illustrated by a sample that downloads images from NetEase news articles to local storage.
  • Non-web interface collection, demonstrated by a sample that calls a JSON endpoint, such as Baidu news, and outputs the response data directly.
  • Price monitoring against JavaScript-rendered storefronts, where the sample uses Selenium + ChromeDriver to simulate browser behaviour because prices are rendered asynchronously.
  • Larger crawls run as a cluster, as in the Redis cluster sample where several XxlCrawler instances share one RunUrlPool, cooperate on URL diffusion, and consume pending tasks together.

Getting started

The README does not publish a Maven coordinate, Docker image, or compose file; it directs readers to the example test cases under src/test/java/com/xxl/crawler/test in the repository, and to the Chinese documentation and project home page at xuxueli.com/xxl-crawler for installation and usage detail.

How it compares

No list of paid products that this project replaces is provided in the available facts, and no competing crawler framework is named either. The only comparable tooling named is infrastructure the project itself uses or integrates: it is built on jsoup for fast non-JS parsing, and it offers Selenium with ChromeDriver as an alternative loader when rendering compatibility matters more than speed.

When to use it — and when not to

A self-hoster must operate the surrounding infrastructure the framework depends on, which means Redis or a database for distributed run data, a Selenium and ChromeDriver environment if JavaScript rendering is required, and a proxy pool if the target sites apply WAF rules. It is a poor fit for teams that need a managed service, a graphical crawling console, or Python-based tooling, since this is a Java library embedded in application code. The main limitation visible in the facts is documentation depth: the README is largely Chinese, the English surface is thin, and the repository explicitly presents its test code as examples for learning and testing rather than as production guidance, so a serious deployment depends on reading the source and the external documentation site.

project readme (upstream, from github) — read inline

XXL-CRAWLER

XXL-CRAWLER, a lightweight web crawler framework.
-- Home Page --

Introduction

XXL-CRAWLER is a lightweight web crawler framework. A line of code to develop a multi-threaded crawler, fully annotated way to collect page data to Java objects, with "multi-threaded, fully annotated, JS rendering, proxy, distributed extension" and other features;

XXL-CRAWLER 是一个轻量级Java爬虫框架。一行代码开发一个多线程爬虫,全注解方式采集页面数据至Java对象,拥有"多线程、全注解、JS渲染、代理、分布式扩展"等特性;

Documentation

Features

  • 1、简洁:API直观简洁,可快速上手;
  • 2、轻量级:底层实现仅强依赖jsoup,简洁高效;
  • 3、模块化:模块化的结构设计,可轻松扩展;
  • 4、全注解:支持通过注解提取页面数据,高效映射页面数据到PageVO对象,底层自动完成PageVO对象的数据抽取和封装返回;单个页面支持抽取一个或多个PageVO;
  • 5、多线程:线程池方式运行,提高采集效率;
  • 6、扩散全站:支持以现有URL为起点扩散爬取整站;
  • 7、JS渲染:通过扩展 "PageLoader" 模块,支持采集JS动态渲染数据。原生提供 Jsoup(非JS渲染,速度更快)、Selenium+ChromeDriver(JS渲染,兼容性高) 等多种实现,支持自由扩展其他实现;
  • 8、代理IP:对抗反采集策略规则WAF;
  • 9、动态代理:支持运行时动态调整代理池,以及自定义代理池路由策略;
  • 10、失败重试:请求失败后重试,并支持设置重试次数;
  • 11、异步:支持同步、异步两种方式运行;
  • 12、幂等去重:防止重复爬取;
  • 13、URL扩散过滤:支持设置页面白名单正则,过滤URL;
  • 14、分布式支持:通过扩展 "RunUrlPool" 模块,并结合Redis或DB共享运行数据可实现分布式。默认提供LocalRunUrlPool单机版爬虫;
  • 15、自定义请求信息,如:请求参数、Cookie、Header、UserAgent轮询、Referrer等;
  • 16、动态参数:支持运行时动态调整请求参数;
  • 17、超时控制:支持设置爬虫请求的超时时间;
  • 18、主动停顿:爬虫线程处理完页面之后进行主动停顿,避免过于频繁被拦截;

Example code

注意:仅供学习测试使用,如有侵犯请联系删除

如下测试代码可以前往仓库查看:测试代码目录

序号 爬虫名称 功能描述 测试用例代码文件
1 CNBlog精华文章数据爬虫【页面提取数据】 一行代码启动多线程爬虫,分页方式扩散爬取“CNBlog精华文章”,通过“注解式”自动提取页面数据,封装成PageVo输出; XxlCrawlerTest01
2 CNBlog精华文章页面下载爬虫【页面下载】 爬取“CNBlog精华文章”,获取相关页面html原始数据,下载本地生成html文件; XxlCrawlerTest02
3 网易图片下载爬虫【图片下载】 爬取“网易新闻文章图片”,下载图片文件至本地; XxlCrawlerTest03
4 百度新闻爬虫【接口提取数据】 爬取非Web页面,本案例为JSON接口,直接输出响应数据 XxlCrawlerTest04
5 电商商品价格爬虫【JS渲染方式;Selenium集成】 爬虫获取电商商品价格,由于价格异步渲染;该方案使用 Selenium + ChromeDriver 方式JS渲染,模拟浏览器行为采集数据; XxlCrawlerTest05
6 代理方式爬取数据【Proxy代理方式】 爬取目标页面数据,通过代理进行;可突破访问限制、保障数据安全; XxlCrawlerTest06
7 集群方式爬取数据【Redis集群方式】 爬取目标页面数据,通过集群方式进行;集群中多个XxlCrawler共享RunUrlPool,协同扩散URL并消费待采集任务,提升采集效率。 XxlCrawlerTest07

Communication

Contributing

Contributions are welcome! Open a pull request to fix a bug, or open an Issue to discuss a new feature or change.

欢迎参与项目贡献!比如提交PR修复一个bug,或者新建 Issue 讨论新特性或者变更。

接入登记

更多接入的公司,欢迎在 登记地址 登记,登记仅仅为了产品推广。

Copyright and License

This product is open source and free, and will continue to provide free community technical support. Individual or enterprise users are free to access and use.

  • Licensed under the Apache License, Version 2.0.
  • Copyright (c) 2015-present, xuxueli.

产品开源免费,并且将持续提供免费的社区技术支持。个人或企业内部可自由的接入和使用。

Donate

No matter how much the amount is enough to express your thought, thank you very much :) To donate

无论金额多少都足够表达您这份心意,非常感谢 :) 前往捐赠

Frequently asked questions

Is xxl-crawler free to use?

xxl-crawler is open source under the Apache-2.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does xxl-crawler do?

A lightweight web crawler framework.(Java爬虫框架)

What is xxl-crawler written in?

xxl-crawler is primarily written in Java. Its source is publicly available at https://github.com/xuxueli/xxl-crawler, and it has 756 GitHub stars.