{
  "id": 22077130,
  "title": "What a search API returns when the answer is a table, not a list",
  "url": "https://urgent.news/2026/11/27/what-a-search-api-returns-when-the-answer-is-a-table-not-a-list",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-27T00:10:13.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/jehadbartolo/what-a-search-api-returns-when-the-answer-is-a-table-not-a-list-2gh6"
  },
  "original_language": "en",
  "account": "When a search engine's answer is presented in the form of a table rather than a simple list of links, many parsing methods may struggle to handle the data correctly. Traditional parsers designed for lists of links can fail to extract or mishandle the information contained within these table modules. This issue arises because the table modules are still delivered in JSON format, but they do not present themselves as simple lists. Instead, they contain rows and columns of data that may change depending on the specific query made.\n\nThe arrangement of data within these tables is different from a ranked list of results. In tables, the position of an item on the page is distinct from its rank within the table itself. For example, a fare table that appears above the first organic link would have a position of 1, while the organic results start from position 2. This distinction between position and rank is crucial to understand, as conflating the two can lead to significant errors in parsing and interpreting the data.\n\nThere are six specific modules in Google's web search response that return data in table format: flight_search, finance, sports_results, weather, recipes, and shopping_results. Each of these modules has its own set of columns that vary depending on the request made. For instance, a flight_search module might return the route, dates, cheapest fare per airline, and details such as duration, stops, and price. Similarly, a finance module might provide a quote along with price and change, as well as a key facts table that includes open, day range, year range, market cap, price-to-earnings, and previous close. Sports results tables might include team or league standing, games status, date, start time in RFC 3339 format, stage, teams, and a highlights link. Weather tables provide location, temperature, condition, precipitation, humidity, and wind details. Recipe tables contain title, link, source, rating, review count, total time, and ingredients. Lastly, a shopping_results table delivers a product grid detailing price, original price, merchant, delivery, rating, review count, and a badge.\n\nIt's important to note that these modules are not guaranteed to appear in every search result, as each module is only present when the corresponding information is displayed on the page. This variability means that developers cannot rely on the presence of these modules in every instance of a search query. Four common pitfalls can arise when dealing with table modules, each costing developers valuable time to troubleshoot and resolve.\n\nFirstly, the numbers within these table modules are always strings. For example, a quote card might display a price as \"210.96 USD\", and the change might be presented as a formatted string with its own sign and percentage. Parsing these values using a float parser can fail due to the presence of currency suffixes or signs, so it's essential to read them as display text first and then convert them deliberately, retaining the unit provided. Secondly, not all columns are present on every layout. For example, the stops field in the flight module is marked as desktop-only, and a temperature value may only include its unit on the desktop layout. This inconsistency can lead to missing columns if the default layout is not explicitly specified. Thirdly, the shopping_results module returns a product grid without any link field, which can be problematic for developers who rely on links to direct users to product pages. Fourthly, table modules do not support paging. While other search families such as web, image, news, video, jobs, books, and finance support paging, table modules return one page only. Asking for additional pages will simply return the same page again, rather than providing more rows of data. This behavior can lead to confusion if developers are not aware of the limitations of table modules.\n\nWhen working with table modules, it's advisable to focus on the columns of data rather than the specific field names provided. By defining the columns you wish to extract once, you can use a consistent function to pull those columns from whichever table module is returned. This approach ensures that the layout quirks of each module are handled in one place, rather than being scattered throughout the parsing pipeline, making the code more manageable and less prone to errors.",
  "summary": "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…",
  "key_points": [
    "Table modules return data in JSON format, not simple lists",
    "Position and rank are distinct in table data structure"
  ],
  "editors_take": "The shift toward structured table modules forces developers to move beyond simple link parsing toward complex data extraction strategies that account for inconsistent columns and non-numeric string formats.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}