Prompt

How can I scrape Google search results?

Latest observation

Jul 15, 2026 · OpenAI APIWeb search: off

Scraping Google Search results directly is usually a bad idea:

  • it violates Google’s Terms of Service,
  • it’s brittle and gets blocked quickly,
  • and at scale it can trigger rate limits, CAPTCHAs, or IP bans.

Safer options:

  1. Use the Google Custom Search JSON API

    • Official API for programmatic search access.
    • Good for compliant, stable integrations.
    • Requires setting up a Custom Search Engine and API key.
  2. Use a third-party search API

    • Services like SerpAPI, Zenserp, ScaleSERP, etc.
    • They handle proxies, parsing, and anti-bot measures for you.
    • Usually paid, but much less fragile.
  3. Use search engines with easier/official access

    • Depending on your use case, Bing Web Search API or other providers may be simpler.

If your goal is just to extract results for a legitimate internal use case, the cleanest approach is the Google Custom Search JSON API. Example in Python:

import requests

API_KEY = "your_api_key"
CX = "your_search_engine_id"
query = "site:example.com important topic"

url = "https://www.googleapis.com/customsearch/v1"
params = {
    "key": API_KEY,
    "cx": CX,
    "q": query
}

resp = requests.get(url, params=params)
data = resp.json()

for item in data.get("items", []):
    print(item["title"])
    print(item["link"])
    print(item.get("snippet", ""))
    print("---")

If you want, I can help you with one of these:

  • setting up Google Custom Search,
  • using SerpAPI,
  • or building a scraper for a site you own/have permission to crawl.

Observation history

Unlock observation history

Create a free Obsurfable account to unlock historical responses, model comparisons, and deeper brand intelligence.

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, and Meta AI.