HELP CENTER

How to Get Keywords That a Website Ranks for in Google AI Overview

AI Overviews appear on most Google SERPs. However, when Google cites a page within one, that citation never appears in a standard organic search results report. Track only blue-link positions, and you’ll miss it.

This article shows you how to pull the keywords a website ranks for in Google AI Overview using our Ranked Keywords endpoint in the DataForSEO Labs API. It’s a single request that returns structured JSON, so you don’t have to scrape anything yourself.

What ranking in a Google AI Overview means

First, a clarification: “ranking” in an AI Overview isn’t the same as ranking #1 in organic results. An AI Overview is Google’s generated answer block, and it pulls from source pages that it links as references. When your page is one of those references, Google is citing it as source material, which doesn’t mean it sits at position one in the classic ten blue links.

The distinction matters because the two signals move independently. A page can get cited in an AI Overview for a query where its organic rank is mediocre, and it can hold a strong organic rank without ever getting cited. To capture the AI Overview side, we added an SERP element type, ai_overview_reference, to the Ranked Keywords endpoint.
For every keyword where the target is used as a source, you get the citation title, URL, domain, the text snippet Google quoted, its position within the overview, and an estimated traffic value. The full change is described in our AI Overview references update.

Before you start

You need two things: a DataForSEO account and your API credentials, which authenticate over HTTP Basic auth using a base64-encoded login:password string. You’ll call one endpoint, dataforseo_labs/google/ranked_keywords/live.

One rule trips people up more than any other, so here it is up front: the target format is strict. Enter a domain without https:// or www. (for example, dataforseo.com). Enter a specific page with https:// (for example, https://dataforseo.com/blog). Pass a page URL without the protocol, and the endpoint returns results for the whole domain instead of that page.

Get the keywords a website ranks for in Google AI Overview

The endpoint defaults to organic and paid results, so AI Overview data only comes back when you explicitly request it with "item_types": ["ai_overview_reference"]. The request below asks for the keywords where dataforseo.com is cited in AI Overviews in the United States, in English. Start with cURL to check that your credentials work:

curl --location --request POST "https://api.dataforseo.com/v3/dataforseo_labs/google/ranked_keywords/live" \
  --user "your_login:your_password" \
  --header "Content-Type: application/json" \
  --data-raw '[
    {
      "target": "dataforseo.com",
      "location_name": "United States",
      "language_name": "English",
      "item_types": ["ai_overview_reference"],
      "limit": 100
    }
  ]'

Endpoint used: dataforseo_labs/google/ranked_keywords/live.

The same request in Python is the building block you’d wrap in a loop or a scheduled job once a single call works. It sends one task and returns the same structured JSON.

import base64, requests

# Our API uses HTTP Basic auth with a base64-encoded "login:password" string.
# Both values live in your dashboard once you've signed up.
auth = base64.b64encode(b"your_login:your_password").decode()

resp = requests.post(
    "https://api.dataforseo.com/v3/dataforseo_labs/google/ranked_keywords/live",
    headers={"Authorization": f"Basic {auth}", "Content-Type": "application/json"},
    # item_types must include ai_overview_reference, or you get organic/paid only
    json=[{
        "target": "dataforseo.com",
        "location_name": "United States",
        "language_name": "English",
        "item_types": ["ai_overview_reference"],
        "limit": 100,
    }],
    timeout=120,
)
data = resp.json()

Prefer codes over names? location_code and language_code work too, and you can pull the full set from our list of locations and languages. Once you have a response, the next step is reading it.

Read the response

Each ranked keyword comes back as an item with two parts: keyword_data (search volume, CPC, and related metrics) and ranked_serp_element (the SERP placement). When the target is cited in an AI Overview, that placement is an ai_overview_reference object. Here’s a trimmed example with the fields you’ll use most:

{
  "ranked_serp_element": {
    "serp_item": {
      "type": "ai_overview_reference",
      "rank_group": 1,
      "rank_absolute": 1,
      "domain": "dataforseo.com",
      "title": "Top 1000 Keywords Searched on Google - DataForSEO",
      "url": "https://dataforseo.com/free-seo-stats/top-1000-keywords",
      "text": "google flights. 20400000. zillow. 20400000. streameast...",
      "relative_url": "/free-seo-stats/top-1000-keywords",
      "etv": 42.56,
      "rank_info": { "main_domain_rank": 392 }
    }
  }
}

In practice, three fields carry the story. url and relative_url tell you which page Google cited, so you can check whether your best AI Overview performers are the pages you expected. The text is the exact snippet Google quoted, which shows what content earned the citation. Also, ETV (estimated traffic volume) lets you rank citations by their likely visibility rather than treating them all the same. Once you can read a single item, you’ll want to shape the whole list.

Narrow the list with filters and sorting

A full domain can rank for a wide set of AI Overview keywords, so filtering and sorting keep the response focused on what you’re analyzing. You can add up to eight filters and up to three order_by rules in a single request. To review only the AI Overview keywords tied to one page, filter on relative_url:

"filters": [
  ["ranked_serp_element.serp_item.relative_url", "=", "/free-seo-stats/top-1000-keywords"]
],
"order_by": ["keyword_data.keyword_info.search_volume,desc"]

That request returns the AI Overview citations for a single page, sorted by search volume so the highest-demand queries sit at the top. Swap in ETV to sort by estimated traffic instead, or add a search-volume threshold to drop zero-volume terms. For the full operator list and more examples, see our guide on filters in the DataForSEO Labs API.

Before you scale this up, a couple of quirks are worth knowing.

Common pitfalls

  1. Leaving ai_overview_reference out of item_types. The endpoint returns organic and paid results by default, so an unset item_types gives you zero AI Overview data even when citations exist. Set "item_types": ["ai_overview_reference"] explicitly.
  2. Passing a page URL without the protocol. A target like dataforseo.com/blog is read as a domain, so you get whole-domain results instead of that page. Include https:// for page-level targets.
  3. Expecting to sort by organic fields in an AI Overview-only request. When item_types contains a type other than organic, results are ordered by the first type in the array, and you can only sort or filter by the types you requested. If you need both, include the relevant types together.

Start pulling AI Overview keywords

Tracking whether your pages get cited in AI Overviews used to mean manually inspecting SERPs.
With the ai_overview_reference element in the Ranked Keywords endpoint, one request returns every keyword where a domain or page is used as source material, along with the quoted text and an estimated traffic value. That’s the visibility layer traditional rank tracking leaves out. The docs cover the parameters, filters, and response fields.

Try it in the DataForSEO Playground

Embed DataForSeo widget on your website


Embed code:
Preview: