Skip to content

New AI assistant answers: ChatGPT, Gemini, Copilot and AI Mode by API

SerpKite
Get API key

POST /v1/answer

AI Search API

Ground your model in Google search with one call. Send a question and get a short answer written by Claude, where every claim cites a numbered source from the live results and the pages it read. Stream it over Server-Sent Events, or pass a JSON Schema and get JSON back.

Get a free API key Read the reference
8 credits per answer at depth=standard with 3 pages (3 at fast); the model part is refunded if it fails 2,500 free credits, no card Failed calls are free

Overview

What the AI Search API does

POST /v1/answer runs a Google search for q, then Claude Haiku 5.5 answers using only the numbered sources. depth: "fast" answers from the results page (snippets, answer box, knowledge panel) for 3 credits. depth: "standard" (the default) also reads the top num_sources pages (3 by default, up to 5) and answers from their query-ranked passages, for 8 credits at the default.

It is web search grounding for LLMs, without wiring up search, scraping and prompting yourself: every claim carries a [n] marker that resolves to citations[] (title, link, domain), markers that point past the sources are dropped, and instructions inside a page are ignored. All the search filters apply: country, language, location, time, include_domains, exclude_domains, boost_domains, start_date, end_date and engine.

Already calling /v1/search or /v1/news? Add include_answer: true and the same response carries a cited answer over its results, for +2 credits, or +4 when it also reads pages with include_content. If the model fails, the model part is refunded and the response says why.

What you get

request object
The normalised request, with defaults filled in: endpoint, engine, q, country, language, location, num, page, device, autocorrect…
answer string | null
Markdown with [n] citation markers. Null with output_schema, or when there was nothing to answer from.
output any
With output_schema: the JSON value matching your schema.
citations[] array
The sources the answer cites, in first-cited order: index, title, link, domain.
results[] array
Every source the answer could cite, numbered as in the prompt ([index]): index, title, link, domain, date.
meta object
As on /v1/search, plus credits (search and answer parts) and llm (provider, model, input_tokens, output_tokens).

Request

curl https://api.serpkite.com/v1/answer \
  -H "Authorization: Bearer $SERPKITE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"q":"what is retrieval-augmented generation","depth":"standard","num_sources":3}'

Response (illustrative, placeholder domains)

200 OK · application/json
{
  "request": {
    "endpoint": "answer",
    "engine": "google",
    "q": "what is retrieval-augmented generation",
    "country": "us",
    "language": "en",
    "depth": "standard",
    "num_sources": 3
  },
  "answer": "Retrieval-augmented generation (RAG) grounds a language model's answer in documents retrieved at query time [1], which reduces hallucinations and keeps answers current without retraining [2].",
  "citations": [
    {
      "index": 1,
      "title": "Retrieval-augmented generation",
      "link": "https://en.wikipedia.org/wiki/Retrieval-augmented_generation",
      "domain": "en.wikipedia.org"
    },
    {
      "index": 2,
      "title": "What is retrieval-augmented generation (RAG)?",
      "link": "https://www.example.com/blog/what-is-rag",
      "domain": "example.com"
    }
  ],
  "results": [
    {
      "index": 1,
      "title": "Retrieval-augmented generation",
      "link": "https://en.wikipedia.org/wiki/Retrieval-augmented_generation",
      "domain": "en.wikipedia.org"
    },
    {
      "index": 2,
      "title": "What is retrieval-augmented generation (RAG)?",
      "link": "https://www.example.com/blog/what-is-rag",
      "domain": "example.com"
    }
  ],
  "meta": {
    "request_id": "req_01J8ZK4M6Q2V7",
    "credits_used": 8,
    "cached": false,
    "engine": "google",
    "latency_ms": 4410,
    "parse_quality": "ok",
    "resolved_urls": true,
    "credits": {
      "search": 4,
      "answer": 4
    },
    "llm": {
      "provider": "anthropic",
      "model": "claude-haiku-5-5",
      "input_tokens": 3120,
      "output_tokens": 88
    }
  }
}

Every response also carries X-Credits-Used, X-Credits-Remaining, X-Cache and X-Tokens-Estimate headers. Full endpoint reference

Reference

Parameters

The fields /v1/answer accepts in its JSON body.

AI Search API parameters
Name Type Default Description
q required string – The question, up to 2,048 characters.
depth string standard fast answers from the results page; standard also reads the top pages. Values: fast, standard.
num_sources integer 3 Pages to read, 1–5, with depth: "standard" only. +1 credit per page read.
stream boolean false Send Server-Sent Events (results, delta…, then done or error) instead of one JSON body.
output_schema object – A JSON Schema (at most 16 KB). The answer comes back as JSON in output. Not with stream.
country string us Country to search from, as a two-letter ISO code (us, gb, de, in…). Defaults to the country a location ends in.
language string en Interface language, as a language code with an optional region (en, de, pt-BR, zh-TW…).
location string – Canonical location for local results, e.g. "Austin, Texas, United States". Ending in a country name also sets country.
time string – Restrict to recent results. Shorthand for tbs=qdr:*. Values: hour, day, week, month, year.
include_domains string[] – Only results from these sources, up to 20: a domain (example.com, subdomains match), a path prefix (github.com/org) or a TLD (.gov). Compiled to site: operators and enforced on the results. Search, news, images, videos.
exclude_domains string[] – Drop results from these sources, up to 20, same formats as include_domains. Search, news, images, videos.
boost_domains string[] – Move results from these sources to the top without filtering out the rest, up to 20. Search and news.
start_date string – Only results published on or after this date (YYYY-MM-DD). Google's custom date range; can't be combined with time or tbs.
end_date string – Only results published on or before this date (YYYY-MM-DD).
engine string or array google Which search providers may answer. google is Google only (SerpKite still retries Google internally); auto falls back to other providers when Google is blocked or times out; consensus (search only) asks several independent indexes in parallel, merges the results by URL, ranks them by agreement and lists each result's sources, at the sum of one page per provider that returned results; a provider name or a list (e.g. google,brave) restricts the request to those. meta.engine names the provider that answered. Values: google, auto, consensus, brave, bing, yahoo, duckduckgo, mojeek, wikipedia, yandex.
max_age integer – Accept a cached search up to this many seconds old (the search part at half price).

Full reference, error codes and headers are in the /v1/answer reference.

Use cases

What people build with the AI Search API

01

Agent tool: answer a question

One tool call returns a grounded, cited answer instead of ten links for the agent to read.

02

Chat with citations

Stream the answer into your UI and render the [n] markers as links to the sources.

03

Facts as JSON

Pass a JSON Schema and get typed fields (dates, prices, versions) for your pipeline.

04

Fresh, scoped answers

time, start_date and include_domains pin the answer to recent or official sources.

Pricing

AI Search API pricing

Cost per call

8 credits

per answer at depth=standard with 3 pages (3 at fast); the model part is refunded if it fails

  • From $4.80 per 1,000 answers at volume.
  • Credits never expire. No subscription.
  • Failed, empty and blocked calls are refunded.
  • 2,500 free credits = 312 answers, then 1,000 credits a month.
See all pricing
AI Search API cost per pack
Pack Price Per 1k credits Per 1k answers Answers per pack
Starter $10 $1.00 $8.00 1,250
Growth $50 $0.80 $6.40 7,812
Pro $300 $0.60 $4.80 62,500

For reference, list prices checked 2026-10-03: Exa /answer $5 per 1k answers, and Brave Answers $4 per 1k searches plus token charges. SerpKite: 3 credits fast ($3.00 → $1.80 per 1k), 8 standard ($8.00 → $4.80 per 1k), on Google's results.

FAQ

AI Search API: common questions

Start building

Start with the AI Search API

2,500 free credits, then 1,000 every month. No credit card.