AI Search
AI Search API provides programmatic access to a domain’s performance in Large Language Model (LLM) results.
Using the API, you can:
- Get an AI search overview with metrics like link presence, average position, AI traffic, and historical trends
- Discover the brand associated with a domain or URL
- Retrieve prompts by target, showing where a domain or URL appears in LLM responses
- Retrieve prompts by brand, showing where a brand is mentioned in LLM results
Get AI search overview
GET https://api.seranking.com/v1/ai-search/overview/by-engine/time-series
Cost: 800 credits per request
Get a high-level overview of a domain’s brand presence in an LLM, including historical trends over time and other metrics like link presence, average position, and AI traffic.
Request parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| engine | String | Yes | N/A | LLM to query (e.g., ai-overview, chatgpt, perplexity, gemini, ai-mode). |
| target | String | Yes | N/A | Target to analyze for LLM performance. Can be a root domain, subdomain, or a specific URL (e.g., seranking.com). |
| source | string | Yes | N/A | Country code for the regional prompt database (e.g., us for the United States results). For acceptable values, see Regional database codes. |
| scope | String | No | base_domain | Scope of analysis:base_domain – aggregate by registrable domain, includes all subdomains.domain – exact host only, no subdomain aggregation.url – exact URL including path and query. |
| brand | String | No | N/A | Brand to filter the brand presence analysis (e.g., SE Ranking). |
Request example
curl --location 'https://api.seranking.com/v1/ai-search/overview/by-engine/time-series?target=seranking.com&source=us&engine=ai-overview' \
--header 'Authorization: Token YOUR_API_KEY'
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.
| Parameter | Type | Description |
|---|---|---|
| summary | Object | Object containing key performance metrics like brand_presence, link_presence, average_position, and ai_opportunity_traffic. |
| time_series | Object | 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:
| Parameter | Type | Description |
|---|---|---|
| current | Float | Value for the current period. |
| previous | Float | Value for the previous period. |
| change_absolute | Float | Absolute difference between the current and previous periods. |
| change_percent | Float | Percentage change between the current and previous periods. |
Each array within the time_series object contains a series of objects with the following structure:
| Parameter | Type | Description |
|---|---|---|
| date | String | Month and year of the data point in YYYY-MM format. |
| value | Float | Metric’s value for that month. |
Response example
A successful request returns a JSON object with a comprehensive overview of LLM performance metrics.
{
"summary": {
"brand_presence": {
"current": 50,
"previous": 45,
"change_absolute": 5,
"change_percent": 11.1
},
"link_presence": {
"current": 120,
"previous": 110,
"change_absolute": 10,
"change_percent": 9.1
},
"average_position": {
"current": 8.5,
"previous": 9.2,
"change_absolute": 0.7,
"change_percent": 7.6
},
"ai_opportunity_traffic": {
"current": 2000,
"previous": 1800,
"change_absolute": 200,
"change_percent": 11.1
}
},
"time_series": {
"overall_traffic": [
{ "date": "2025-08", "value": 43000 },
{ "date": "2025-09", "value": 45000 }
],
"organic_traffic": [
{ "date": "2025-08", "value": 40000 },
{ "date": "2025-09", "value": 42000 }
],
"ai_traffic": [
{ "date": "2025-08", "value": 3000 },
{ "date": "2025-09", "value": 3000 }
],
"link_presence": [
{ "date": "2025-08", "value": 110 },
{ "date": "2025-09", "value": 120 }
],
"average_position": [
{ "date": "2025-08", "value": 9.2 },
{ "date": "2025-09", "value": 8.5 }
]
}
}
Discover brand by URL
GET https://api.seranking.com/v1/ai-search/discover-brand
Cost: 100 credits per request
Identify the brand name associated with the specified target domain. This utility endpoint is useful for programmatically finding a brand before using it in other queries.
Request parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| target | String | Yes | N/A | Target to analyze for LLM performance. Can be a root domain, subdomain, or a specific URL (e.g., seranking.com). |
| source | String | Yes | N/A | Country code for the regional prompt database (e.g., us for United States results). For acceptable values, see Regional database codes. |
| scope | String | Yes | base_domain | Scope of analysis:base_domain – aggregate by registrable domain, includes all subdomains.domain – exact host only, no subdomain aggregation.url – exact URL including path and query. |
Request example
curl --location 'https://api.seranking.com/v1/ai-search/discover-brand?target=microsoft.com&scope=domain&source=us' \
--header 'Authorization: Token YOUR_API_KEY'
Response parameters
If successful, the server returns a JSON object containing an array of discovered brand names.
| Parameter | Type | Description |
|---|---|---|
| brands | Array | Array of strings, each a potential brand name. |
Response example
A successful request returns a JSON object with an array of brand names associated with the target.
{
"brands": [
"Microsoft"
]
}
Get prompts by target
GET https://api.seranking.com/v1/ai-search/prompts-by-target
Cost: 200 credits per returned prompt
Retrieve a paginated list of prompts where the specified domain, subdomain, or URL appears in LLM results.
Request parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| engine | String | Yes | N/A | LLM to query (e.g., ai-overview, chatgpt, perplexity, gemini, ai-mode). |
| target | String | Yes | N/A | Target to analyze for LLM performance. Can be a root domain, subdomain, or a specific URL. |
| source | String | Yes | N/A | Country code for the regional prompt database (e.g., us for United States results).For acceptable values, see Regional database codes. |
| scope | String | Yes | base_domain | Scope of the analysis: base_domain – aggregate by registrable domain, includes all subdomains. domain – exact host only, no subdomain aggregation.url – exact URL including path and query. |
| sort | String | No | volume | Field to sort the results by: volume, type, snippet_length. |
| sort_order | String | No | desc | Sort order for the results: asc – for ascending.desc – for descending. |
| limit | Integer | No | 100 | Maximum number of prompts to return per page (max 1000). |
| offset | Integer | No | 0 | Starting position for the paginated list. |
| filter | Object | No | N/A | Object for filtering results. See the Filtering results section for details. |
Request example
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'
Response parameters
If successful, the server returns a JSON object containing the unique ID for the newly created audit.
| Parameter | Type | Description |
|---|---|---|
| total | Integer | Total number of prompts found for the target. |
| date | String | Date of the data snapshot in YYYY-MM-DD format. |
| prompts | Array | Array of objects, each representing a found prompt. |
prompts array object structure
Each object in the prompts array has the following structure:
| Parameter | Type | Description |
|---|---|---|
| prompt | String | User query or prompt text that triggered the LLM response. |
| volume | Integer | Estimated monthly search volume for the prompt. |
| type | String | Type of appearance for the target in the LLM result (e.g., Link, Brand). |
| answer | Object | Object containing the detailed response from the LLM. |
answer object structure
The answer object contains the following fields:
| Parameter | Type | Description |
|---|---|---|
| text | String | Full text of the snippet generated by the LLM. |
| links | Array | Array of URL strings that were included as links within the LLM’s answer. |
Response example
{
"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
GET https://api.seranking.com/v1/ai-search/prompts-by-brand
Cost: 200 credits per returned prompt
Retrieve a paginated list of prompts where the specified brand name is mentioned in LLM results.
Request parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| engine | String | Yes | N/A | LLM to query (e.g., ai-overview, chatgpt, perplexity, gemini, ai-mode). |
| brand | String | Yes | N/A | Brand name to search for in LLM snippets. |
| source | String | Yes | N/A | Country code for the regional prompt database (e.g., us for United States results).For acceptable values, see Regional database codes. |
| sort | String | No | volume | Field to sort the results by: volume, type, snippet_length. |
| sort_order | String | No | desc | Sort order for the results:asc – for ascending.desc – for descending. |
| limit | Integer | No | 100 | Maximum number of prompts to return per page (max 1000). |
| offset | Integer | No | 0 | Starting position for the paginated list. |
| filter | Object | No | N/A | Object for filtering results. See the Filtering results section for details. |
Request example
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'
Response parameters
| Parameter | Type | Description |
|---|---|---|
| total | Integer | Total number of times the brand has been mentioned in the specified LLM for the current month. |
| date | String | Date of the data snapshot in YYYY-MM-DD format. |
| prompts | Array | 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:
| Parameter | Type | Description |
|---|---|---|
| prompt | String | User query or prompt text that triggered the LLM response. |
| volume | Integer | Estimated monthly search volume for the prompt. |
| type | String | Type of appearance for the target in the LLM result (e.g., Link, Brand). |
| answer | Object | Object containing the detailed response from the LLM. |
answer object structure
The answer object contains the following fields:
| Parameter | Type | Description |
|---|---|---|
| text | String | Full text of the snippet generated by the LLM. |
| links | Array | Array of URL strings that were included as links within the LLM’s answer. |
Response example
A successful request returns a JSON object containing a list of prompts that mention the specified brand.
{
"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]=100returns prompts with a search volume of 100 or more.
- Example:
- To get values less than or equal to a number: Use
filter[<parameter>][to]=<value>.- Example:
filter[keyword_count][to]=5returns prompts with 5 or fewer words.
- Example:
- To get values within a specific range: Use both
fromandto.- Example:
filter[characters_count][from]=10&filter[characters_count][to]=50returns prompts that are between 10 and 50 characters long.
- Example:
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.
