API

AI Search

You are reading the Data API docs

Base URL: api.seranking.com

Data API and Project API keys are not interchangeable — use the correct one to avoid authentication errors.

Data apikey example:
80cfee7d-xxxx-xxxx-xxxx-fc8500816bb3
(UUID format)
Project apikey example:
253a73adxxxxxxxxxxxxxx340aa0a939
(40-char hex)

API keys are available in your account. For any questions or 401 errors, email [email protected] for support.

The AI Search API endpoints provide tools to analyze a domain’s visibility and performance within Large Language Model (LLM) results. You can retrieve high-level overviews, find specific prompts that feature a target domain or brand, and discover the brand name associated with a domain.

Overview

This endpoint provides a high-level overview of a domain’s performance in LLM, including key metrics like link presence, average position, and AI traffic, along with historical dynamics (trends over time).

GET Request

The request should be made as a GET request with all parameters included in the query string.

Copy
curl --location 'https://api.seranking.com/v1/ai-search/overview?target=seranking.com&scope=domain&source=us&engine=chatgpt' \
--header 'Authorization: Token YOUR_API_KEY'

Request Parameters

ParameterTypeRequiredDefaultDescription
engineStringYesThe LLM to query (e.g., ai-overview, chatgpt, perplexity, gemini, ai-mode).
targetStringYesThe target to analyze for LLM performance. Can be a root domain, subdomain, or a specific URL.
sourceStringYesAlpha-2 country code for the regional prompt database (e.g., us for United States results).
scopeStringYesbase_domainScope of analysis: domain (all subpages and subdomains), host (specific subdomain), or url (exact URL).

Response Parameters

If successful, the server returns a JSON object containing aggregated metrics, changes from the previous period, and time-series data for generating charts.

ParameterData TypeDescription
summaryObjectAn object containing key performance metrics like link_presence, average_position, and ai_opportunity_traffic.
time_seriesObjectAn object containing historical data arrays for overall_traffic, organic_traffic, ai_traffic, link_presence, and average_position.

Each object within the summary object has the following structure:

ParameterData TypeDescription
currentFloatThe value for the current period.
previousFloatThe value for the previous period.
change_absoluteFloatThe absolute difference between the current and previous periods.
change_percentFloatThe percentage change between the current and previous periods.

Each array within the time_series object contains a series of objects with the following structure:

ParameterData TypeDescription
dateStringThe month and year of the data point (YYYY-MM).
valueFloatThe metric’s value for that month.

Example Request

Copy
curl --location 'https://api.seranking.com/v1/ai-search/overview?target=seranking.com&scope=domain&source=us&engine=chatgpt' \
--header 'Authorization: Token YOUR_API_KEY'

Example Response

A successful request returns a JSON object with a comprehensive overview of LLM performance metrics.

Copy
{
"summary": {
"link_presence": {
"current": 8210,
"previous": 11124,
"change_absolute": 2914,
"change_percent": 26.2
},
"average_position": {
"current": 9.93,
"previous": 12.84,
"change_absolute": 2.91,
"change_percent": 22.66
},
"ai_opportunity_traffic": {
"current": 2950,
"previous": 5055,
"change_absolute": 2105,
"change_percent": 41.64
}
},
"time_series": {
"overall_traffic": [
{ "date": "2025-08", "value": 43386 },
{ "date": "2025-09", "value": 74392 }
],
"organic_traffic": [
{ "date": "2025-08", "value": 38331 },
{ "date": "2025-09", "value": 71442 }
],
"ai_traffic": [
{ "date": "2025-08", "value": 5055 },
{ "date": "2025-09", "value": 2950 }
],
"link_presence": [
{ "date": "2025-08", "value": 11124 },
{ "date": "2025-09", "value": 8210 }
],
"average_position": [
{ "date": "2025-08", "value": 12.84 },
{ "date": "2025-09", "value": 9.93 }
]
}
}

Discover Brand by URL

This utility endpoint identifies and returns the brand name connected to the specified target domain. This is useful for programmatically finding a brand before using it in other queries.

GET Request

The request should be made as a GET request with all parameters included in the query string.

Copy
curl --location 'https://api.seranking.com/v1/ai-search/discover-brand?target=microsoft.com&scope=domain&source=us' \
--header 'Authorization: Token YOUR_API_KEY'

Request Parameters

ParameterTypeRequiredDefaultDescription
targetStringYesThe target to analyze for LLM performance. Can be a root domain, subdomain, or a specific URL.
sourceStringYesAlpha-2 country code for the regional prompt database (e.g., us for United States results).
scopeStringYesbase_domainScope of analysis: domain (all subpages and subdomains), host (specific subdomain), or url (exact URL).

Response Parameters

If successful, the server returns a JSON object containing an array of discovered brand names.

ParameterData TypeDescription
brandsArrayAn array of strings, each a potential brand name.

Example Request

Copy
curl --location 'https://api.seranking.com/v1/ai-search/discover-brand?target=microsoft.com&scope=domain&source=us' \
--header 'Authorization: Token YOUR_API_KEY'

Example Response

A successful request returns a JSON object with an array of brand names associated with the target.

Copy
{
"brands": [
"Microsoft"
]
}

Get Prompts by Target

This endpoint retrieves a paginated list of prompts where the specified domain, subdomain, or URL appears in LLM results.

GET Request

The request should be made as a GET request with all parameters included in the query string.

Copy
curl --location --globoff 'https://api.seranking.com/v1/ai-search/prompts-by-target?target=seranking.com&scope=domain&source=us&engine=ai-mode&limit=1' \
--header 'Authorization: Token YOUR_API_KEY'

Request Parameters

ParameterTypeRequiredDefaultDescription
engineStringYesThe LLM to query (e.g., ai-overview, chatgpt, perplexity, gemini, ai-mode).
targetStringYesThe target to analyze for LLM performance. Can be a root domain, subdomain, or a specific URL.
sourceStringYesAlpha-2 country code for the regional prompt database (e.g., us for United States results).
scopeStringYesbase_domainScope of analysis: domain (all subpages and subdomains), host (specific subdomain), or url (exact URL).
sortStringNovolumeThe field to sort the results by. Options: volume, type, snippet_length.
sort_orderStringNodescThe order of sorting (asc or desc).
limitIntegerNo100The maximum number of prompts to return per page (max 1000).
offsetIntegerNo0The starting position for the paginated list.
filterObjectNoAn object for filtering results. See the Filtering Results section for details.

Response Parameters

If successful, the server returns a JSON object containing the unique ID for the newly created audit.

ParameterData TypeDescription
totalIntegerThe total number of prompts found for the target.
dateStringThe date of the data snapshot (YYYY-MM-DD).
promptsArrayAn array of objects, each representing a found prompt.

prompts Array Object Structure

Each object in the prompts array has the following structure:

ParameterData TypeDescription
promptStringThe user query or prompt text that triggered the LLM response.
volumeIntegerThe estimated monthly search volume for the prompt.
typeStringThe type of appearance for the target in the LLM result (e.g., “Link”, “Brand”).
answerObjectAn object containing the detailed response from the LLM.

answer Object Structure

The answer object contains the following fields:

ParameterData TypeDescription
textStringThe full text of the snippet generated by the LLM.
linksArrayAn array of URL strings that were included as links within the LLM’s answer.

Example Request

Copy
curl --location 'https://api.seranking.com/v1/ai-search/prompts-by-target?target=seranking.com&scope=domain&source=us&engine=ai-mode&sort=volume&sort_order=desc&offset=0&limit=100' \
--header 'Authorization: Token YOUR_API_KEY'

Example Response

Copy
{
"total": 5448,
"date": "2025-09-01",
"prompts": [
{
"prompt": "peliculas en netflix",
"volume": 14800,
"type": "Link",
"answer": {
"text": "Hay una gran variedad de peliculas disponibles en Netflix...",
"links": [ "[https://movies.sitioficial.netflix.com/browse/genre/34399](https://movies.sitioficial.netflix.com/browse/genre/34399)" ]
}
}
]
}

Get Prompts by Brand

This endpoint retrieves a paginated list of prompts where the specified brand name is mentioned in LLM results.

GET Request

The request should be made as a GET request with all parameters included in the query string.

Copy
curl --location 'https://api.seranking.com/v1/ai-search/prompts-by-brand?brand=Apple&source=us&engine=perplexity&sort=volume&sort_order=desc&offset=0&limit=10' \
--header 'Authorization: Token YOUR_API_KEY'

Request Parameters

ParameterTypeRequiredDefaultDescription
engineStringYesThe LLM to query (e.g., ai-overview, chatgpt, perplexity, gemini, ai-mode).
brandStringYesThe brand name to search for in LLM snippets.
sourceStringYesAlpha-2 country code for the regional prompt database (e.g., us for United States results).
sortStringNovolumeThe field to sort the results by. Options: volume, type, snippet_length.
sort_orderStringNodescThe order of sorting (asc or desc).
limitIntegerNo100The maximum number of prompts to return per page (max 1000).
offsetIntegerNo0The starting position for the paginated list.
filterObjectNoAn object for filtering results. See the Filtering Results section for details.

Response Parameters

ParameterData TypeDescription
totalIntegerThe total number of times the brand has been mentioned in the specified LLM for the current month.
dateStringThe date of the data snapshot (YYYY-MM-DD).
promptsArrayAn array of objects, each representing a found prompt. See the structure below for details.

prompts Array Object Structure

Each object in the prompts array has the following structure:

ParameterData TypeDescription
promptStringThe user query or prompt text that triggered the LLM response.
volumeIntegerThe estimated monthly search volume for the prompt.
typeStringThe type of appearance for the target in the LLM result (e.g., “Link”, “Brand”).
answerObjectAn object containing the detailed response from the LLM.

answer Object Structure

The answer object contains the following fields:

ParameterData TypeDescription
textStringThe full text of the snippet generated by the LLM.
linksArrayAn array of URL strings that were included as links within the LLM’s answer.

Example Request

Copy
curl --location 'https://api.seranking.com/v1/ai-search/prompts-by-brand?brand=Netflix&source=us&engine=perplexity&sort=volume&sort_order=desc&offset=0&limit=10' \
--header 'Authorization: Token YOUR_API_KEY'

Example Response

A successful request returns a JSON object containing a list of prompts that mention the specified brand.

Copy
{
"total": 5448,
"date": "2025-09-01",
"prompts": [
{
"prompt": "peliculas en netflix",
"volume": 14800,
"type": "Link",
"answer": {
"text": "Hay una gran variedad de peliculas disponibles en Netflix...",
"links": [ "[https://movies.sitioficial.netflix.com/browse/genre/34399](https://movies.sitioficial.netflix.com/browse/genre/34399)" ]
}
}
]
}

Filtering Results

The Get Prompts by Target and Get Prompts by Brand endpoints support advanced filtering to refine your search results. The filter parameter is passed as an object in the query string.

Range Filters (volume, keyword_count, characters_count)

These filters allow you to specify a numeric range for your results. Both from and to values are inclusive. You can use one or both to define the range.

  • To get values greater than or equal to a number: Use filter[<parameter>][from]=<value>.
    • Example: filter[volume][from]=100 returns prompts with a search volume of 100 or more.
  • To get values less than or equal to a number: Use filter[<parameter>][to]=<value>.
    • Example: filter[keyword_count][to]=5 returns prompts with 5 or fewer words.
  • To get values within a specific range: Use both from and to.
    • Example: filter[characters_count][from]=10&filter[characters_count][to]=50 returns prompts that are between 10 and 50 characters long.

Text Search Filters (multi_keyword_included, multi_keyword_excluded)

These filters allow you to include or exclude specific keywords from the prompt text.

  • multi_keyword_included: A URL-encoded JSON string specifying keywords that must be present in the prompt.
  • multi_keyword_excluded: A URL-encoded JSON string specifying keywords that must not be present in the prompt.

For details on how to structure the JSON for these filters, please refer to the Text search JSON structure documentation.

Learn how SE Ranking’s API can boost your SEO!

Hi! Meet our product expert, Alex.

He’ll walk you through the API and show you how to get the most out of it.

  • Enjoy a tailored demo on integrating rich, structured SEO data into your stack.
  • Pin down every tech detail live—auth, endpoints, rate limits, data formats.
  • Compare usage tiers and pricing so you can unlock maximum data value.

Request a free demo to see our tools and integrations in action

By clicking this button, you agree to SE Ranking’s Terms of Services and Privacy Policy.