AI Search
AI Search API provides programmatic access to a domain’s performance in Large Language Model (LLM) results. Data is refreshed on a monthly basis.
Using the API, you can:
- get an AI search overview with metrics like link presence, average position, AI traffic, and historical trends
- compare a primary domain against competitors across multiple LLM engines and retrieve a share of voice leaderboard
- 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
Retrieves 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
{
"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 }
]
}
}
Get AI search leaderboard
POST https://api.seranking.com/v1/ai-search/overview/leaderboard
Cost: 7,500 credits per request (flat)
Compares a primary domain against up to 10 competitors across multiple LLM engines and returns a share of voice leaderboard showing which domains have the highest AI search visibility. The leaderboard is calculated based on both brand and link presence across the selected engines.
Request parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| primary | Object | Yes | N/A | Primary domain and brand information. |
| competitors | Array | Yes | N/A | List of competitors to compare (1–10 items). |
| scope | String | No | 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. |
| source | String | Yes | N/A | Country code for the regional database (e.g., us for United States results). For acceptable values, see Regional database codes. |
| engines | Array | Yes | N/A | LLM engines to query (ai-overview, chatgpt, perplexity, gemini, ai-mode). |
Each object within the primary parameter has the following structure:
| Parameter | Type | Required | Description |
|---|---|---|---|
| target | String | Yes | Target to analyze for LLM performance. Can be a root domain, subdomain, or a specific URL (e.g., seranking.com). |
| brand | String | No | Brand name (e.g., SE Ranking). |
Each object within the competitors parameter has the following structure:
| Parameter | Type | Required | Description |
|---|---|---|---|
| target | String | Yes | Competitor to analyze for LLM performance. Can be a root domain, subdomain, or a specific URL (e.g., semrush.com). |
| brand | String | No | Competitor brand name (e.g., Semrush). |
Request example
curl --location 'https://api.seranking.com/v1/ai-search/overview/leaderboard' \
--header 'Authorization: Token YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"primary": {
"target": "example.com",
"brand": "Example"
},
"competitors": [
{ "target": "example1.com", "brand": "Example 1" },
{ "target": "example2.com", "brand": "Example 2" }
],
"scope": "base_domain",
"source": "us",
"engines": ["ai-overview", "chatgpt", "perplexity"]
}'
Response parameters
If successful, the server returns a JSON object containing leaderboard and per-domain, per-engine metrics.
| Parameter | Type | Description |
|---|---|---|
| request_metadata | Object | Metadata describing the request. |
| leaderboard | Array | Leaderboard of domains sorted by share of voice. |
| results | Object | Detailed per-domain, per-engine metrics. |
Each object in request_metadata has the following structure:
| Parameter | Type | Description |
|---|---|---|
| primary | String | Primary target domain. |
| competitors | Array | Competitor domains included in the request. |
| engines | Array | Engines used for the comparison. |
| source | String | Country code for the regional database. |
Each object in leaderboard array has the following structure:
| Parameter | Type | Description |
|---|---|---|
| rank | Integer | Position in the leaderboard (1 = highest share of voice). |
| domain | String | Domain name. |
| share_of_voice | Float | Calculated share of voice. |
| brand_presence | Integer | Total brand mentions across selected engines. |
| link_presence | Integer | Total link citations across selected engines. |
| is_primary_target | Boolean | Indicates whether this is the primary domain. |
Each object in results has the following structure:
- Each
domainobject (results.{domain}) contains:
| Parameter | Type | Description |
|---|---|---|
| {engine} | Object | Metrics for a specific engine. |
- Each
engineobject (results.{domain}.{engine}) contains:
| Parameter | Type | Description |
|---|---|---|
| brand_presence | Integer | Brand presence for this domain on this engine. |
| link_presence | Integer | Link presence for this domain on this engine. |
Response example
{
"results": {
"example.com": {
"chatgpt": {
"brand_presence": 5,
"link_presence": 18
},
"ai-overview": {
"brand_presence": 4798,
"link_presence": 9245
},
"perplexity": {
"brand_presence": 162,
"link_presence": 416
}
},
"example1.com": {
"chatgpt": {
"brand_presence": 3042,
"link_presence": 287
},
"ai-overview": {
"brand_presence": 13688,
"link_presence": 10083
},
"perplexity": {
"brand_presence": 737,
"link_presence": 730
}
},
"example2.com": {
"chatgpt": {
"brand_presence": 55,
"link_presence": 324
},
"ai-overview": {
"brand_presence": 20161,
"link_presence": 37952
},
"perplexity": {
"brand_presence": 466,
"link_presence": 2816
}
}
},
"request_metadata": {
"engines": [
"ai-overview",
"chatgpt",
"perplexity"
],
"competitors": [
"example1.com",
"example2.com"
],
"source": "us",
"primary": "example.com"
},
"leaderboard": [
{
"rank": 1,
"link_presence": 41092,
"share_of_voice": 0.5719,
"is_primary_target": false,
"brand_presence": 20682,
"domain": "example2.com"
},
{
"rank": 2,
"link_presence": 11100,
"share_of_voice": 0.2923,
"is_primary_target": false,
"brand_presence": 17467,
"domain": "example1.com"
},
{
"rank": 3,
"link_presence": 9679,
"share_of_voice": 0.1358,
"is_primary_target": true,
"brand_presence": 4965,
"domain": "example.com"
}
]
}
Discover brand by URL
GET https://api.seranking.com/v1/ai-search/discover-brand
Cost: 100 credits per request
Identifies 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
{
"brands": [
"Microsoft"
]
}
Get prompts by target
GET https://api.seranking.com/v1/ai-search/prompts-by-target
Cost: 200 credits per returned prompt
Retrieves 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 a list of prompts and metadata.
| 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. |
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. |
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
Retrieves 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
If successful, the server returns a JSON object containing a list of prompts that mention the specified brand.
| 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. |
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. |
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)" ]
}
}
]
}
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.
