Loading Light/Dark Toggle
Back to Blog

Google Search API JSON Response: organic_results Explained

Alex Johnson
Alex Johnson

Senior Web Scraping Engineer

12-Nov-2026

TL;DR:

  • organic_results is a collection of organic search records. Read each record's returned position, title, snippet, and link without mixing in other search modules.
  • Returned position and array order are separate values. Preserve both when preparing a dataset.
  • A returned link is not automatically a verified final URL. Keep intermediary and destination-candidate states distinct.
  • Missing fields should stay visible. An absent snippet, empty string, and malformed record require different handling.

Introduction: Read the Response Before Flattening It

A Google Search API JSON response can contain organic results alongside knowledge panels, local sections, related questions, and other query-dependent modules. Flattening every object that contains a title field produces a dataset with mixed meanings.

This tutorial focuses on organic_results in Scrapeless Google Search API. The goal is a small, inspectable record format for titles, snippets, positions, and links. It does not build a rank tracker or claim that every returned link has already been checked against a final target URL.

The Google Search response example and actor request workflow provide the surrounding request context. Here, the useful work begins after a completed response has been saved.

What organic_results Contains

The organic_results field is an array of organic result objects, with fields whose availability must be checked on each item. A record is not a complete copy of the destination page.

Field Meaning in the Dataset Handling Rule
position Position returned by the API Preserve it without recomputing it
title Result title Keep null or missing values distinguishable from text
snippet Search-result excerpt Treat it as a search observation, not full page content
link Returned result URL Classify it before downstream destination matching
redirect_link Additional redirect-form link when present Store separately; do not replace link automatically
source Displayed source label when available Do not assume it is a registrable domain

The table describes fields to inspect, not a guarantee that every item contains every key. The parameter reference defines request controls; it should not be read as a promise of identical result modules across queries.

JSON permits values such as null, strings, and arrays, as described by the JSON specification. A flexible response format still needs a deliberate consumer contract. Decide which missing values your application can retain and which should stop processing.

Preserve Position Without Inventing a Rank

Keep the returned position, the array index, and the request offset as separate fields when combining pages. Each value describes a different part of the observation.

Array index records where an item appeared in the returned array. Returned position is the value supplied by the API. Request offset records which page you requested. Adding an offset to a position without first establishing that position's semantics can double-count an offset or imply a ranking that the response did not state.

Do not count ads, a knowledge graph, and organic records in a single sequence unless you have defined and validated that custom measurement. A developer who needs organic rankings should retain enough context to inspect the search page that produced the record.

Store the untouched JSON even if your database only needs a few columns. You may later need a field that the first normalization script discarded, or you may need to distinguish an absent field from a value introduced by your own transformation.

A URL classification is a routing decision for further validation; it is not proof of a final destination. The baseline response for coffee included direct link values and separate Google redirect_link values in the same organic records.

Inspect the scheme, hostname, and path rather than testing whether a string merely contains the word Google. The URI component model makes those parts explicit. A URL with a familiar brand name inside its path is not necessarily hosted by that brand.

Useful classifications include a missing value, a relative link, an observed Google intermediary, and an absolute URL candidate. Preserve opaque values in /goto?url=... links. An opaque parameter is not a destination that you can recover by guessing a decoding scheme.

Start Scraping with Scrapeless

Power up your web scraping and automation workflow with Scrapeless!
Sign up today and get $5 in free credit — no credit card required.

Claim your free credit now in the Scrapeless Dashboard.

Normalize a Saved JSON Response

The following program creates normalized records without visiting any result URL. It preserves both link fields and attaches a local classification for later review.

Prerequisites are Python and a completed Google Search response saved as serp.json. Save the API's response object itself, not a custom wrapper containing your logging metadata. The quickstart request supplies that response. Save the script as normalize_organic.py and run python normalize_organic.py beside the JSON file.

The hostname set in the example covers the Google hosts observed in this response family. It is intentionally not a global registry of every Google domain. Extend it only when your actual responses justify the addition. Other absolute URLs remain unverified candidates.

python Copy
import json
from pathlib import Path
from urllib.parse import urlsplit


def classify_link(value):
    if not isinstance(value, str) or not value.strip():
        return "missing"
    if value.startswith("/"):
        return "relative_review"
    try:
        parts = urlsplit(value)
        host = (parts.hostname or "").lower()
    except ValueError:
        return "invalid_review"
    if parts.scheme not in ("https", "http") or not host:
        return "invalid_review"
    # These are observed Google hosts, not a global Google-domain registry.
    google_hosts = {"google.com", "www.google.com"}
    if host in google_hosts and parts.path in ("/url", "/goto"):
        return "google_intermediary"
    if host in google_hosts:
        return "google_page_review"
    return "absolute_candidate"


data = json.loads(Path("serp.json").read_text(encoding="utf-8"))
if not isinstance(data, dict) or not isinstance(data.get("organic_results"), list):
    raise ValueError("Expected an object with an organic_results array")
normalized = []
for index, row in enumerate(data["organic_results"], start=1):
    if not isinstance(row, dict):
        raise ValueError(f"Invalid result at index {index}")
    normalized.append({
        "array_index": index,
        "returned_position": row.get("position"),
        "title": row.get("title"),
        "snippet": row.get("snippet"),
        "link": row.get("link"),
        "redirect_link": row.get("redirect_link"),
        "link_state": classify_link(row.get("link")),
    })
Path("organic-normalized.json").write_text(
    json.dumps(normalized, ensure_ascii=False, indent=2), encoding="utf-8"
)
counts = {}
for row in normalized:
    state = row["link_state"]
    counts[state] = counts.get(state, 0) + 1
print(json.dumps({"rows": len(normalized), "link_states": counts}))

Python's URL parsing functions separate components, but parsing alone does not validate trust or network reachability. The script's absolute_candidate state therefore means exactly that: an absolute HTTP URL with a hostname was present.

Decide When a Final URL Is Necessary

Final-URL verification becomes necessary when your conclusion depends on the identity of the destination page. Keyword discovery can retain a candidate link for later inspection; target-domain ranking, attribution, and citation delivery require stronger evidence.

Downstream Task What the Returned Link Can Support Additional Work
Topic discovery A source candidate next to a snippet Review the page before relying on its claims
Search-response audit The link text the API returned Preserve the original response and HTML when needed
Domain matching A preliminary candidate classification Resolve and validate the destination domain
Verified citation A candidate reference Check final URL, accessible content, and claim support

If you build a destination resolver, keep the original URL and final URL as separate columns. Record the redirect chain and resolution outcome. Do not send the Scrapeless API key to result websites, and do not treat a network failure as evidence that the page does not exist.

Avoid stripping query parameters indiscriminately. Some parameters are part of a page's identity. Even removing a trailing slash can merge URLs that an origin treats differently. Start with conservative comparison rules, then document any normalization policy your dataset uses.

Diagnose Missing or Unexpected Fields

A field-quality report should show what arrived rather than silently manufacturing replacement values. Count nonempty strings separately from keys that merely exist.

For snippet, distinguish an omitted key, a null value, an empty string, and nonempty text. Those states affect whether a row can support text analysis. Keep a row with a missing snippet if its title still serves your task, but flag the missing material so an analyst understands the limitation.

At the collection level, an absent organic array is not equivalent to an empty organic array. Wrong-type items should stop a strict consumer or be recorded in a rejection report. Neither choice should quietly increase a success metric.

Conclusion: Keep the Meaning of Each Field

A dependable Google Search API JSON response parser preserves the source fields and adds only transformations it can explain. Position, array order, and URL state remain visible, while unsupported destination assumptions stay out of the record.

Start with Scrapeless Google Search API, choose collection frequency against current pricing, and validate a few saved responses before committing to a database schema.

Join developers working with search data in our community: Discord · Telegram.

Create a Scrapeless account and apply this tutorial to a small query set before scheduling a larger collection.

FAQ

Q: Does organic_results include every visible section on the SERP?

No. Other search features may appear in separate response sections. An organic-array parser should not silently absorb those modules.

Q: Is position the same as the item's array index?

Do not assume they are interchangeable. Keep the returned position and array index separately, particularly across paginated requests.

Q: Should redirect_link replace link?

No. Preserve both when present. Choose a destination-processing policy based on the actual URL state and your downstream task.

Q: Can an encoded Google link be treated as a decoded destination?

No. Preserve opaque values and use a validated resolution process when final destination identity is required.

Q: Does a nonempty snippet prove the summary is accurate?

No. Nonempty text measures field availability. Accuracy and claim support require inspection of the source content.

Q: Does normalization need an AI agent or a separate proxy?

No. This normalization script operates on saved JSON and makes no network requests.

At Scrapeless, we only access publicly available data while strictly complying with applicable laws, regulations, and website privacy policies. The content in this blog is for demonstration purposes only and does not involve any illegal or infringing activities. We make no guarantees and disclaim all liability for the use of information from this blog or third-party links. Before engaging in any scraping activities, consult your legal advisor and review the target website's terms of service or obtain the necessary permissions.

Most Popular Articles

Catalogue