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
/// <summary>
/// Method: POST
/// Endpoint: https://api.dataforseo.com/v3/ai_optimization/llm_mentions/cross_aggregated_metrics/live
/// </summary>
/// <see href="https://docs.dataforseo.com/v3/ai_optimization/llm_mentions/cross_aggregated_metrics/live"/>
public static async Task LlmMentionsCrossAggregatedMetricsLive()
{
var postData = new List<object>();
// a simple way to set a task, the full list of possible parameters is available in documentation
postData.Add(new
{
language_code = "en",
location_code = 2840,
platform = "google",
targets = new object[]
{
new
{
aggregation_key = "chat_gpt",
target = new object[]
{
new
{
keyword = "chat gpt"
}
}
},
new
{
aggregation_key = "claude",
target = new object[]
{
new
{
keyword = "claude"
}
}
},
new
{
aggregation_key = "gemini",
target = new object[]
{
new
{
keyword = "gemini"
}
}
},
new
{
aggregation_key = "perplexity",
target = new object[]
{
new
{
keyword = "perplexity",
search_filter = "include"
}
}
}
},
initial_dataset_filters = new object[]
{
new object[]
{
"ai_search_volume",
">",
10
}
},
internal_list_limit = 5
});
var content = new StringContent(JsonConvert.SerializeObject(postData), Encoding.UTF8, "application/json");
using var response = await _httpClient.PostAsync("/v3/ai_optimization/llm_mentions/cross_aggregated_metrics/live", content);
var result = JsonConvert.DeserializeObject<dynamic>(await response.Content.ReadAsStringAsync());
// you can find the full list of the response codes here https://docs.dataforseo.com/v3/appendix/errors
if (result.status_code == 20000)
{
// do something with result
Console.WriteLine(result);
}
else
Console.WriteLine($"error. Code: {result.status_code} Message: {result.status_message}");
}
The above command returns JSON structured like this:
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 2target 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