Back to Search API in Google Sheets
SheetXAI logo
Search API logo
Search API · Google Sheets Guide

Retrieve Cached Search API Results for Stored Search IDs in a Google Sheet

2026-05-14
5 min read

The Scenario

Yesterday you ran 100 keyword searches through Search API and stored the search IDs in column A of a client's Google Sheet. The plan was to retrieve the cached results today and expand them into title, URL, and snippet columns — without burning a second round of credits.

Today the client moved up their deadline. You have two hours and 100 rows of search IDs.

The bad version:

  • Take the first search ID from column A, call Search API's cached result endpoint, extract the top 3 organic titles, URLs, and snippets from the JSON response, paste them into the right cells in row 2
  • Repeat 99 times, making sure the title-URL-snippet triplets land in the right three-column groups
  • Discover that 8 of the search IDs expired and their cached results are no longer available — go back and mark those rows after you've already pasted everything else

The client is billing by deliverable. A report that took twice as long to produce because the cache retrieval was manual is not something you can invoice for. The time cost comes out of your margin.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent inside your Google Sheet. It reads the stored search IDs, understands what you want to retrieve, and through its built-in Search API integration it fetches the cached results for each ID and expands the data into the structured columns you specify.

For each search ID in column A, retrieve the cached Search API results and write the top 3 organic result titles into columns B, E, and H, their URLs into columns C, F, and I, and their snippets into columns D, G, and J.

What You Get

  • 100 rows of expanded cached result data with three title-URL-snippet triplets per row in columns B through J
  • Any search ID whose cache has expired marked with "expired" in column B rather than left blank, so the gaps are immediately visible
  • Structured data ready for analysis or export without any manual JSON parsing

What If the Data Is Not Quite Ready

Some search IDs in column A have extra whitespace or line breaks from how they were pasted in

Clean any whitespace from the search IDs in column A, then for each cleaned ID retrieve the cached Search API results and write the top 3 organic result titles, URLs, and snippets into columns B through J.

You only want the top result per search ID to build a quick rank-check reference rather than the full three-result expansion

For each search ID in column A, retrieve the cached Search API results and write only the position-1 organic result title, URL, and snippet into columns B, C, and D.

Your sheet has a second column B with the original keyword that generated each search ID and you want that context included in the output

For each row, retrieve cached Search API results for the search ID in column A, use the keyword in column B as a reference label in column C, and write the top 3 organic result titles, URLs, and snippets into columns D through L — keeping the keyword label visible next to each expanded result block.

You want to retrieve all cached results, flag expired IDs, calculate how many of your target domain's pages appear across the top-3 results, and summarize the domain coverage rate — all at once

For each search ID in column A, retrieve the cached Search API results and write the top 3 organic titles, URLs, and snippets into columns B through J — mark column K with "expired" if the cache is unavailable — then count how many of the top-3 URLs across all rows contain the domain in cell A1 and write a total coverage rate as a percentage in cell L1.

Folding the domain coverage calculation into the retrieval step eliminates a manual formula pass after the fact.

Try It

Get the 7-day free trial of SheetXAI and open your search ID reference sheet, then ask it to retrieve and expand the cached Search API results for every row in column A. If you're starting a fresh keyword research cycle rather than retrieving stored results, the bulk fetch SERP results spoke is the starting point.

Stop memorizing formulas.
Tell your spreadsheet what to do.

Join 4,000+ professionals saving hours every week with SheetXAI.

Learn more