NAVNavbar
cURL php NodeJS Python cSharp

Live LLM Mentions Cross Aggregated Metrics

‌‌
Live LLM Mentions endpoint provides aggregated metrics grouped by custom keys for mentions of the keywords or domains specified in the target array of the request. Each item in the results array corresponds to the specified target. The results are specific to the selected platform (google for Google’s AI Overview or chat_gpt for ChatGPT), location and language parameters (see the List of Locations & Languages).

Instead of ‘login’ and ‘password’ use your credentials from https://app.dataforseo.com/api-access

<?php

/**
 * Method: POST
 * Endpoint: https://api.dataforseo.com/v3/ai_optimization/llm_mentions/cross_aggregated_metrics/live
 * @see https://docs.dataforseo.com/v3/ai_optimization/llm_mentions/cross_aggregated_metrics/live
 */

require_once __DIR__ . '/../../../../../lib/RestClient.php';
$config = require __DIR__ . '/../../../../../lib/config.php';

$client = new RestClient($config['base_url'], null, $config['login'], $config['password']);

$data = [
    [
        'language_code' => 'en',
        'location_code' => 2840,
        'platform' => 'google',
        'targets' => [
            [
                'aggregation_key' => 'chat_gpt',
                'target' => [
                    [
                        'keyword' => 'chat gpt',
                    ],
                ],
            ],
            [
                'aggregation_key' => 'claude',
                'target' => [
                    [
                        'keyword' => 'claude',
                    ],
                ],
            ],
            [
                'aggregation_key' => 'gemini',
                'target' => [
                    [
                        'keyword' => 'gemini',
                    ],
                ],
            ],
            [
                'aggregation_key' => 'perplexity',
                'target' => [
                    [
                        'keyword' => 'perplexity',
                        'search_filter' => 'include',
                    ],
                ],
            ],
        ],
        'initial_dataset_filters' => [
            [
                'ai_search_volume',
                '>',
                10,
            ],
        ],
        'internal_list_limit' => 5,
    ],
];
try {
    $result = $client->post('/v3/ai_optimization/llm_mentions/cross_aggregated_metrics/live', $data);
    print_r($result);
    // do something with post result
} catch (RestClientException $e) {
    printf(
        "HTTP code: %d\nError code: %d\nMessage: %s\nTrace: %s\n",
        $e->getHttpCode(),
        $e->getCode(),
        $e->getMessage(),
        $e->getTraceAsString()
    );
}
?>

The above command returns JSON structured like this:

{
  "version": "0.1.20250828",
  "status_code": 20000,
  "status_message": "Ok.",
  "time": "0.9953 sec.",
  "cost": 0.101,
  "tasks_count": 1,
  "tasks_error": 0,
  "tasks": [
    {
      "id": "09121601-1535-0636-0000-f2a6730d3835",
      "status_code": 20000,
      "status_message": "Ok.",
      "time": "0.9142 sec.",
      "cost": 0.101,
      "result_count": 1,
      "path": [
        "v3",
        "ai_optimization",
        "llm_mentions",
        "cross_aggregated_metrics",
        "live"
      ],
      "data": {
        "api": "ai_optimization",
        "function": "cross_aggregated_metrics",
        "language_code": "en",
        "location_code": 2840,
        "platform": "google",
        "targets": [
          {
            "aggregation_key": "chat_gpt",
            "target": [
              {
                "keyword": "chat gpt"
              }
            ]
          },
          {
            "aggregation_key": "claude",
            "target": [
              {
                "keyword": "claude"
              }
            ]
          },
          {
            "aggregation_key": "gemini",
            "target": [
              {
                "keyword": "gemini"
              }
            ]
          },
          {
            "aggregation_key": "perplexity",
            "target": [
              {
                "keyword": "perplexity",
                "search_filter": "include"
              }
            ]
          }
        ],
        "initial_dataset_filters": [
          [
            "ai_search_volume",
            ">",
            10
          ]
        ],
        "internal_list_limit": 5
      },
      "result": [
        {
          "total": {
            "location": [
              {
                "type": "group_element",
                "key": "2840",
                "mentions": 34621,
                "ai_search_volume": 32029480,
                "impressions": 1108892627080
              }
            ],
            "language": [
              {
                "type": "group_element",
                "key": "en",
                "mentions": 34621,
                "ai_search_volume": 32029480,
                "impressions": 1108892627080
              }
            ],
            "platform": [
              {
                "type": "group_element",
                "key": "google",
                "mentions": 34621,
                "ai_search_volume": 32029480,
                "impressions": 1108892627080
              }
            ],
            "sources_domain": [
              {
                "type": "group_element",
                "key": "timesofindia.indiatimes.com",
                "mentions": 27863,
                "ai_search_volume": 11097850,
                "impressions": 309219394550
              },
              {
                "type": "group_element",
                "key": "www.youtube.com",
                "mentions": 25962,
                "ai_search_volume": 8958460,
                "impressions": 232579538520
              },
              {
                "type": "group_element",
                "key": "www.reddit.com",
                "mentions": 13393,
                "ai_search_volume": 4444420,
                "impressions": 59524117060
              },
              {
                "type": "group_element",
                "key": "en.wikipedia.org",
                "mentions": 12829,
                "ai_search_volume": 11700460,
                "impressions": 150105201340
              },
              {
                "type": "group_element",
                "key": "www.quora.com",
                "mentions": 12536,
                "ai_search_volume": 4974730,
                "impressions": 62363215280
              }
            ],
            "search_results_domain": null
          },
          "items": [
            {
              "key": "chat_gpt",
              "location": [
                {
                  "type": "group_element",
                  "key": "2840",
                  "mentions": 2579,
                  "ai_search_volume": 745560,
                  "impressions": 1922799240
                }
              ],
              "language": [
                {
                  "type": "group_element",
                  "key": "en",
                  "mentions": 2579,
                  "ai_search_volume": 745560,
                  "impressions": 1922799240
                }
              ],
              "platform": [
                {
                  "type": "group_element",
                  "key": "google",
                  "mentions": 2579,
                  "ai_search_volume": 745560,
                  "impressions": 1922799240
                }
              ],
              "sources_domain": [
                {
                  "type": "group_element",
                  "key": "timesofindia.indiatimes.com",
                  "mentions": 39,
                  "ai_search_volume": 9270,
                  "impressions": 361530
                },
                {
                  "type": "group_element",
                  "key": "www.youtube.com",
                  "mentions": 1680,
                  "ai_search_volume": 552530,
                  "impressions": 928250400
                },
                {
                  "type": "group_element",
                  "key": "www.reddit.com",
                  "mentions": 1062,
                  "ai_search_volume": 176520,
                  "impressions": 187464240
                },
                {
                  "type": "group_element",
                  "key": "en.wikipedia.org",
                  "mentions": 208,
                  "ai_search_volume": 50800,
                  "impressions": 10566400
                },
                {
                  "type": "group_element",
                  "key": "www.quora.com",
                  "mentions": 492,
                  "ai_search_volume": 122480,
                  "impressions": 60260160
                }
              ],
              "search_results_domain": null
            },
            {
              "key": "claude",
              "location": [
                {
                  "type": "group_element",
                  "key": "2840",
                  "mentions": 8140,
                  "ai_search_volume": 5239010,
                  "impressions": 42645541400
                }
              ],
              "language": [
                {
                  "type": "group_element",
                  "key": "en",
                  "mentions": 8140,
                  "ai_search_volume": 5239010,
                  "impressions": 42645541400
                }
              ],
              "platform": [
                {
                  "type": "group_element",
                  "key": "google",
                  "mentions": 8140,
                  "ai_search_volume": 5239010,
                  "impressions": 42645541400
                }
              ],
              "sources_domain": [
                {
                  "type": "group_element",
                  "key": "timesofindia.indiatimes.com",
                  "mentions": 110,
                  "ai_search_volume": 87010,
                  "impressions": 9571100
                },
                {
                  "type": "group_element",
                  "key": "www.youtube.com",
                  "mentions": 3858,
                  "ai_search_volume": 2319600,
                  "impressions": 8949016800
                },
                {
                  "type": "group_element",
                  "key": "www.reddit.com",
                  "mentions": 2220,
                  "ai_search_volume": 1060680,
                  "impressions": 2354709600
                },
                {
                  "type": "group_element",
                  "key": "en.wikipedia.org",
                  "mentions": 3337,
                  "ai_search_volume": 2477510,
                  "impressions": 8267450870
                },
                {
                  "type": "group_element",
                  "key": "www.quora.com",
                  "mentions": 1112,
                  "ai_search_volume": 402980,
                  "impressions": 448113760
                }
              ],
              "search_results_domain": null
            },
            {
              "key": "gemini",
              "location": [
                {
                  "type": "group_element",
                  "key": "2840",
                  "mentions": 23816,
                  "ai_search_volume": 25373510,
                  "impressions": 604295514160
                }
              ],
              "language": [
                {
                  "type": "group_element",
                  "key": "en",
                  "mentions": 23816,
                  "ai_search_volume": 25373510,
                  "impressions": 604295514160
                }
              ],
              "platform": [
                {
                  "type": "group_element",
                  "key": "google",
                  "mentions": 23816,
                  "ai_search_volume": 25373510,
                  "impressions": 604295514160
                }
              ],
              "sources_domain": [
                {
                  "type": "group_element",
                  "key": "timesofindia.indiatimes.com",
                  "mentions": 9379,
                  "ai_search_volume": 11002200,
                  "impressions": 103189633800
                },
                {
                  "type": "group_element",
                  "key": "www.youtube.com",
                  "mentions": 8461,
                  "ai_search_volume": 6004710,
                  "impressions": 50805851310
                },
                {
                  "type": "group_element",
                  "key": "www.reddit.com",
                  "mentions": 5776,
                  "ai_search_volume": 2811520,
                  "impressions": 16239339520
                },
                {
                  "type": "group_element",
                  "key": "en.wikipedia.org",
                  "mentions": 4788,
                  "ai_search_volume": 8727150,
                  "impressions": 41785594200
                },
                {
                  "type": "group_element",
                  "key": "www.quora.com",
                  "mentions": 6472,
                  "ai_search_volume": 4311500,
                  "impressions": 27904028000
                }
              ],
              "search_results_domain": null
            },
            {
              "key": "perplexity",
              "location": [
                {
                  "type": "group_element",
                  "key": "2840",
                  "mentions": 1796,
                  "ai_search_volume": 1128250,
                  "impressions": 2026337000
                }
              ],
              "language": [
                {
                  "type": "group_element",
                  "key": "en",
                  "mentions": 1796,
                  "ai_search_volume": 1128250,
                  "impressions": 2026337000
                }
              ],
              "platform": [
                {
                  "type": "group_element",
                  "key": "google",
                  "mentions": 1796,
                  "ai_search_volume": 1128250,
                  "impressions": 2026337000
                }
              ],
              "sources_domain": [
                {
                  "type": "group_element",
                  "key": "timesofindia.indiatimes.com",
                  "mentions": 14,
                  "ai_search_volume": 3060,
                  "impressions": 42840
                },
                {
                  "type": "group_element",
                  "key": "www.youtube.com",
                  "mentions": 838,
                  "ai_search_volume": 348680,
                  "impressions": 292193840
                },
                {
                  "type": "group_element",
                  "key": "www.reddit.com",
                  "mentions": 613,
                  "ai_search_volume": 549390,
                  "impressions": 336776070
                },
                {
                  "type": "group_element",
                  "key": "en.wikipedia.org",
                  "mentions": 196,
                  "ai_search_volume": 452710,
                  "impressions": 88731160
                },
                {
                  "type": "group_element",
                  "key": "www.quora.com",
                  "mentions": 365,
                  "ai_search_volume": 193510,
                  "impressions": 70631150
                }
              ],
              "search_results_domain": null
            }
          ]
        }
      ]
    }
  ]
}

All POST data should be sent in the JSON format (UTF-8 encoding). The task setting is done using the POST method. When setting a task, you should send all task parameters in the task array of the generic POST array. You can send up to 2000 API calls per minute, each Live LLM Mentions API call can contain only one task.

Execution time for tasks set with the Live LLM Mentions endpoint is currently up to 120 seconds.

Below you will find a detailed description of the fields you can use for setting a task.

Description of the fields for setting a task:

Field name Type Description
targets array array of objects containing target entities with aggregation keys
required field
you can specify up to 10, but not less than 2 target sets of parameters, each with its aggregation_key;

example of a targets array with multiple entities:
[{"aggregation_key":"bmw","target":[{"domain":"en.wikipedia.org","search_filter":"exclude"},{"keyword":"m5","match_type":"partial_match","search_scope":["answer"]}]},{"aggregation_key":"mercedes","target":[{"domain":"www.mercedes-benz.com","search_filter":"exclude"},{"keyword":"GLC","match_type":"word_match"}]}]

        aggregation_key string aggregation key for grouping the results
required field
groups results for comparison and serves as a label for the group
        target array array of objects containing target entities
required field
a single target can contain up to 10 domain and/or keyword entities
       ‘domain’ entity object domain entity in the target array
example:
{"domain": "en.wikipedia.org", "search_filter": "exclude", "search_scope": ["sources"]}
                domain string target domain
required field if you don’t specify a keyword
a domain should be specified without https:// and www.
                search_filter string target domain search filter
optional field
possible values:
include, exclude
default value: include
                search_scope array target domain search scope
optional field
possible values:
any, sources, search_results
default value: any
       ‘keyword’ entity object keyword entity in the target array
example:
{"keyword": "bmw", "search_filter": "include", "search_scope": ["question"], "match_type ": "partial_match"}
                keyword string target keyword
required field if you don’t specify a domain
you can specify up to 2000 characters in the keyword field
all %## will be decoded (plus character ‘+’ will be decoded to a space character)
if you need to use the “%” character for your keyword, please specify it as “%25”;
if you need to use the “+” character for your keyword, please specify it as “%2B”

learn more about rules and limitations of keyword and keywords fields in DataForSEO APIs in this Help Center article

                search_filter string target keyword search filter
optional field
possible values:
include, exclude
default value: include
                search_scope array target keyword search scope
optional field
possible values:
any, question, answer
default value: any
                match_type string target keyword match type
defines how the specified keyword is matched
optional field
possible values:
word_match – full-text search for terms that match the specified seed keyword with additional words included before, after, or within the key phrase (e.g., search for “light” will return results with “light bulb”, “light switch”);
partial_match – substring search that finds all instances containing the specified sequence of characters, even if it appears inside a longer word (e.g., search for “light” will return results with “lighting”, “highlight”);
default value: word_match
location_name string full name of search location
optional field
if you use this field, you don’t need to specify location_code
if you don’t specify this field, the location_code with 2840 value will be used by default;
you can receive the list of available locations of the search engine with their location_name by making a separate request to the https://api.dataforseo.com/v3/ai_optimization/llm_mentions/locations_and_languages
example:
United States
location_code integer search location code
optional field
if you use this field, you don’t need to specify location_name
you can receive the list of available locations of the search engine with their location_code by making a separate request to the https://api.dataforseo.com/v3/ai_optimization/llm_mentions/locations_and_languages
example:
2840
default value: 2840
language_name string full name of search language
optional field
if you use this field, you don’t need to specify language_code;
if you don’t specify this field, the language_code with en value will be used by default;
you can receive the list of available languages of the search engine with their language_name by making a separate request to the https://api.dataforseo.com/v3/ai_optimization/llm_mentions/locations_and_languages
language_code string search language code
optional field
if you use this field, you don’t need to specify language_name;
you can receive the list of available languages of the search engine with their language_code by making a separate request to the https://api.dataforseo.com/v3/ai_optimization/llm_mentions/locations_and_languages
default value: en
platform string target platform
optional field
possible values:
chat_gpt, google
default value: google
filters array array of results filtering parameters
optional field
you can add several filters at once (8 filters maximum)
you should set a logical operator and, or between the conditions
the following operators are supported:
=, <>, in, not_in, like, not_like, ilike, not_ilike, match, not_match
you can use the % operator with like and not_like to match any string of zero or more characters
example:
["ai_search_volume",">","1000"]

The full list of possible filters is available here.

internal_list_limit integer maximum number of elements within internal arrays
optional field
you can use this field to limit the number of elements within the following arrays:
sources_domain
search_results_domain
minimum value: 1
maximum value: 10
default value: 5
tag string user-defined task identifier
optional field
the character limit is 255
you can use this parameter to identify the task and match it with the result
you will find the specified tag value in the data object of the response


‌‌As a response of the API server, you will receive JSON-encoded data containing a tasks array with the information specific to the set tasks.

Description of the fields in the results array:

Field name Type Description
version string the current version of the API
status_code integer general status code
you can find the full list of the response codes here
Note: we strongly recommend designing a necessary system for handling related exceptional or error conditions
status_message string general informational message
you can find the full list of general informational messages here
time string execution time, seconds
cost float total tasks cost, USD
tasks_count integer the number of tasks in the tasks array
tasks_error integer the number of tasks in the tasks array returned with an error
tasks array array of tasks
        id string task identifier
unique task identifier in our system in the UUID format
        status_code integer status code of the task
generated by DataForSEO; can be within the following range: 10000-60000
you can find the full list of the response codes here
        status_message string informational message of the task
you can find the full list of general informational messages here
        time string execution time, seconds
        cost float cost of the task, USD
        result_count integer number of elements in the result array
        path array URL path
        data object contains the same parameters that you specified in the POST request
        result array array of results
            total object aggregated mentions metrics summary
contains overall aggregated LLM mention metrics across all found domains, grouped by various dimensions
                location array location-based grouping
array of objects containing mention metrics segmented by geographical location
                   type string type of the element = ‘group_element
                   key string grouping identifier
the specific identifier for the grouping dimension
                   mentions integer total LLM mentions count
the number of times the target keyword or domain were mentioned in relation to this specific grouping key
                   ai_search_volume integer current AI search volume rate of a keyword
learn more about this metric here
                   impressions integer current AI impressions rate of a keyword
                language array language-based grouping
array of objects containing mention metrics segmented by content language
                   type string type of the element = ‘group_element
                   key string grouping identifier
the specific identifier for the grouping dimension
                   mentions integer total LLM mentions count
the number of times the target keyword or domain were mentioned in relation to this specific grouping key
                   ai_search_volume integer current AI search volume rate of a keyword
learn more about this metric here
                   impressions integer current AI impressions rate of a keyword
                platform array platform-based grouping
array of group elements containing mention metrics segmented by AI platform
                   type string type of the element = ‘group_element
                   key string grouping identifier
the specific identifier for the grouping dimension
                   mentions integer total LLM mentions count
the number of times the target keyword or domain were mentioned in relation to this specific grouping key
                   ai_search_volume integer current AI search volume rate of a keyword
learn more about this metric here
                   impressions integer current AI impressions rate of a keyword
                sources_domain array found top source domains relevant to the target
array of objects containing data on top domains that are cited as sources in LLM responses
                   type string type of the element = ‘group_element
                   key string grouping identifier
the specific identifier for the grouping dimension
in this case the field displays a found domain name
                   mentions integer total LLM mentions count
the number of times the target keyword or domain were mentioned in relation to the specific domain
                   ai_search_volume integer current AI search volume rate of a keyword
learn more about this metric here
                   impressions integer current AI impressions rate of a keyword
                search_results_domain array found top search results domains relevant to the target
array of objects containing data on top domains that appear in search results related to LLM queries
                   type string type of the element = ‘group_element
                   key string grouping identifier
the specific identifier for the grouping dimension
in this case the field displays a found domain name
                   mentions integer total LLM mentions count
the number of times the target keyword or domain were mentioned in relation to the specific domain
                   ai_search_volume integer current AI search volume rate of a keyword
learn more about this metric here
                   impressions integer current AI impressions rate of a keyword
            items array contains relevant mentions data
                key string aggregation key received in a POST array
                location array location-based grouping
array of objects containing mention metrics segmented by geographical location
                   type string type of the element = ‘group_element
                   key string grouping identifier
the specific identifier for the grouping dimension
                   mentions integer total LLM mentions count
the number of times the target keyword or domain were mentioned in relation to this specific grouping key
                   ai_search_volume integer current AI search volume rate of a keyword
learn more about this metric here
                   impressions integer current AI impressions rate of a keyword
                language array language-based grouping
array of objects containing mention metrics segmented by content language
                   type string type of the element = ‘group_element
                   key string grouping identifier
the specific identifier for the grouping dimension
                   mentions integer total LLM mentions count
the number of times the target keyword or domain were mentioned in relation to this specific grouping key
                   ai_search_volume integer current AI search volume rate of a keyword
learn more about this metric here
                   impressions integer current AI impressions rate of a keyword
                platform array platform-based grouping
array of group elements containing mention metrics segmented by AI platform
                   type string type of the element = ‘group_element
                   key string grouping identifier
the specific identifier for the grouping dimension
                   mentions integer total LLM mentions count
the number of times the target keyword or domain were mentioned in relation to this specific grouping key
                   ai_search_volume integer current AI search volume rate of a keyword
learn more about this metric here
                   impressions integer current AI impressions rate of a keyword
                sources_domain array found top source domains relevant to the target
array of objects containing data on top domains that are cited as sources in LLM responses
                   type string type of the element = ‘group_element
                   key string grouping identifier
the specific identifier for the grouping dimension
in this case the field displays a found domain name
                   mentions integer total LLM mentions count
the number of times the target keyword or domain were mentioned in relation to the specific domain
                   ai_search_volume integer current AI search volume rate of a keyword
learn more about this metric here
                   impressions integer current AI impressions rate of a keyword
                search_results_domain array found top search results domains relevant to the target
array of objects containing data on top domains that appear in search results related to LLM queries
                   type string type of the element = ‘group_element
                   key string grouping identifier
the specific identifier for the grouping dimension
in this case the field displays a found domain name
                   mentions integer total LLM mentions count
the number of times the target keyword or domain were mentioned in relation to the specific domain
                   ai_search_volume integer current AI search volume rate of a keyword
learn more about this metric here
                   impressions integer current AI impressions rate of a keyword

‌‌