apyhub
Back
▣ ARTIFICIAL INTELLIGENCE · MARKETING

Analyze AI Search Performance API

What it does

The AI Visibility API measures how a brand or domain shows up in AI search answers. Send a target domain, a source market, and an engine, and get back JSON with brand presence, link presence, average position, and monthly time series.

Six endpoints cover the workflow. Discover Brand returns the brand names tied to a domain. The overview endpoints report trends for one engine or for all engines combined. The leaderboard compares your brand against 1 to 10 competitors and returns a ranked list with share_of_voice. Prompts by Target and Prompts by Brand list the prompts where you appear, with answer text, links, and volume, sortable and filterable up to 1,000 rows per call. Set scope to domain, base_domain, or url to control matching. Engine values include chatgpt, perplexity, gemini, ai-overview, and ai-mode.

SEO teams use this AI visibility API for AI visibility tracking in client reports, share-of-voice benchmarks, and finding prompts where a brand is missing. Agencies use it as an AI search visibility API that adds LLM visibility metrics to existing dashboards.

AI agents can call it through ApyHub MCP to answer brand-monitoring questions on demand.

Find rivals to benchmark with the Competitor Analysis API, compare classic search performance with the Domain Analysis API, and check AI overviews on the live results page with the SERP API.

▣ 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)

AttributeTypeDescription
brandStringBrand identifier or name.
scopeENUMScope for the comparison. Allowed values: domain, base_domain, url. Default: base_domain.
engineStringAI search engine to query.
sourceStringSource to compare from.
targetStringTarget 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.

ParameterTypeDescription
summaryObjectSummary metrics object.
summary.link_presenceObjectLink presence metrics with current, previous, change_percent, and change_absolute number fields.
summary.brand_presenceObjectBrand presence metrics with current, previous, change_percent, and change_absolute number fields.
summary.average_positionObjectAverage position metrics with current, previous, change_percent, and change_absolute number fields.
summary.ai_opportunity_trafficObjectAI opportunity traffic metrics with current, previous, change_percent, and change_absolute number fields.
time_seriesObjectTime-series data object.
time_series.ai_trafficObject ArrayArray of { date, value } objects. date is a string in YYYY-MM format and value is a float.
time_series.link_presenceObject ArrayArray of { date, value } objects. date is a string in YYYY-MM format and value is a float.
time_series.organic_trafficObject ArrayArray of { date, value } objects. date is a string in YYYY-MM format and value is a float.
time_series.overall_trafficObject ArrayArray of { date, value } objects. date is a string in YYYY-MM format and value is a float.
time_series.average_positionObject ArrayArray of { date, value } objects. date is a string in YYYY-MM format and value is a float.
▣ 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)

AttributeTypeDescription
scopeStringScope used for discovery. Allowed values: domain, base_domain, url. Default: base_domain.
sourceStringSource string used by the discovery process.
targetStringTarget string used by the discovery process.

Response

Returns a JSON object with a brands string array field.

AttributeTypeDescription
brandsString ArrayArray of brand names discovered by the endpoint.
▣ 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)

AttributeTypeDescription
brandStringOptional brand filter.
scopeENUMScope of the lookup. Allowed values: domain, base_domain, url. Default: base_domain.
sourceStringSource identifier to aggregate from.
targetStringTarget 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.

ParameterTypeDescription
summaryObjectSummary metrics object.
summary.link_presenceObjectLink presence summary with current, previous, change_percent, and change_absolute float fields.
summary.link_presence.currentNumberCurrent float value.
summary.link_presence.previousNumberPrevious float value.
summary.link_presence.change_percentNumberFloat change percentage.
summary.link_presence.change_absoluteNumberFloat absolute change.
summary.brand_presenceObjectBrand presence summary with current, previous, change_percent, and change_absolute float fields.
summary.brand_presence.currentNumberCurrent float value.
summary.brand_presence.previousNumberPrevious float value.
summary.brand_presence.change_percentNumberFloat change percentage.
summary.brand_presence.change_absoluteNumberFloat absolute change.
summary.average_positionObjectAverage position summary with current, previous, change_percent, and change_absolute float fields.
summary.average_position.currentNumberCurrent float value.
summary.average_position.previousNumberPrevious float value.
summary.average_position.change_percentNumberFloat change percentage.
summary.average_position.change_absoluteNumberFloat absolute change.
summary.ai_opportunity_trafficObjectAI opportunity traffic summary with current, previous, change_percent, and change_absolute float fields.
summary.ai_opportunity_traffic.currentNumberCurrent float value.
summary.ai_opportunity_traffic.previousNumberPrevious float value.
summary.ai_opportunity_traffic.change_percentNumberFloat change percentage.
summary.ai_opportunity_traffic.change_absoluteNumberFloat absolute change.
time_seriesObjectTime-series data object.
time_series.ai_trafficObject ArrayMonthly AI traffic series. Each item has date (YYYY-MM) and value float fields.
time_series.ai_traffic[].dateStringMonth in YYYY-MM format.
time_series.ai_traffic[].valueNumberFloat value for the month.
time_series.link_presenceObject ArrayMonthly link presence series. Each item has date (YYYY-MM) and value float fields.
time_series.link_presence[].dateStringMonth in YYYY-MM format.
time_series.link_presence[].valueNumberFloat value for the month.
time_series.organic_trafficObject ArrayMonthly organic traffic series. Each item has date (YYYY-MM) and value float fields.
time_series.organic_traffic[].dateStringMonth in YYYY-MM format.
time_series.organic_traffic[].valueNumberFloat value for the month.
time_series.overall_trafficObject ArrayMonthly overall traffic series. Each item has date (YYYY-MM) and value float fields.
time_series.overall_traffic[].dateStringMonth in YYYY-MM format.
time_series.overall_traffic[].valueNumberFloat value for the month.
time_series.average_positionObject ArrayMonthly average position series. Each item has date (YYYY-MM) and value float fields.
time_series.average_position[].dateStringMonth in YYYY-MM format.
time_series.average_position[].valueNumberFloat value for the month.
▣ 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

ParameterTypeDescription
scopeENUMScope used for matching targets. Allowed values: domain, base_domain, url. Default: base_domain.
sourceStringSource identifier to use for the leaderboard request.
enginesString ArrayAI search engines to include. Each item is a string, for example ai-overview, chatgpt, perplexity, gemini, ai-mode.
primaryObjectPrimary target definition. Use primary.brand and primary.target for the nested values.
primary.brandStringBrand name for the primary target.
primary.targetStringTarget value for the primary entry.
competitorsObject ArrayCompetitor target definitions. Array items contain brand and target. Minimum items: 1. Maximum items: 10.
competitors[].brandStringBrand name for a competitor.
competitors[].targetStringTarget 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.

ParameterTypeDescription
resultsObjectKeyed by domain, then by engine. Each engine entry contains link_presence and brand_presence integer fields.
leaderboardObject ArrayRanked leaderboard entries. Each item includes rank, domain, link_presence, brand_presence, share_of_voice, and is_primary_target.
request_metadataObjectEchoes request metadata. Contains source, engines, primary, and competitors.
▣ 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)

AttributeTypeDescription
engineStringThe search engine identifier.
targetStringThe target query/value to search prompts for.
sourceStringThe source query/value used for the search.
scopeENUMScope used for matching.
- domain
- base_domain (default)
- url
sortENUMSort field.
- volume (default)
- type
- snippet_length
limitIntegerMaximum number of prompts to return. Default: 100. Maximum: 1000.
offsetIntegerNumber of records to skip. Default: 0.
sort_orderENUMSort direction.
- asc
- desc (default)
filter[volume][from]IntegerMinimum volume value to include.
filter[volume][to]IntegerMaximum volume value to include.
filter[keyword_count][from]IntegerMinimum keyword count to include.
filter[keyword_count][to]IntegerMaximum keyword count to include.
filter[characters_count][from]IntegerMinimum character count to include.
filter[characters_count][to]IntegerMaximum character count to include.
filter[multi_keyword_included]StringFilter by multi-keyword inclusion.
filter[multi_keyword_excluded]StringFilter 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.

ParameterTypeDescription
dateStringResponse date in date format.
totalIntegerTotal number of prompts returned or matched.
promptsObject ArrayArray of prompt objects. Each item contains type, answer, prompt, and volume.
prompts[].typeStringPrompt type, e.g. Link or Brand.
prompts[].answerObjectAnswer object containing text and links.
prompts[].answer.textStringAnswer text.
prompts[].answer.linksString ArrayLinks associated with the answer.
prompts[].promptStringThe prompt text.
prompts[].volumeIntegerPrompt volume.
▣ 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)

AttributeTypeDescription
engineStringSearch engine to query.
brandStringBrand to retrieve prompts for.
sourceStringSource to retrieve prompts from.
sortENUMSort field. Allowed values: volume, type, snippet_length. Default: volume.
limitIntegerMaximum number of results to return. Default: 100. Maximum: 1000.
offsetIntegerNumber of results to skip before returning records. Default: 0.
sort_orderENUMSort direction. Allowed values: asc, desc. Default: desc.
filter[volume][to]IntegerUpper bound for volume.
filter[volume][from]IntegerLower bound for volume.
filter[keyword_count][to]IntegerUpper bound for keyword_count.
filter[keyword_count][from]IntegerLower bound for keyword_count.
filter[characters_count][to]IntegerUpper bound for characters_count.
filter[characters_count][from]IntegerLower bound for characters_count.
filter[multi_keyword_excluded]StringFilter prompts by excluded multi-keyword value.
filter[multi_keyword_included]StringFilter 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.

AttributeTypeDescription
dateStringReport date in date format.
totalIntegerTotal number of prompts returned.
promptsObject ArrayArray of prompt objects.
prompts[].typeStringPrompt type, for example Link or Brand.
prompts[].answerObjectAnswer details.
prompts[].answer.textStringAnswer text.
prompts[].answer.linksString ArrayLinks associated with the answer.
prompts[].promptStringPrompt text.
prompts[].volumeIntegerPrompt volume.
▣ 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.