BetaGenerative Engine Optimization

AI Visibility API

Ask Claude Code, Codex CLI, Gemini CLI, and a direct model API the questions your customers ask. See whether they mention you, cite you, and at what position - next to your competitors.

0-100 visibility score per run
Every citation, with position
Competitors in the same answer

Beta: the endpoints and response fields below may still change before general availability.

Engines

Four engines, one request

Pick one with provider, or send all. Set search tonative for each engine's own web search, or toserply to have every engine search through Serply.

Direct API

provider: "tool"

One model call through the vendor API, with its own web search or ours. No agent harness: the baseline.

Claude Code

provider: "claude"

Anthropic's agent CLI, running headless with its WebSearch and WebFetch tools.

Codex CLI

provider: "codex"

OpenAI's agent CLI, running headless with live web search.

Gemini CLI

provider: "gemini"

Google's agent CLI, running headless with Google Search grounding.

# 1. Start a job
curl --request POST \
  --url 'https://api.serply.io/v1/geo/visibility' \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{"keywords": ["best serp api"], "url": "https://example.com", "brand": "Example", "competitors": ["competitor-a.com"], "provider": "all", "search": "native"}'

# => 202 {"job_id": "...", "status": "queued"}

# 2. Poll until status is done or failed
curl --url 'https://api.serply.io/v1/geo/jobs/JOB_ID' \
  --header 'X-Api-Key: YOUR_API_KEY'
Request body - POST /v1/geo/visibility
{
  "keywords": ["best serp api", "google search api for ai agents"],
  "url": "https://example.com",
  "brand": "Example",
  "competitors": ["competitor-a.com", "competitor-b.com"],
  "provider": "all",
  "search": "native",
  "country": "us"
}
One result - GET /v1/geo/jobs/{job_id}
{
  "provider": "claude",
  "model": "...",
  "search": "native",
  "answer": "For AI agents, Example (https://example.com/docs) ...",
  "queries": [{ "q": "best serp api 2026", "tool": "WebSearch" }],
  "citations": [
    { "url": "https://example.com/docs", "domain": "example.com", "position": 1 },
    { "url": "https://www.reddit.com/r/SEO/...", "domain": "reddit.com", "position": 2 }
  ],
  "analysis": {
    "visibility_score": 87.4,
    "you": {
      "mentioned": true,
      "cited": true,
      "citation_positions": [1]
    },
    "competitors": {
      "competitor-a.com": { "mentioned": true, "cited": false, "citation_positions": [] }
    }
  }
}

Mentioned, Cited, and Where

Each run reports whether the answer mentions your brand or domain, how early, whether it cites your site and at which positions, and whether your pages were among the sources the engine read. Those roll up into a 0-100 visibility score you can track per keyword and per engine over time.

Competitor Intelligence

Pass the domains you compete with in competitors and every answer is scored for them too: mentioned or not, cited or not, at which positions. One request tells you who the engines recommend for your keywords, and whether it is you.

Community Intelligence

Every citation comes back with its domain, and every search the engine ran comes back with its query. See which Reddit and Hacker News threads, G2 reviews, and blog posts shape the answer for your keywords - and where being part of the conversation would change it.

Frequently Asked Questions

What is the AI Visibility API?

It asks AI engines the questions your customers ask - your keywords - and reports whether the answer mentions your brand, whether it cites your site, at which position, and how your competitors fare in the same answer. Each run returns the full answer, the searches the engine ran, every citation with its domain and position, and a 0-100 visibility score.

Which engines does it query?

Three today, selected with the provider field: tool (a direct model API call), claude (Claude Code) and codex (Codex CLI), or all to run every one. Gemini CLI is coming soon. The agent CLIs run headless exactly as a developer would run them, so you see what an agent harness adds on top of a plain model call: more searches, page fetches, and different sources.

What does search=native vs search=serply mean?

native (the default) lets each engine use its own built-in web search, which is what end users see. serply swaps that for Serply search and page fetch tools, so every engine searches the same index and you can compare the engines on equal footing.

How is the visibility score calculated?

It is deterministic, from the answer text and its citations: a mention of your brand or domain, how early it appears, whether your domain is cited and how high, and whether your site appeared in the sources the engine read. 0 means the answer never mentioned or cited you.

Why is it asynchronous?

An agent engine searches, reads pages, and reasons before it answers, which can take minutes rather than milliseconds. POST /v1/geo/visibility returns a job_id straight away; poll GET /v1/geo/jobs/{job_id} until the status is done or failed.

Where do community sources come in?

Citations are reported as the engines return them, with their domain. That shows which sources shape the answer for your keywords - your own docs, a competitor's pricing page, a Reddit or Hacker News thread, a G2 review, or a blog post - so you know where being present matters.

How much does it cost?

10 credits per AI engine you select, for up to 5 keywords. One engine is 10 credits; all three engines (Direct API, Claude Code, Codex CLI) are 30. Checking on a running job is free, and it uses the same prepaid credits as the rest of the API.

See What AI Engines Say About You

Run your keywords in the playground, then wire the same request into your reporting.