Logo van Google Browser Scraper

Google Browser Scraper

Organisatie
nodemaven

Self-hosted Google search scraper for Python. Scrape Google SERP results with a real Chrome browser and your own residential proxy. Self-hosted SERP API alternative with JSON output, an HTTP API and an MCP server for AI agents.

Uitgevernodemaven
Repositorygoogle-browser-scraper
TaalPython
Forks
7
Sterren
52
Beschikbare tools
0
Transporttypestdio, streamable-http
Categorieën
LicentieMIT
Links
  • Koppel tools aan AI-workflows

    Google Browser Scraper biedt MCP-functionaliteit die compatibele AI-clients en agenten kunnen gebruiken.

  • 0 beschikbare tools

    Bekijk hieronder de aanroepbare acties, inclusief namen en beschrijvingen als de server die beschikbaar stelt.

  • Configuratie om direct te kopiëren

    Gebruik de installatievoorbeelden om deze server in je favoriete MCP-client te configureren.

  • Indicatoren van opensource-interesse

    52 sterren en 7 forks in de gekoppelde repository.

pypi python tests license docker

Quickstart · Output · HTTP API · MCP · Docker · How it works · Options

Latest version benchmarks (v0.0.6):

  • 100% success rate
  • 0.8 MB per search request
  • 9 seconds per search request per instance

Scrape Google search results (SERP) with a real Chrome browser and your own residential proxy, and get clean JSON back. Use it as a CLI, a Python library, a local HTTP API, or an MCP server that gives AI agents live Google search.

Plain HTTP is no longer a reliable way to scrape Google: it often expects a browser that runs JavaScript, and a fresh browser on a fresh proxy exit can be refused quickly. This tool takes a browser path instead. It warms a sticky proxy session with ordinary browsing, opens Google's results page for each query in that browser, checks whether Google served results or refused, and writes one JSON record per results page. Captchas, blocks and failures are reported as such, never as "no results".

Features

  • Real browser scraping: real Chrome via Patchright, with a warm-up before every new identity
  • Bring your own proxy: any residential proxy with sticky sessions, built-in NodeMaven support
  • SERP API alternative: JSON with organic_results, ads, related_questions, related_searches, pagination
  • Honest failures: captchas and blocks come back labeled, not as empty results
  • Cost tracking: bytes per page and cost per 1000 pages in every run summary
  • Four ways to run it: CLI, Python library, HTTP API, MCP server for AI agents
  • Docker image for self-hosted deployment

Use cases

  • SEO rank tracking and SERP monitoring for your own keywords
  • Keyword and competitor research from live Google results
  • Web search for AI agents and LLM apps through MCP
  • A self-hosted alternative to paid Google search APIs when you already pay for proxies

Install

bash
pip install google-browser-scraper
patchright install chromium

Quickstart

You need a residential proxy with sticky sessions. Put {session} where your provider expects a session id in the username:

bash
google-browser-scraper search "best running shoes" \
  --proxy "http://USER-session-{session}:PASS@gate.example.com:7000" \
  -o results.jsonl

The first query takes a few minutes, because a new exit is warmed up first, and the warm-up costs noticeably more traffic than a search. Later queries on the same exit take seconds. A summary of pages served and traffic used, with the hosts that took most of it, is printed at the end of every run.

With NodeMaven residential proxies, the session id is handled for you and the credentials come from the environment:

bash
pip install "google-browser-scraper[nodemaven]"
export NODEMAVEN_LOGIN=... NODEMAVEN_PASSWORD=...
google-browser-scraper search -f queries.txt --nodemaven --country us -o results.jsonl

To cap a run's traffic, --nodemaven-demo creates a sub-user with a traffic limit from your dashboard API key, shares it across workers, and deletes it when the run ends (--keep-subuser keeps it). The account needs sub-users enabled. A fresh warm-up alone uses about 60 MB, so keep the cap well above that:

bash
export NODEMAVEN_API_KEY=...
google-browser-scraper search -f queries.txt --nodemaven-demo --traffic-limit-mb 300 -o results.jsonl

To try it without a proxy, use your own connection:

bash
google-browser-scraper search "best running shoes" --no-proxy

Google then sees one address for every query, so it starts answering with captchas sooner than it would across a pool of exits. Those pages come back as captcha in page_verdict, not as empty results.

From Python:

python
from google_browser_scraper import ProxyTemplate, Scraper, Settings

proxy = ProxyTemplate("http://USER-session-{session}:PASS@gate.example.com:7000")
for page in Scraper(proxy, Settings(pages=2)).run(["best running shoes"]):
    for result in page.get("organic_results", []):
        print(result["position"], result["title"], result["link"])

What you get

One JSON object per results page:

json
{
  "search_metadata": {"status": "Success", "page_verdict": "ok"},
  "search_parameters": {"engine": "google", "q": "best running shoes", "page": 1},
  "organic_results": [
    {"position": 1, "title": "...", "link": "https://...", "snippet": "..."}
  ],
  "related_questions": [{"question": "..."}],
  "exit": {"session": "...", "queries_on_exit": 1, "bytes": "..."}
}

The schema uses the field names common to SERP APIs: organic_results, ads, related_questions, related_searches, pagination and search_metadata, so simple consumers can often switch with minimal mapping. Knowledge panels, shopping, images and other special blocks are not parsed.

Each record also has an exit block: which proxy session answered and how many bytes the page cost. search_metadata.timings says where the page's time went, in seconds per step (type, load, ready, read, parse, and links, which overlaps the next query and is not part of total_time_taken). A query that failed is a record too, with an error. --format csv writes the organic results as a table, and --price-per-gb adds the cost per 1000 pages to the summary.

Run it as an API

bash
google-browser-scraper serve --nodemaven --country us --prewarm
curl "http://127.0.0.1:8000/search.json?q=best+running+shoes"

Same record format as above. Requests run one at a time on one held identity. --prewarm searches once at startup, moving to a new exit until Google serves one, so a request sent after it does not wait for a warm-up. /health answers 503 warming until then; a request sent earlier waits in line behind it. Set GBS_API_KEY to require a key; without one the server only listens on localhost.

Use it from an AI agent (MCP)

json
{
  "mcpServers": {
    "google-search": {
      "command": "google-browser-scraper",
      "args": ["mcp", "--nodemaven", "--country", "us", "--prewarm"],
      "env": {"NODEMAVEN_LOGIN": "...", "NODEMAVEN_PASSWORD": "..."}
    }
  }
}

It exposes one tool, google_search(query, pages).

Docker

A ready image is published to GitHub Container Registry with every release:

bash
docker run --rm ghcr.io/nodemaven/google-browser-scraper doctor
docker run --rm -p 8000:8000 -e GBS_API_KEY=change-me \
  -e GBS_PROXY='http://USER-session-{session}:PASS@gate.example.com:7000' \
  ghcr.io/nodemaven/google-browser-scraper serve --host 0.0.0.0

To build it yourself: docker build -t google-browser-scraper .

How it works

  1. New identity: a sticky proxy session and a fresh browser profile.
  2. Warm-up: a few ordinary pages, staying on each for 20-45 seconds.
  3. Search: each query opens Google's results page directly, which is faster than the search box and skips the autocomplete traffic of typing.
  4. Check before parsing: the page is classified first, so a captcha or a block is reported as one and never parsed as an empty result.
  5. Keep or drop: an exit Google answers is reused for the next queries; an exit it refuses is dropped and the query is retried on a new one. If exit after exit is refused, the run stops instead of spending more traffic.

Holding exits. A served exit is kept for up to 300 queries. Every new exit pays for a warm-up, so a short cap mostly buys more warm-up traffic. Every 50 results pages the browser is restarted on the same profile and exit, which keeps its memory from growing over a long hold. A browser error on a search is retried once on the same exit before the exit is dropped; a network error, running out of memory or a crashed browser drops it at once.

Copying cookies. The command line copies the cookies of the first exit Google serves and starts new exits from that copy, on new sticky sessions, instead of warming each one; all workers share the copy. Google's acceptance follows the cookies more than the address, so a copy usually starts out served and costs a few MB instead of a full warm-up. A copy waits 40-60 seconds after its browser starts before the first search.

Copying the cache. Pages get cheaper as an exit is held, because the browser cache fills with Google's shared scripts and images. Copies carry that cache too, so a new exit starts with cheap pages, and the copy is refreshed from the held exit at each browser restart, when its cache is warm. If two copies carrying the cache are refused on their first search, the rest of the run copies cookies only (--no-clone-cache does that from the start).

Result links. Google wraps result links in encrypted /goto redirects. Each one is resolved with a small request through a separate short-lived proxy session, a few at a time, in the background while the browser goes on to the next query. Records still come out in the order each browser searched them.

Traffic. Everything goes through a small local relay that counts bytes per host and blocks a large model download Chrome otherwise makes on every fresh profile.

The defaults come from measurements in proxy-benchmark.

Options

OptionDefaultWhat it does
--workers N1Search on N exits at once, one browser each, from one list of queries
--max-per-exit N300Queries before a served exit is retired
--restart-every N50Results pages before the browser restarts on the same profile and exit; 0 never
--clone N10New exits started from copied cookies; 0 turns copying off
--clone-max-age180Minutes copied cookies stay in use
--clone-refusals N1Copies refused in a row on their first query that end the copying
--no-clone-cacheCopies carry cookies only, not the browser cache
--spare N0Exits warmed in the background so a retired one is replaced at once; each costs a warm-up
--directallOpen results pages directly: all, follow-ups (all but an exit's first query), none
--inputtypeHow a query goes into the search box: type, insert, words
--gap LOW,HIGH2,5Seconds between queries on one exit
--pages N1Result pages per query
--formatjsonljsonl or csv
--price-per-gbYour proxy price, to print the cost per 1000 pages
--no-resolve-linksKeep result links as Google /goto redirects
--save-html DIRKeep every page's HTML, gzipped

google-browser-scraper search --help lists the rest.

Proxies

Any provider with sticky sessions works through --proxy and a {session} placeholder. A proxy without one is accepted with a warning: if the exit changes on every request, warming it does nothing. SOCKS5 needs an IP-whitelisted endpoint, because Chrome cannot send a SOCKS5 username and password.

Check your machine

bash
google-browser-scraper doctor

Starts the browser on a blank page, sends nothing, and reports what a website would see: whether the browser looks headless, whether WebGL works, the screen size. Google answers some machines much less than others, so run this first.

What this is not

Not a free Google Search API, and not a guarantee that every proxy exit will work. It is a browser-based collector that makes failures explicit, drops exits Google refuses, and tells you what each page cost.

Status

Early. The cloak engine (--engine cloak) is experimental; patchright is the default.

Google changes its pages often. If results come back empty or wrong, run with --save-html DIR and open an issue with what you see.

You are responsible for using this within Google's terms and the law where you run it.

Adding an engine

An engine joins this tool only after it has been measured on proxy-benchmark. Add it there and run the warm-up ladder against Google:

bash
python scripts/run_ladder.py --engines your-engine

Then open a pull request here with the run file. The ladder runs identities with and without the warm-up in the same hours, so the result shows whether the engine actually gets served, not whether it got lucky once.

License

MIT

Installatie

TypingMind
{
  "mcpServers": {
    "google-browser-scraper": {
      "command": "google-browser-scraper",
      "args": [
        "mcp",
        "--nodemaven",
        "--country",
        "us",
        "--prewarm"
      ],
      "env": {
        "NODEMAVEN_LOGIN": "<NODEMAVEN_LOGIN>",
        "NODEMAVEN_PASSWORD": "<NODEMAVEN_PASSWORD>"
      }
    }
  }
}

Gebruik Google Browser Scraper MCP met meerdere AI-modellen

TypingMind koppelt MCP-tools aan de werkruimte. Zodra Google Browser Scraper is verbonden, kun je deze dus met verschillende AI-modellen in TypingMind gebruiken, zonder de verbinding voor elk model apart in te stellen. Je kunt MCP lokaal op je apparaat uitvoeren of verbinding maken met de URL van een externe MCP-server.

Optie 1: Gebruik de lokale connector

Gebruik dit als de MCP-server toegang nodig heeft tot lokale bestanden, apps of privébronnen op je computer.

1

Open de MCP-instellingen

Ga in TypingMind naar Instellingen, Geavanceerde instellingen en vervolgens Model Context Protocol. Kies daar Connector instellen.

  1. Open TypingMind in je browser.
  2. Klik op het pictogram Instellingen.
  3. Ga naar Geavanceerde instellingen.
  4. Open het gedeelte Model Context Protocol.
  5. Klik op Connector instellen en kies Dit apparaat.
Instelscherm voor de TypingMind MCP-connector met Dit apparaat geselecteerd
2

Voer de connectoropdracht uit

Kies Dit apparaat, kopieer de opdracht uit TypingMind en voer deze uit in Terminal. Laat het proces draaien zolang je MCP gebruikt.

  1. Kopieer de installatieopdracht die TypingMind toont.
  2. Open Terminal op macOS of Windows Terminal op Windows.
  3. Plak de opdracht en voer deze uit.
  4. Keur de pakketinstallatie goed als Terminal vraagt of je wilt doorgaan.
  5. Laat het proces in het Terminal-venster draaien zolang je MCP-tools gebruikt.
3

Voeg Google Browser Scraper toe als server

Klik op Servers bewerken zodra de connectorstatus Gereed is en plak de MCP-serverconfiguratie.

  1. Wacht tot de connectorstatus Gereed aangeeft.
  2. Klik op Servers bewerken.
  3. Plak de MCP-serverconfiguratie van Google Browser Scraper.
  4. Sla de serverlijst op.
  5. Vernieuw om te controleren of de connector nog steeds klaar is voor gebruik.
MCP-instellingen van TypingMind met een actieve server en de knop Servers bewerken
{
  "mcpServers": {
    "google-browser-scraper": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Gebruik de verbinding met verschillende modellen

Sla de serverlijst op, open Plug-ins en schakel de MCP-tools van Google Browser Scraper in. Selecteer vervolgens een ondersteund AI-model in TypingMind en gebruik de tools in de chat of wijs ze toe aan een AI-agent.

  1. Open de pagina Plug-ins in TypingMind.
  2. Schakel de MCP-tools van Google Browser Scraper in.
  3. Start een chat en kies het AI-model dat je wilt gebruiken.
  4. Gebruik de MCP-tools in een chat of wijs ze toe aan een AI-agent.
  5. Schakel wanneer nodig over naar een ander AI-model zonder opnieuw verbinding te maken met MCP.
TypingMind-chat met ingeschakelde MCP-tools en een geselecteerd AI-model
Kun je Google Browser Scraper gebruiken om me hiermee te helpen?
Google Browser Scraper
Zeker. Ik heb het gelezen.
Dit vond ik met Google Browser Scraper.

Optie 2: Voeg een MCP-server-URL toe

Gebruik dit als Google Browser Scraper al extern wordt gehost of als je team één gedeelde connector wil die meerdere gebruikers kunnen gebruiken.

1

Open MCP-connectoren

Ga in TypingMind naar Plug-ins, open MCP-connectoren en kies URL toevoegen.

  1. Open TypingMind in je browser.
  2. Ga naar Plug-ins.
  3. Open MCP-connectoren.
  4. Klik op URL toevoegen.
TypingMind-formulier om een eigen MCP-server-URL toe te voegen
2

Plak de server-URL

Voer de MCP-server-URL van de aanbieder in het veld Server-URL in. Voeg een verbindingsnaam, beschrijving, icoon, aangepaste HTTP-headers of OAuth-clientinstellingen toe als de server die vereist.

  1. Plak de MCP-server-URL van de aanbieder in het veld Server-URL.
  2. Voer een verbindingsnaam in voor Google Browser Scraper.
  3. Voeg een beschrijving en een icoon toe om de verbinding makkelijker te herkennen.
  4. Voeg aangepaste HTTP-headers of OAuth-clientgegevens toe als de server authenticatie vereist.
3

Maak de verbinding

Klik op Verbinding maken, ga terug naar de lijst met plug-ins en controleer of de nieuwe MCP-verbinding actief is.

  1. Klik op Verbinding maken.
  2. Ga terug naar de lijst met MCP-connectoren.
  3. Controleer of de verbinding met Google Browser Scraper als actief wordt weergegeven.
  4. Vernieuw de lijst met plug-ins als de verbinding niet meteen verschijnt.
4

Wissel van model zonder opnieuw verbinding te maken

Start een chat met je favoriete model, schakel de tools van Google Browser Scraper in via Plug-ins en wissel van model wanneer dat nodig is. De MCP-verbinding blijft beschikbaar in de TypingMind-werkruimte.

  1. Start een nieuwe chat in TypingMind.
  2. Selecteer het AI-model dat je wilt gebruiken.
  3. Schakel de tools van Google Browser Scraper in via Plug-ins.
  4. Vraag het model om de tool te gebruiken wanneer dat nodig is.
  5. Schakel over naar een ander AI-model en gebruik dezelfde MCP-verbinding opnieuw.
TypingMind-chat met ingeschakelde MCP-tools en een geselecteerd AI-model
Kun je Google Browser Scraper gebruiken om me hiermee te helpen?
Google Browser Scraper
Zeker. Ik heb het gelezen.
Dit vond ik met Google Browser Scraper.

Veelgestelde vragen

Waarvoor wordt de MCP-server Google Browser Scraper gebruikt?

Google Browser Scraper is een MCP-server waarmee compatibele AI-clients verbinding kunnen maken met externe tools en context. In TypingMind hoef je deze MCP-server maar één keer toe te voegen om de tools beschikbaar te maken in je AI-werkruimte.

Kan ik Google Browser Scraper MCP met meerdere AI-modellen in TypingMind gebruiken?

Ja. TypingMind verbindt MCP-tools op werkruimteniveau. Daardoor kun je Google Browser Scraper gebruiken met verschillende AI-modellen, zoals Claude, ChatGPT, Gemini of andere modellen die je in TypingMind hebt ingesteld, zonder de MCP-server voor elk model afzonderlijk in te stellen.

Waarom Google Browser Scraper MCP gebruiken met TypingMind?

TypingMind is een van de beste interfaces voor chats met LLM's, omdat het meerdere AI-modellen, prompts, plug-ins, AI-agenten, API-sleutels en MCP-tools samenbrengt in één werkruimte. Als Google Browser Scraper verbonden is, kun je de MCP-tools ervan gebruiken met je favoriete modellen en je chatworkflow overzichtelijk houden in TypingMind.

Hoe verbind ik Google Browser Scraper MCP met TypingMind?

Je kunt Google Browser Scraper met TypingMind verbinden via de lokale MCP-connector of door de URL van een externe MCP-server toe te voegen. Gebruik de lokale connector als de server toegang nodig heeft tot bestanden, apps of privébronnen op je apparaat. Gebruik een server-URL als de MCP-server extern wordt gehost.

Welke tools biedt Google Browser Scraper MCP in TypingMind?

Google Browser Scraper biedt MCP-functies die je kunt inschakelen via de pagina Plug-ins in TypingMind. Je kunt ze gebruiken in chats of toewijzen aan AI-agenten.

Moet ik mijn API-sleutels delen met TypingMind om Google Browser Scraper MCP te gebruiken?

Nee. TypingMind werkt in de eerste plaats lokaal en laat je de controle houden over je modelaanbieders, API-sleutels, prompts en MCP-configuratie. Als Google Browser Scraper authenticatie vereist, voeg je bij het maken van de verbinding de vereiste headers, OAuth-instellingen of lokale configuratie voor die MCP-server toe.

Gerelateerde MCP-servers

Toon alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇