Skip to content
Coding Script or NotebookGoogle ColabFree

DataForSEO SERP Collection Starter Notebook

ForKeyword researchContent analysis

By Lazarina Stoy· Updated 24 Oct 2026

Almost every SERP-based workflow I teach starts the same way: you need the search results for a list of keywords, in a table you can actually analyse. This free Google Colab notebook is that first step. It connects to the DataForSEO SERP API with Python, pulls Google results for your keywords and flattens the JSON into tidy tables: organic results, SERP features, People Also Ask questions, AI Overview citations and related searches.

Who it’s for

SEOs and marketers who are new to SERP APIs, and anyone who wants a clean, reusable data layer for clustering, intent classification or AI Overview tracking without paying for another SaaS seat.

How to use it

  1. Open the notebook in Colab and run it once with USE_SAMPLE = True. It replays three real SERPs, so you can see every output before spending anything.
  2. Choose your settings: Live mode (results in seconds) or Standard mode (queued, under a third of the price), plus location, language, device and a spend cap.
  3. Paste your keywords or load a CSV. The notebook trims, lower-cases and removes duplicates so you never pay twice for the same SERP.
  4. Check the cost estimate, which is a worst-case figure for the whole run.
  5. Add your DataForSEO login and API password as Colab secrets (your API credentials are read at runtime and never saved in the notebook), set USE_SAMPLE = False and run the collection.
  6. Review the tables and download the CSVs or the Excel workbook for Google Sheets.

What you get

  • organic.csv with organic position, absolute position, domain, URL, title and snippet
  • A keyword-by-feature table showing which SERPs have AI Overviews, People Also Ask, videos and more
  • paa.csv and ai_overview_citations.csv, ready for question mining and citation analysis
  • A cost log with the price DataForSEO charged for every call
  • dataforseo_serp.py, a small commented helper you can reuse in your own scripts

Costs and limits

You need a DataForSEO account. At October 2026 list prices, Live mode costs about $0.002 per keyword for the top 10 and Standard mode about $0.0006, plus a small AI Overview surcharge that is refunded when there’s nothing extra to load. So 100 keywords cost at most around $0.40 in Live mode. The notebook refuses any paid call that could take the run over your spend cap.

A SERP is one snapshot for one location, language and device, so treat a single pull as a starting point and track over time before drawing conclusions. Prices change, so check DataForSEO’s pricing page before a large run.

Next, track AI Overviews for your own domain with the companion AI Overview Tracker, or take the SERP data further in the Semantic AI-powered SEO Keyword Research course.

What’s included

  • Live Advanced or Standard (task_post + task_get) collection with DataForSEO API v3
  • Worst-case cost estimate before you run, a spend cap checked before every paid call, and a per-call cost log
  • Flattens the JSON into organic, SERP features, People Also Ask, AI Overview citations and related searches
  • Runs end to end on three real saved SERPs with no API key
  • Exports CSVs plus a Google Sheets-ready Excel workbook