How to Get Google Search Results in JSON?

Learn how to get Google Search results in JSON using a SERP API. See what fields to collect, request parameters to use, example JSON output, and how to use search data for SEO, AI agents, and RAG workflows.

How to Get Google Search Results in JSON?
Marcus Bennett
Last updated on
6 min read

Google Search results are useful, but raw search pages are not easy to use in software.

If you are building an SEO dashboard, an AI agent, a RAG pipeline, a competitor monitoring system, or a market research tool, you usually do not want screenshots or raw HTML. You want structured data: titles, URLs, snippets, ranking positions, domains, result types, locations, and timestamps.

That is why many teams use a SERP API to get Google Search results in JSON.

A SERP API turns a search query into a structured response your application can store, filter, analyze, or send to an AI model.

Why JSON Search Results Matter

JSON is easier for applications to process than HTML.

A Google results page can contain organic results, ads, local results, images, videos, news, shopping results, People Also Ask, knowledge panels, and other SERP features. The layout may change by query, country, language, device, and time.

If you scrape the page manually, your parser must keep up with layout changes. If you use a SERP API, the response can already be normalized into fields your system understands.

For example, instead of parsing this from a page:

Title, URL, snippet, position, domain, local pack, ads, related results

you can receive data like:

{
  "position": 1,
  "title": "Best Project Management Software",
  "url": "https://example.com/project-management",
  "domain": "example.com",
  "snippet": "Compare project management tools for teams and workflows.",
  "result_type": "organic"
}

This is much easier to store in a database, display in a dashboard, or pass into an AI workflow.

The Basic Workflow

Getting Google Search results in JSON usually follows this process:

Choose a search query
→ Set location, language, and device
→ Send the request to a SERP API
→ Receive structured JSON
→ Store, filter, or analyze the results

A request may include parameters such as:

Parameter

Purpose

query

The search keyword or phrase

engine

Search engine, such as Google

location

Country, city, or market

language

Result language

device

Desktop or mobile

page / start

Pagination control

output

JSON or HTML format

The exact parameter names vary by provider, but the idea is the same: define the search context before collecting results.

Talordata SERP API, for example, is positioned for real-time SERP data across Google and other major search engines, with pay-per-successful-request billing, JSON / HTML response formats, and geo-targeted SERP data. It also lists SEO monitoring, competitor tracking, AI search integration, local SEO, news monitoring, and e-commerce intelligence as common use cases.

Example API Request

A simplified request may look like this:

{
  "engine": "google",
  "query": "best CRM software for small business",
  "location": "United States",
  "language": "en",
  "device": "desktop",
  "output": "json"
}

A cURL-style request may look like this:

curl "https://api.example.com/serp?engine=google&q=best%20CRM%20software%20for%20small%20business&location=United%20States&language=en&device=desktop&output=json" \
  -H "Authorization: Bearer YOUR_API_KEY"

In a real project, you should keep the API key on the server side. Do not expose it in frontend JavaScript.

Example JSON Response

A structured Google Search JSON response may include search metadata, request parameters, organic results, related questions, ads, local results, and pagination data.

Example:

{
  "search_parameters": {
    "engine": "google",
    "query": "best CRM software for small business",
    "location": "United States",
    "language": "en",
    "device": "desktop"
  },
  "organic_results": [
    {
      "position": 1,
      "title": "Best CRM Software for Small Businesses",
      "url": "https://example.com/best-crm",
      "domain": "example.com",
      "snippet": "Compare CRM tools by pricing, automation, integrations, and team size.",
      "result_type": "organic"
    },
    {
      "position": 2,
      "title": "Top CRM Platforms Compared",
      "url": "https://example.org/crm-comparison",
      "domain": "example.org",
      "snippet": "A side-by-side comparison of CRM platforms for sales and marketing teams.",
      "result_type": "organic"
    }
  ],
  "related_questions": [
    {
      "question": "What is the best CRM for a small business?"
    }
  ]
}

For most applications, the most important fields are:

  • Query

  • Location

  • Language

  • Device

  • Position

  • Title

  • URL

  • Domain

  • Snippet

  • Result type

  • Timestamp

These fields make the result traceable. Without search context, a ranking result is difficult to interpret.

How to Use the JSON Data

SEO Rank Tracking

For SEO, JSON search results help track keyword positions over time.

You can store each result with query, location, device, position, URL, domain, and timestamp. This lets you answer questions such as:

  • Which pages rank for a keyword?

  • Did our domain move up or down?

  • Which competitors appear more often?

  • Do rankings change by country or device?

  • Which SERP features appear for this keyword?

AI Agents

AI agents need fresh web context.

A model may know general information, but it may not know today’s prices, new product pages, breaking news, or current competitor rankings. JSON search results help agents discover sources before deciding which pages to fetch.

A good agent workflow is:

Search query
→ Receive JSON results
→ Filter by relevance and domain quality
→ Fetch only selected URLs
→ Use the content for grounded answers

This avoids fetching every page blindly.

RAG Pipelines

For RAG, Google Search results in JSON can act as a source discovery layer.

You can search for fresh sources, deduplicate URLs, crawl selected pages, chunk the content, generate embeddings, and store the results in a vector database.

The JSON response should preserve source URLs, domains, snippets, and timestamps so the system can later explain where information came from.

Common Mistakes

The first mistake is collecting results without location. Google results can change by country, city, language, and device.

The second mistake is storing only URLs. You should also store position, title, snippet, query, location, and timestamp.

The third mistake is fetching every result page. For many AI workflows, the top 3–5 high-quality sources are enough.

The fourth mistake is treating snippets as full evidence. Snippets are useful for filtering, but important answers should be grounded in the full source page.

The fifth mistake is ignoring cost. A workflow that runs many query variations across many locations can become expensive quickly.

What to Compare Before Choosing a SERP API

Before choosing a provider, test with real queries.

Compare:

Factor

What to Check

JSON structure

Are fields easy to parse?

Field completeness

Are titles, URLs, snippets, and positions stable?

Location control

Can you target the markets you need?

Result types

Organic, ads, news, local, shopping, images

Freshness

Real-time or cached results

Cost model

Per request, per response, or successful request

Integration

Docs, examples, error handling

Workflow fit

SEO, AI agents, RAG, monitoring, research

For Talordata, you can start with 1,000 free responses >>, or review the SERP API query parameters before building a production workflow.

Final Thoughts

Getting Google Search results in JSON is not just a scraping task. It is a data workflow.

The goal is not only to get results. The goal is to get structured, reliable, location-aware search data that your system can use.

For SEO teams, that means rankings, competitors, SERP features, and historical trends.

For AI agents, it means fresh sources, clean URLs, snippets, and citation-ready context.

For RAG pipelines, it means discovering current sources and preserving metadata for retrieval.

A good SERP API should reduce parsing work, support location and language control, return stable JSON fields, and help your team focus on analysis instead of maintaining fragile scrapers.

Scale Your Data
Operations Today.

Join the world's most robust proxy network.

Start Free Trial