Most of what you read about parsing search results assumes the answer arrives as a list of links. Quite often it does not. Ask for a flight route and the page carries a fare table; ask about a company and a quote card comes back; ask about a fixture and there is a scoreboard. Those modules are still JSON, but they are not a list of links, and a parser written for links will either drop them or mangle them.
This is about reading the tabular modules: where they sit, what they carry, which of their fields disappear depending on how you asked, and why the numbers inside them are strings.
Position is not rank
The two ordering fields do different jobs, and conflating them is the first mistake with table modules.
rank numbers an item within its own block: the third organic link carries rank 3. position describes where that block sits on the page, counted from the top, and each item inside a module inherits the same number (checked 2026-11-27, /docs/google_web_search).
So a fare table sitting above the first organic link has a position of 1 while the organic results start at 2. Sort by position and you get the page's layout order; sort by rank and you get the order within each block. A pipeline that sorts everything by rank silently interleaves a scoreboard's rows with the organic results, and the answer reads as though a match report were the top search result.
The modules that arrive as tables
Six modules in the web search response behave this way, and each has its own column set.
-
flight_searchgives the route, the dates on the mobile layout, and the cheapest fare per airline with airline, duration, stops and price. -
financegives a quote with price and change, plus a key facts table covering open, day range, year range, market cap, price-to-earnings and previous close. -
sports_resultsgives the team or league, its standing, and games with status, date, start time in RFC 3339, stage, teams and a highlights link. -
weathergives location, temperature, condition, precipitation, humidity and wind. -
recipesgives title, link, source, rating, review count, total time and ingredients. -
shopping_resultsgives a product grid with price, original price, merchant, delivery, rating, review count and a badge.
All six are documented as present when the page shows that card, which means none of them is guaranteed (checked 2026-11-27, /docs/google_web_search).
Four traps that cost a day each
The numbers are strings. A quote card carries a price like "210.96 USD" and a change that arrives as a formatted string carrying its own sign and percentage, exactly as displayed. The documented local pack example carries rating "4.9" and reviews_count "455" as strings (checked 2026-11-27, /docs/google_web_search). Casting these with a float parser fails on the currency suffix and on the sign, so read them as display text first and convert deliberately, keeping the unit you were given.
Some columns exist on one layout only. The flight module's stops field is marked desktop, and a temperature arrives with its unit on desktop. Pull that query on the default phone layout and the column is not empty, it is missing. This is the second reason to pin one device per deployment rather than letting it default per call.
A product grid has no links. Cards open Google's own product viewer, so the shopping module returns no link field at all (checked 2026-11-27, /docs/google_web_search). A row builder that requires a URL will discard every row of that grid and report zero results for a page that was full of them.
Table modules do not page. Paging exists on the eight Google search families (web, image, news, video, shopping, jobs, books, finance), on Maps search which returns 20 places at a time, and on the two marketplace searches from Amazon and Walmart. Anything answering a single object - a detail lookup, an autocomplete, a YouTube query - returns one page and offers no page control at all (checked 2026-11-27, /pricing). Asking for page two of a card-heavy query buys a second copy of the same page rather than more rows.
Read the columns, not the field names
The useful discipline with tabular modules is to describe the columns you want once, and let one function fill them from whichever module arrived. That keeps the layout quirks in one place instead of spreading them through the pipeline.
from typing import Any
SPEC = {
"quote": ("finance", "", [("label", "title"), ("price", "price"), ("change", "change")]),
"fare": ("flight_search", "options", [("label", "airline"), ("cost", "price"), ("stops", "stops")]),
"game": ("sports_results", "games", [("label", "teams"), ("when", "start_time"), ("stage", "stage")]),
"temp": ("weather", "", [("label", "location"), ("value", "temperature")]),
}
def cell(item: Any, key: str) -> str:
value = item.get(key) if isinstance(item, dict) else None
if isinstance(value, list):
return " v ".join(str(t.get("name", "")) for t in value if isinstance(t, dict))
return "" if value in (None, "") else str(value)
def rows(kind: str, env: dict) -> list:
field, sub, cols = SPEC[kind]
block = env.get(field)
if not isinstance(block, dict):
return []
items = (block.get(sub) or []) if sub else [block]
out = [{n: cell(i, k) for n, k in cols} for i in items]
return [row for row in out if any(row.values())]
def table(env: dict) -> dict:
return {k: r for k in SPEC if (r := rows(k, env))}
Two properties matter more than the code itself. A column whose source field is absent renders as an empty string rather than raising, because absent is the normal case. And a module that produced nothing never gets an entry in the result, so the caller can distinguish "no fixture today" from "the page had no scoreboard".
What to keep when the answer was a table
A tabular answer is not a snippet, and storing it as one loses the thing that made it useful. Keep the module key, the row count, the column list you actually filled, and the search_url that produced it. The URL matters more here than for a link list, because a quote or a fare is a claim about a moment, and the page that carried it is the only way to check it later.
Keep the raw strings as you received them alongside any parsed value. When a currency or a sign convention is disputed six weeks later, the string is the evidence and your float is only an interpretation.
Billing counts calls, not rows, so a fare table listing thirty airlines costs the same as one listing none: a single request at that endpoint's price (checked 2026-11-27, /docs/billing-and-credits). A wide table is free; another request is not.
When the same query returns a list next week
Table modules appear and disappear on Google's side, not yours. The same query can carry a scoreboard during a match and a plain list of links the day after, and the response gives no warning either way: modules that are not on the page are simply absent (checked 2026-11-27, /docs/google_web_search).
That is why the dispatcher above is keyed on the module being present rather than on the query. A pipeline that asserts sports_results exists will break on the first quiet day, and the failure looks like a parsing bug when it is really a page that had nothing to score.
Two habits keep this cheap to survive. First, always render a fallback: if no table module came back, fall through to the organic list rather than returning an empty answer. Second, log which modules a response carried, not only how many rows it had. The module inventory turns "quality dropped last Tuesday" into "the fare table stopped appearing on these 40 queries", which is a question somebody can answer.
A last note on the featured_snippet module, which sits between the two worlds. It is an answer card, it arrives separately from the organic results, and its content is prose rather than columns. If you build the column reader, route it to the table modules and let the snippet be handled as text; treating the snippet as a one-row table produces an answer with no source, because the documented field table does not describe a link on the card, so take the URL from the organic result you cite.
The response fields, the layout-dependent columns and the paging rules above are documented at https://serpbase.dev/?utm_campaign=ops-222e35a2a81a&utm_medium=outreach&utm_source=opsbot
Top comments (0)