当前为 alpha 版本,仅供评估和开发使用;实时搜索依赖 Chrome 和网络,且不会绕过验证码、限流或同意页,结果可能不完整;Docker 栈需先复制 .env.example 并替换 PostgreSQL、SearXNG、MCP 的占位密钥。
SerpScrap
ecoronMIT活跃维护抓取搜索引擎结果页并输出结构化 JSON 数据,保留来源引擎、排名、链接、标题和摘要,适合 SEO 分析、调研和自动化流程。
SerpScrap retrieves structured search results for SEO, research, and automation. It is available as a Python package, a CLI, a Docker application, and an MCP-compatible server. Results are JSON-compatible and preserve the source engine, rank, URL, title, snippets, result type, and typed failures.
python -m pip install SerpScrap==2.0.0a3README 未说明显存或 GPU 要求;实时搜索需要 Chrome 和网络访问,Docker 栈默认端口仅绑定本机回环地址。
抓取搜索引擎结构化结果的工具,支持 Python、CLI、Docker 和 MCP 四种用法
抓取搜索引擎结果页并输出结构化 JSON 数据,保留来源引擎、排名、链接、标题和摘要,适合 SEO 分析、调研和自动化流程。
核心能力
- 输出 JSON 兼容结果,保留引擎、排名、URL、标题和摘要
- 同时支持 Google、Bing 等多引擎并行抓取
- 提供 CLI,结果 JSON 走 stdout、日志走 stderr
- Docker Compose 栈含 API、PostgreSQL 历史、Web UI 和 MCP 网关
- MCP 网关暴露搜索、轮询状态、查历史等工具
容易踩的坑
- 2.0.0-alpha.3最新正式版2026-09-02 · 2026-09-02 04:52 UTC
SerpScrap 2.0.0-alpha.3
This alpha release adds extensive MCP, News, and Shopping capabilities while improving stability, deployment, and the development workflow.
Highlights
- Added MCP Topic tools for News and Shopping searches
- Added News result comparison, grouping, trend analysis, and tracking
- Added product price comparison, filtering, alternatives, and price tracking
- Added shared validation, normalization, and export functionality for Topic results
- Added the
Allsearch mode for Web, News, and Shopping - Improved History, Compare, and export functionality
Stability and Operations
- Fixed proxy health checks exceeding the UI timeout window
- Prevented false
503responses andBrokenPipeErrortraces during proxy checks - Fixed GitHub CI builds using
python -m build --no-isolation - Pinned the
setuptoolsbuild backend for reproducible builds
Updated Dependencies
- pip 26.2.1
- build 1.6.0
- mypy 2.3.1
- ruff 0.16.5
- Updated runtime dependencies, including Selenium, lxml, SQLAlchemy, and psycopg
This is an alpha release for evaluation and development. Live searches require Chrome and network access. Providers may block, rate-limit, request consent, or change their page layouts.
- 2.0.0-alpha.2pre-release2026-08-09 · 2026-08-09 17:43 UTC
查看更新说明
2.0.0-alpha.2
Highlights
- Introduced the Version 2 multi-container architecture with shared Docker images, API, Flask/Jinja UI, PostgreSQL history, and MCP gateway.
- Added bounded jobs, readiness checks, graceful shutdown, pagination, persistent progress, result deletion, and SQLite fallback support.
- Added strict MCP schemas, structured responses, pagination, content limits, mutation annotations, authentication safeguards, and configuration tools.
- Expanded the search-engine plugin system with typed capabilities, metadata, validation, fixtures, and new GOOD, xPrivo, Marginalia, and eTools providers.
- Added SearXNG and Valkey integration with grouped engine selection, source-aware result metadata, partial-result handling, and local rate limits.
- Added validated proxy sources, protocol/country filters, health checks, persistence, rotation, caching, engine-aware selection, and UI controls.
- Improved browser automation with consent-state handling, provider blocking classification, retries, Chrome detection, screenshots, and diagnostics.
- Added the complete History & Analysis workspace with filters, trends, coverage, comparison, canonical URL grouping, exports, progress, and historical result inspection.
- Added schema-driven configuration with persistence, validation, redaction, reset support, grouped controls, and sensitive-value protection.
- Refined the frontend with responsive layouts, result cards, master-detail views, collapsible filters, status badges, compact URL rendering, and overflow-safe tables.
- Updated Flask to 3.1.3 and pinned Pip 26.1.2 across development, CI, and Docker builds.
- Hardened Docker defaults with required secrets, loopback bindings, safer CORS, bounded request bodies, non-root containers, and health checks.
- Consolidated user, developer, Docker, MCP, configuration, results, and provider documentation while removing obsolete internal planning material.
Validation
- 193 deterministic tests passing.
- Ruff, JavaScript syntax checks, package builds, and Sphinx documentation builds passing.
This is an evaluation release. Provider layouts, consent flows, rate limits, CAPTCHAs, and access controls may change, and live searches require Chrome and network access.
- 0.13.02019-08-26 · 2019-08-26 10:50 UTC
查看更新说明
- updated dependencies: chromedriver >= 76.0.3809.68 to use actual driver, sqlalchemy>=1.3.7 to solve security issues and other minor update changes
- minor changes install_chrome.sh
- 0.12.02018-10-10 · 2018-10-10 18:11 UTC
查看更新说明
- update and cleanup of selectors to fetch results
- new resulttype videos
- 011.20.11.22018-10-03 · 2018-10-03 13:19 UTC
查看更新说明
- fixed related keywords selector serps
- added results_age, to specify the age of serp results
- updated selenium/chromium versions
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
========= SerpScrap
.. image:: https://img.shields.io/badge/version-2.0.0--alpha.3-orange.svg :target: https://github.com/ecoron/SerpScrap/releases :alt: Version 2.0.0-alpha.3
.. image:: https://readthedocs.org/projects/serpscrap/badge/?version=latest :target: https://serpscrap.readthedocs.io/en/latest/ :alt: Documentation status
.. image:: https://img.shields.io/docker/pulls/ecoron/serpscrap.svg :target: https://hub.docker.com/r/ecoron/serpscrap :alt: Docker pulls
SerpScrap retrieves structured search results for SEO, research, and automation. It is available as a Python package, a CLI, a Docker application, and an MCP-compatible server. Results are JSON-compatible and preserve the fusion rank, provider rank, source engine, URL, title, snippets, result type, and typed failures.
Version 2.0.0-alpha.3
This is an alpha release for evaluation and development. Provider pages are dynamic, live searches require Chrome and network access, and results can be partial when a provider blocks, rate-limits, requests consent, or changes its layout. SerpScrap does not bypass those controls.
Install the package
.. code-block:: bash
python -m pip install SerpScrap==2.0.0a3
For a source checkout:
.. code-block:: bash
git clone https://github.com/ecoron/SerpScrap.git cd SerpScrap pipenv install --dev pipenv run python -m pip install -e .
Python example
.. code-block:: python
from serpscrap import Config, SerpScrap
config = Config() config.apply({ "search_engines": ["google", "bing"], "country_code": "DE", "num_workers": 2, })
scraper = SerpScrap() results = scraper.search("privacy friendly search", config=config, pages=1) scraper.save_json("results.json", overwrite=True)
CLI example
.. code-block:: bash
serpscrap search -k "renewable energy" --search-type news
--engine google --engine bing --country DE --workers 2
--output results.json --overwrite
The CLI keeps result JSON on stdout and progress/logging on stderr. Run
serpscrap search --help for the complete option reference.
Docker application
The Compose stack provides the API, PostgreSQL history, web UI, and MCP gateway:
.. code-block:: bash
mkdir -p data/postgres data/cache data/diagnostics data/exports logs cp .env.example .env
Replace the PostgreSQL, SearXNG, and MCP placeholder secrets in .env.
docker compose -f docker/compose.yml up --build
Open http://localhost:8080 for the UI, use the API at
http://localhost:8000/api/v1, and connect MCP clients to
http://localhost:8001. The standard stack also starts SearXNG at
http://localhost:8888 and connects SerpScrap to it internally. SearXNG is
enabled by default and can be disabled from the configuration page. See the
:doc:docs/docker guide for required secrets, health checks, mounts,
operations, and security boundaries. Published ports are loopback-only by
default.
MCP server
The MCP gateway exposes tools for starting searches, polling status, listing
results, inspecting history, discovering engines, and managing validated
configuration. See the :doc:docs/mcp guide for JSON-RPC examples and client
connection details.
Documentation map
User guide <https://serpscrap.readthedocs.io/en/latest/examples.html>_ — Python and CLI examples.CLI reference <https://serpscrap.readthedocs.io/en/latest/cli.html>_ — commands and important parameters.Docker guide <https://serpscrap.readthedocs.io/en/latest/docker.html>_ — application deployment and operations.MCP guide <https://serpscrap.readthedocs.io/en/latest/mcp.html>_ — gateway tools and JSON-RPC.Developer guide <https://serpscrap.readthedocs.io/en/latest/development.html>_ — repository, tests, providers, and documentation.
Project checks
.. code-block:: bash
pipenv run python -m ruff check serpscrap scrapcore tests pipenv run python -m pytest -m "not browser" pipenv run python -m sphinx -W --keep-going -b html docs docs/_build/html
License and source
Source code is available at https://github.com/ecoron/SerpScrap. The project
is licensed under the terms in LICENSE.