apyhub
ARTIFICIAL INTELLIGENCE · MARKETING

Analyze AI Search Performance API

What it does

AI Search Analytics helps you measure how a brand or domain appears in AI search results. Send a target and source, and get back brand matches, prompt data, and visibility metrics you can use to track presence across AI engines.

Use the discovery endpoint to find brands associated with a URL, domain, base domain, or full URL. For prompt analysis, query by target brand or by brand name and receive a dated response with totals plus a prompts array. Each prompt includes the prompt text, its type, the answer text, any links, and volume. You can sort by volume, type, or snippet length, and filter by volume, keyword count, character count, and multi-keyword inclusion or exclusion.

For performance tracking, the overview endpoints return summary metrics and monthly time series for AI traffic, link presence, organic traffic, overall traffic, and average position. Use the aggregated view to compare performance across engines, or the leaderboard endpoint to compare a primary target against up to 10 competitors and see share of voice, link presence, and brand presence by engine.

Build reporting dashboards, monitor competitor visibility, or audit how often your brand is cited versus linked in AI-driven search experiences.

▣ ENDPOINT 01 / 06
GET
Get AI Search Overview — Single Engine (Trend)
https://api.eu.apyhub.com/se-ranking/ai-search/v1/ai-search/overview/by-engine/time-series

QUICKSTART

GUIDE

Quickstart

Fetch the time-series overview for an AI search engine by passing the required query parameters.

curl -X GET "https://api.eu.apyhub.com/se-ranking/ai-search/v1/ai-search/overview/by-engine/time-series?engine=ai-overview&source=us&target=seranking.com" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with two top-level objects: summary and time_series.

  • summary contains link_presence, brand_presence, average_position, and ai_opportunity_traffic, each as an object with current, previous, change_percent, and change_absolute number fields.
  • time_series contains arrays for ai_traffic, link_presence, organic_traffic, overall_traffic, and average_position; each array item has a date string in YYYY-MM format and a numeric value.
{
  "summary": {
    "link_presence": {
      "current": 0,
      "previous": 0,
      "change_percent": 0,
      "change_absolute": 0
    }
  },
  "time_series": {
    "ai_traffic": [
      {
        "date": "2024-01",
        "value": 0
      }
    ]
  }
}
TRY ITLIVE · 4000 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Returns an AI search overview for a given engine, source, and target as a JSON object with summary metrics and time-series data. The request is made with query parameters only.

Query Parameter(s)

AttributeTypeMandatoryDescription
brandStringNoBrand identifier or name.
scopeENUMNoScope for the comparison. Allowed values: domain, base_domain, url. Default: base_domain.
engineStringYesAI search engine to query.
sourceStringYesSource to compare from.
targetStringYesTarget to compare against.

Response

Returns a JSON object with two top-level object fields: summary and time_series. summary contains four metric objects, each with current, previous, change_percent, and change_absolute number fields. time_series contains arrays of { date, value } objects for AI and traffic metrics.

ParameterTypeMandatoryDescription
summaryObjectNoSummary metrics object.
summary.link_presenceObjectNoLink presence metrics with current, previous, change_percent, and change_absolute number fields.
summary.brand_presenceObjectNoBrand presence metrics with current, previous, change_percent, and change_absolute number fields.
summary.average_positionObjectNoAverage position metrics with current, previous, change_percent, and change_absolute number fields.
summary.ai_opportunity_trafficObjectNoAI opportunity traffic metrics with current, previous, change_percent, and change_absolute number fields.
time_seriesObjectNoTime-series data object.
time_series.ai_trafficObject ArrayNoArray of { date, value } objects. date is a string in YYYY-MM format and value is a float.
time_series.link_presenceObject ArrayNoArray of { date, value } objects. date is a string in YYYY-MM format and value is a float.
time_series.organic_trafficObject ArrayNoArray of { date, value } objects. date is a string in YYYY-MM format and value is a float.
time_series.overall_trafficObject ArrayNoArray of { date, value } objects. date is a string in YYYY-MM format and value is a float.
time_series.average_positionObject ArrayNoArray of { date, value } objects. date is a string in YYYY-MM format and value is a float.

Query parameters

Name
Type
Description
brandOPTIONAL
string
scopeOPTIONAL
string
domain · base_domain · url
DEFAULT base_domain
engineREQUIRED
string
sourceREQUIRED
string
targetREQUIRED
string
▣ ENDPOINT 02 / 06
GET
discover brand
https://api.eu.apyhub.com/se-ranking/ai-search/v1/ai-search/discover-brand

QUICKSTART

GUIDE

Quickstart

Find brand suggestions for a target by passing the required query parameters in a simple GET request.

curl -X GET "https://api.eu.apyhub.com/se-ranking/ai-search/v1/ai-search/discover-brand?source=us&target=seranking.com&scope=base_domain" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with a brands array of strings. Each string is a discovered brand name.

{
  "brands": [
    "Example"
  ]
}
TRY ITLIVE · 500 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Discovers brand names from the supplied target and source values using the selected scope. Returns a JSON object containing a brands array of strings.

Query Parameter(s)

AttributeTypeMandatoryDescription
scopeStringYesScope used for discovery. Allowed values: domain, base_domain, url. Default: base_domain.
sourceStringYesSource string used by the discovery process.
targetStringYesTarget string used by the discovery process.

Response

Returns a JSON object with a brands string array field.

AttributeTypeMandatoryDescription
brandsString ArrayNoArray of brand names discovered by the endpoint.

Query parameters

Name
Type
Description
scopeREQUIRED
string
domain · base_domain · url
DEFAULT base_domain
sourceREQUIRED
string
targetREQUIRED
string
▣ ENDPOINT 03 / 06
GET
Get AI Search Overview — All Engines (Trend)
https://api.eu.apyhub.com/se-ranking/ai-search/v1/ai-search/overview/aggregated/time-series

QUICKSTART

GUIDE

Quickstart

Compare AI search metrics for a target against a source using the required query parameters.

curl -X GET "https://api.eu.apyhub.com/se-ranking/ai-search/v1/ai-search/overview/aggregated/time-series?source=us&target=seranking.com" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with optional summary and time_series objects.

  • summary contains metric objects such as link_presence, brand_presence, average_position, and ai_opportunity_traffic, each with current, previous, change_percent, and change_absolute numbers.
  • time_series contains arrays such as ai_traffic, link_presence, organic_traffic, overall_traffic, and average_position, where each item has a date string in YYYY-MM format and a numeric value.
{
  "summary": {
    "link_presence": {
      "current": 12.5,
      "previous": 10.2,
      "change_percent": 22.55,
      "change_absolute": 2.3
    }
  },
  "time_series": {
    "ai_traffic": [
      { "date": "2024-05", "value": 120.4 }
    ]
  }
}
TRY ITLIVE · 10000 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Retrieves an aggregated AI search overview across engines for the requested target and source, with optional brand and scope filters. The response includes summary metrics and time-series data.

Query Parameter(s)

AttributeTypeMandatoryDescription
brandStringNoOptional brand filter.
scopeENUMNoScope of the lookup. Allowed values: domain, base_domain, url. Default: base_domain.
sourceStringYesSource identifier to aggregate from.
targetStringYesTarget identifier to aggregate for.

Response

Returns a JSON object with top-level summary and time_series object fields. The summary object contains link_presence, brand_presence, average_position, and ai_opportunity_traffic objects, each with current, previous, change_percent, and change_absolute float fields. The time_series object contains arrays for ai_traffic, link_presence, organic_traffic, overall_traffic, and average_position, and each array item is an object with date and value fields.

ParameterTypeMandatoryDescription
summaryObjectNoSummary metrics object.
summary.link_presenceObjectNoLink presence summary with current, previous, change_percent, and change_absolute float fields.
summary.link_presence.currentNumberNoCurrent float value.
summary.link_presence.previousNumberNoPrevious float value.
summary.link_presence.change_percentNumberNoFloat change percentage.
summary.link_presence.change_absoluteNumberNoFloat absolute change.
summary.brand_presenceObjectNoBrand presence summary with current, previous, change_percent, and change_absolute float fields.
summary.brand_presence.currentNumberNoCurrent float value.
summary.brand_presence.previousNumberNoPrevious float value.
summary.brand_presence.change_percentNumberNoFloat change percentage.
summary.brand_presence.change_absoluteNumberNoFloat absolute change.
summary.average_positionObjectNoAverage position summary with current, previous, change_percent, and change_absolute float fields.
summary.average_position.currentNumberNoCurrent float value.
summary.average_position.previousNumberNoPrevious float value.
summary.average_position.change_percentNumberNoFloat change percentage.
summary.average_position.change_absoluteNumberNoFloat absolute change.
summary.ai_opportunity_trafficObjectNoAI opportunity traffic summary with current, previous, change_percent, and change_absolute float fields.
summary.ai_opportunity_traffic.currentNumberNoCurrent float value.
summary.ai_opportunity_traffic.previousNumberNoPrevious float value.
summary.ai_opportunity_traffic.change_percentNumberNoFloat change percentage.
summary.ai_opportunity_traffic.change_absoluteNumberNoFloat absolute change.
time_seriesObjectNoTime-series data object.
time_series.ai_trafficObject ArrayNoMonthly AI traffic series. Each item has date (YYYY-MM) and value float fields.
time_series.ai_traffic[].dateStringNoMonth in YYYY-MM format.
time_series.ai_traffic[].valueNumberNoFloat value for the month.
time_series.link_presenceObject ArrayNoMonthly link presence series. Each item has date (YYYY-MM) and value float fields.
time_series.link_presence[].dateStringNoMonth in YYYY-MM format.
time_series.link_presence[].valueNumberNoFloat value for the month.
time_series.organic_trafficObject ArrayNoMonthly organic traffic series. Each item has date (YYYY-MM) and value float fields.
time_series.organic_traffic[].dateStringNoMonth in YYYY-MM format.
time_series.organic_traffic[].valueNumberNoFloat value for the month.
time_series.overall_trafficObject ArrayNoMonthly overall traffic series. Each item has date (YYYY-MM) and value float fields.
time_series.overall_traffic[].dateStringNoMonth in YYYY-MM format.
time_series.overall_traffic[].valueNumberNoFloat value for the month.
time_series.average_positionObject ArrayNoMonthly average position series. Each item has date (YYYY-MM) and value float fields.
time_series.average_position[].dateStringNoMonth in YYYY-MM format.
time_series.average_position[].valueNumberNoFloat value for the month.

Query parameters

Name
Type
Description
brandOPTIONAL
string
scopeOPTIONAL
string
domain · base_domain · url
DEFAULT base_domain
sourceREQUIRED
string
targetREQUIRED
string
▣ ENDPOINT 04 / 06
POST
Compare Brand vs Competitors (AI Leaderboard)
https://api.eu.apyhub.com/se-ranking/ai-search/v1/ai-search/overview/leaderboard

QUICKSTART

GUIDE

Quickstart

Compare one primary brand against at least one competitor across selected AI engines.

curl -X POST "https://api.eu.apyhub.com/se-ranking/ai-search/v1/ai-search/overview/leaderboard" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "source": "us",
    "engines": ["ai-overview"],
    "primary": {
      "brand": "SE Ranking",
      "target": "seranking.com"
    },
    "competitors": [
      { "brand": "Semrush", "target": "semrush.com" }
    ]
  }'

What you'll get back

Returns a JSON object with three top-level fields: results is an object keyed by domain, then by engine; leaderboard is an array of ranked result objects; and request_metadata is an object summarizing the request context.

{
  "results": {},
  "leaderboard": [
    {
      "rank": 1,
      "domain": "example.com",
      "link_presence": 1,
      "brand_presence": 1,
      "share_of_voice": 0.75,
      "is_primary_target": true
    }
  ],
  "request_metadata": {
    "source": "example.com",
    "engines": ["ai-overview"],
    "primary": "Example",
    "competitors": ["Competitor"]
  }
}
TRY ITLIVE · 40000 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body
engines*
primary*
competitors*
competitors-1*

About this endpoint

What it does

Returns an AI search leaderboard for a primary target and up to 10 competitors, using the requested source and engines. The response includes a domain-by-engine results map, a ranked leaderboard, and request metadata echoing the submitted inputs.

Request Body

ParameterTypeMandatoryDescription
scopeENUMNoScope used for matching targets. Allowed values: domain, base_domain, url. Default: base_domain.
sourceStringYesSource identifier to use for the leaderboard request.
enginesString ArrayYesAI search engines to include. Each item is a string, for example ai-overview, chatgpt, perplexity, gemini, ai-mode.
primaryObjectYesPrimary target definition. Use primary.brand and primary.target for the nested values.
primary.brandStringNoBrand name for the primary target.
primary.targetStringNoTarget value for the primary entry.
competitorsObject ArrayYesCompetitor target definitions. Array items contain brand and target. Minimum items: 1. Maximum items: 10.
competitors[].brandStringNoBrand name for a competitor.
competitors[].targetStringNoTarget value for a competitor.

Response

Returns a JSON object with three top-level fields: results is an object keyed by domain, then by engine; leaderboard is an array of leaderboard entries; and request_metadata is an object echoing the request context. The success response shape is therefore an object wrapper with these three fields.

ParameterTypeMandatoryDescription
resultsObjectNoKeyed by domain, then by engine. Each engine entry contains link_presence and brand_presence integer fields.
leaderboardObject ArrayNoRanked leaderboard entries. Each item includes rank, domain, link_presence, brand_presence, share_of_voice, and is_primary_target.
request_metadataObjectNoEchoes request metadata. Contains source, engines, primary, and competitors.

Body

Name
Type
Description
bodyOPTIONAL
object
▣ ENDPOINT 05 / 06
GET
prompts by target
https://api.eu.apyhub.com/se-ranking/ai-search/v1/ai-search/prompts-by-target

QUICKSTART

GUIDE

Quickstart

Fetch prompts for a target search term with the required query parameters.

curl -X GET "https://api.eu.apyhub.com/se-ranking/ai-search/v1/ai-search/prompts-by-target?engine=ai-mode&target=seranking.com&source=us&scope=base_domain" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with date as a string date, total as an integer, and prompts as an array of objects. Each prompt object can include type, answer (with text and links), prompt, and volume.

{
  "date": "2026-07-27",
  "total": 1,
  "prompts": [
    {
      "type": "Link",
      "answer": {
        "text": "Some example answer",
        "links": ["https://example.com"]
      },
      "prompt": "ai search prompts",
      "volume": 100
    }
  ]
}
TRY ITLIVE · 10000 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Returns a list of prompts for the specified engine, target, source, and scope, with optional sorting, pagination, and volume/keyword/character filters applied.

Query Parameter(s)

AttributeTypeMandatoryDescription
engineStringYesThe search engine identifier.
targetStringYesThe target query/value to search prompts for.
sourceStringYesThe source query/value used for the search.
scopeENUMYesScope used for matching.<br>- domain<br>- base_domain (default)<br>- url
sortENUMNoSort field.<br>- volume (default)<br>- type<br>- snippet_length
limitIntegerNoMaximum number of prompts to return. Default: 100. Maximum: 1000.
offsetIntegerNoNumber of records to skip. Default: 0.
sort_orderENUMNoSort direction.<br>- asc<br>- desc (default)
filter[volume][from]IntegerNoMinimum volume value to include.
filter[volume][to]IntegerNoMaximum volume value to include.
filter[keyword_count][from]IntegerNoMinimum keyword count to include.
filter[keyword_count][to]IntegerNoMaximum keyword count to include.
filter[characters_count][from]IntegerNoMinimum character count to include.
filter[characters_count][to]IntegerNoMaximum character count to include.
filter[multi_keyword_included]StringNoFilter by multi-keyword inclusion.
filter[multi_keyword_excluded]StringNoFilter by multi-keyword exclusion.

Response

Returns a JSON object with date as a string in date format, total as an integer, and prompts as an array of objects. Each prompt object includes type as a string, answer as an object, prompt as a string, and volume as an integer.

ParameterTypeMandatoryDescription
dateStringNoResponse date in date format.
totalIntegerNoTotal number of prompts returned or matched.
promptsObject ArrayNoArray of prompt objects. Each item contains type, answer, prompt, and volume.
prompts[].typeStringNoPrompt type, e.g. Link or Brand.
prompts[].answerObjectNoAnswer object containing text and links.
prompts[].answer.textStringNoAnswer text.
prompts[].answer.linksString ArrayNoLinks associated with the answer.
prompts[].promptStringNoThe prompt text.
prompts[].volumeIntegerNoPrompt volume.

Query parameters

Name
Type
Description
sortOPTIONAL
string
volume · type · snippet_length
DEFAULT volume
limitOPTIONAL
integer
DEFAULT 100
scopeREQUIRED
string
domain · base_domain · url
DEFAULT base_domain
engineREQUIRED
string
offsetOPTIONAL
integer
DEFAULT 0
sourceREQUIRED
string
targetREQUIRED
string
sort_orderOPTIONAL
string
asc · desc
DEFAULT desc
filter[volume][to]OPTIONAL
integer
filter[volume][from]OPTIONAL
integer
filter[keyword_count][to]OPTIONAL
integer
filter[keyword_count][from]OPTIONAL
integer
filter[characters_count][to]OPTIONAL
integer
filter[characters_count][from]OPTIONAL
integer
filter[multi_keyword_excluded]OPTIONAL
string
filter[multi_keyword_included]OPTIONAL
string
▣ ENDPOINT 06 / 06
GET
prompts by brand
https://api.eu.apyhub.com/se-ranking/ai-search/v1/ai-search/prompts-by-brand

QUICKSTART

GUIDE

Quickstart

Fetch brand-related prompts by passing the required query parameters for engine, brand, and source.

curl -X GET "https://api.eu.apyhub.com/se-ranking/ai-search/v1/ai-search/prompts-by-brand?engine=perplexity&brand=SE%20Ranking&source=us" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with date as a string in YYYY-MM-DD format, total as an integer, and prompts as an array of prompt objects.

Each prompt object can include type (string), answer (object with text and links), prompt (string), and volume (integer).

{
  "date": "2026-07-27",
  "total": 1,
  "prompts": [
    {
      "type": "Brand",
      "answer": {
        "text": "Example answer",
        "links": ["https://example.com"]
      },
      "prompt": "Example prompt",
      "volume": 100
    }
  ]
}
TRY ITLIVE · 10000 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Returns a list of prompts for a given brand and source, with optional sorting and filtering applied through query parameters. The response includes the report date, the total number of prompts, and an array of prompt objects.

Query Parameter(s)

AttributeTypeMandatoryDescription
engineStringYesSearch engine to query.
brandStringYesBrand to retrieve prompts for.
sourceStringYesSource to retrieve prompts from.
sortENUMNoSort field. Allowed values: volume, type, snippet_length. Default: volume.
limitIntegerNoMaximum number of results to return. Default: 100. Maximum: 1000.
offsetIntegerNoNumber of results to skip before returning records. Default: 0.
sort_orderENUMNoSort direction. Allowed values: asc, desc. Default: desc.
filter[volume][to]IntegerNoUpper bound for volume.
filter[volume][from]IntegerNoLower bound for volume.
filter[keyword_count][to]IntegerNoUpper bound for keyword_count.
filter[keyword_count][from]IntegerNoLower bound for keyword_count.
filter[characters_count][to]IntegerNoUpper bound for characters_count.
filter[characters_count][from]IntegerNoLower bound for characters_count.
filter[multi_keyword_excluded]StringNoFilter prompts by excluded multi-keyword value.
filter[multi_keyword_included]StringNoFilter prompts by included multi-keyword value.

Response

Returns a JSON object with date as a string in date format, total as an integer, and prompts as an array of objects. Each item in prompts contains type as a string, answer as an object with text and links, prompt as a string, and volume as an integer.

AttributeTypeMandatoryDescription
dateStringNoReport date in date format.
totalIntegerNoTotal number of prompts returned.
promptsObject ArrayNoArray of prompt objects.
prompts[].typeStringNoPrompt type, for example Link or Brand.
prompts[].answerObjectNoAnswer details.
prompts[].answer.textStringNoAnswer text.
prompts[].answer.linksString ArrayNoLinks associated with the answer.
prompts[].promptStringNoPrompt text.
prompts[].volumeIntegerNoPrompt volume.

Query parameters

Name
Type
Description
sortOPTIONAL
string
volume · type · snippet_length
DEFAULT volume
brandREQUIRED
string
limitOPTIONAL
integer
DEFAULT 100
engineREQUIRED
string
offsetOPTIONAL
integer
DEFAULT 0
sourceREQUIRED
string
sort_orderOPTIONAL
string
asc · desc
DEFAULT desc
filter[volume][to]OPTIONAL
integer
filter[volume][from]OPTIONAL
integer
filter[keyword_count][to]OPTIONAL
integer
filter[keyword_count][from]OPTIONAL
integer
filter[characters_count][to]OPTIONAL
integer
filter[characters_count][from]OPTIONAL
integer
filter[multi_keyword_excluded]OPTIONAL
string
filter[multi_keyword_included]OPTIONAL
string
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.