惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

IT之家
IT之家
博客园_首页
S
SegmentFault 最新的问题
罗磊的独立博客
博客园 - 【当耐特】
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
阮一峰的网络日志
阮一峰的网络日志
D
Docker
雷峰网
雷峰网
Google DeepMind News
Google DeepMind News
博客园 - 司徒正美
V
V2EX
大猫的无限游戏
大猫的无限游戏
V
Visual Studio Blog
腾讯CDC
宝玉的分享
宝玉的分享
酷 壳 – CoolShell
酷 壳 – CoolShell
人人都是产品经理
人人都是产品经理
T
Tailwind CSS Blog
Vercel News
Vercel News
H
Help Net Security
博客园 - Franky
D
DataBreaches.Net
aimingoo的专栏
aimingoo的专栏

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
How to Get Google, Bing, and Yandex Search Results as JSON
elowen · 2026-05-09 · via DEV Community

elowen

Search result data is useful for many developer and SEO workflows:

  • rank tracking
  • keyword research
  • competitor monitoring
  • market research
  • SEO tools
  • internal data pipelines
  • automation workflows

You can build your own scraper for this, but maintaining it usually means dealing with proxies, retries, browser rendering, parser updates, rate limits, anti-bot systems, and monitoring.

For many projects, it is simpler to use a Search API and get structured results back directly.

In this post, I’ll show a basic example using TalorData, a Search API that supports Google, Bing, and Yandex.

It can return:

  • JSON
  • raw HTML
  • screenshots

There are 1,000 free requests, and no credit card is required.

Website
Playground

Example: Get Google SERP Data as JSON

Here is a basic curl request:

curl -X POST 'https://serpapi.talordata.net/serp/v1/request' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'engine=google' \
  -d 'q=search api' \
  -d 'json=2'

Enter fullscreen mode Exit fullscreen mode

The request includes:

  • engine=google: the search engine
  • q=search api: the search query
  • json=2: return structured JSON output

TalorData also supports Bing and Yandex, so you can change the engine parameter depending on the search source you need.

Example Response Shape

The API returns structured data that you can use in an app, dashboard, report, or data pipeline.

A simplified response shape might look like this:

{
  "search_metadata": {
    "engine": "google",
    "query": "search api"
  },
  "organic_results": [
    {
      "position": 1,
      "title": "Example Result",
      "link": "https://example.com",
      "snippet": "Example search result snippet."
    }
  ]
}

Enter fullscreen mode Exit fullscreen mode

Python Example

import requests

url = "https://serpapi.talordata.net/serp/v1/request"

headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/x-www-form-urlencoded"
}

data = {
    "engine": "google",
    "q": "search api",
    "json": "2"
}

response = requests.post(url, headers=headers, data=data)
response.raise_for_status()

result = response.json()

print(result)

Enter fullscreen mode Exit fullscreen mode

JavaScript Example

const response = await fetch("https://serpapi.talordata.net/serp/v1/request", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/x-www-form-urlencoded"
  },
  body: new URLSearchParams({
    engine: "google",
    q: "search api",
    json: "2"
  })
});

if (!response.ok) {
  throw new Error(`Request failed: ${response.status}`);
}

const result = await response.json();

console.log(result);

Enter fullscreen mode Exit fullscreen mode

When to Use a Search API Instead of Building a Scraper

A Search API is usually a better fit when:

  • you need structured SERP data quickly
  • you do not want to maintain proxies
  • you need location or country-specific search results
  • you need JSON output for an app or workflow
  • scraping infrastructure is not your core product

Building your own scraper can still make sense if you need complete control, very custom behavior, or already have scraping infrastructure in place.

Common Use Cases

Search result APIs are often used for:

  • SEO rank tracking
  • keyword research
  • competitor analysis
  • brand monitoring
  • market research
  • AI and data enrichment workflows
  • internal dashboards

Final Thoughts

Search result scraping looks simple at first, but production systems usually require much more than one HTTP request.

Using a Search API can reduce the amount of infrastructure you need to maintain and let you focus on the data and product experience.

If you try TalorData, I’d be interested in feedback on:

  • response fields
  • output formats
  • pricing
  • playground usability
  • missing parameters