Short answer: loop over your keywords, call /google/search for each, and write the organic list to a CSV file with Python's csv module. About 30 lines, no scraping library, and the file opens in Excel or Google Sheets.
One request
curl -X POST 'https://api.serpbase.dev/google/search' \
-H 'Content-Type: application/json' \
-H 'X-API-Key: YOUR_API_KEY' \
-d '{"q":"standing desk","gl":"us","hl":"en"}'
Each entry in organic has rank, title, link and usually snippet. Those four become the columns.
Python: keywords in, CSV out
import csv, time, requests
API = "https://api.serpbase.dev"
HEADERS = {"X-API-Key": "YOUR_API_KEY"}
KEYWORDS = ["standing desk", "ergonomic chair", "monitor arm"]
def post(path, body):
return requests.post(API + path, headers=HEADERS, json=body, timeout=60).json()
def real_links(organic):
"""Swap Google wrapper links for the real page addresses (free call)."""
wrapped = [o["link"] for o in organic if "google.com/goto" in o["link"]]
if not wrapped:
return {}
time.sleep(1)
fixed = post("/google/resolve", {"links": wrapped})
return {x["link"]: x["url"] for x in fixed.get("resolved_links", [])
if x.get("reason") == "resolved"}
with open("serp.csv", "w", newline="", encoding="utf-8") as f:
w = csv.writer(f)
w.writerow(["keyword", "rank", "title", "link", "snippet"])
for kw in KEYWORDS:
r = post("/google/search", {"q": kw, "gl": "us", "hl": "en"})
if r["status"] != 0:
print(kw, "failed:", r.get("error"))
continue
organic = r.get("organic", [])
real = real_links(organic)
for o in organic:
w.writerow([kw, o["rank"], o["title"],
real.get(o["link"], o["link"]), o.get("snippet", "")])
print(kw, len(organic), "rows")
time.sleep(1)
What we got
We ran this script on 28 November 2026.
| Keyword | Organic rows | Wrapper links | Resolved |
|---|---|---|---|
| standing desk | 8 | 5 | 4 |
| ergonomic chair | 9 | 6 | 4 |
| monitor arm | 6 | 3 | 3 |
The file had 23 result rows plus the header. Three rows still carried a Google wrapper link. The run cost 3 credits: one per search, nothing for the link calls.
The first lines of an earlier run of the same keywords:
keyword,rank,title,link,snippet
standing desk,1,Height Adjustable Electric Standing Desks | Sit-Stand,https://www.vari.com/desks-and-tables/standing-desks/?srsltid=...,Shop standi...
standing desk,2,UPLIFT V3 Standing Desk,https://www.upliftdesk.com/2-leg-standing-desk/?srsltid=...,"The UPLIFT V3 Desk redefines standing desks wi..."
standing desk,3,Standing Desk,https://www.amazon.com/standing-desk/s?k=standing+desk,"One-Piece Standing Desk, Electric Adjustable with 4 Memory Presets, ..."
Things that trip people up
- Let the
csvmodule do the quoting. Titles and snippets contain commas and quotation marks. Joining fields with","yourself breaks the file on rows like the second one below the header above. - Open the file with
newline=""andencoding="utf-8". Without the first you get blank lines between rows on Windows. If Excel shows garbled accents, useencoding="utf-8-sig". - Some links are Google wrappers. Lower results can come back as
google.com/gotolinks. The script sends those to the free link resolver and keeps the wrapper when one is not resolved (3 of 14 in our run). Resolve the leftovers in a second pass. - Shop links carry a
srsltidtracking parameter. Two of the three rows above have one. Strip it before you compare links between runs, or the same page will look like a new one every day. - Row counts differ by keyword. We got 8, 9 and 6. Google fills part of the page with other modules, so do not assume ten.
rankis the place among organic results only. The AI overview, People Also Ask and the local pack are separate fields and not in this file. Usepositionif you want where the result sat on the page.- Check
status, not the HTTP code. Every answer is HTTP 200; a failed search has a non-zerostatusand is not charged.
Going further
- More than one page per keyword: pagination with the
pageparameter, 1 credit per page. - A column per day for one domain's position: build a rank tracker in Python.
- A different country or city: add
gl,hlorlocation.
Cost and limits
One search is 1 credit, so a 1,000-keyword export costs 1,000 credits. Credits cost $0.25–$0.50 per 1,000 depending on the plan; failed requests are not charged, and new accounts get 500 free credits without a card.
- Parameters and the full response: Google web search docs
- Try it in the browser: Google web search
- Credit packs: pricing