format=context option returns markdown with YAML frontmatter instead — see context format below.
Top-level fields
Locale
locale is on every search response, in every format. It reports the language and country Andi used.
format=context, the same values appear in the document frontmatter as language, language_confidence, language_source, country and local_scope.
Type-specific arrays
When the search finds items of these kinds, the response adds them as extra arrays alongsideresults — for any query, not only queries with a matching intent.
citations and categories are left out when empty. With format=context, each appears as its own section.
Citations. When a search names a whole curated news feed (“headlines”, “ai news”, “latest news from hacker news”) and the response carries the feed’s aiSummary, citations lists the stories the summary cites, in the summary’s order, then the feed’s other stories, up to limit. On these searches the feed’s stories also lead results (after any instant answer and site card), in feed order, followed by outlet front pages. Other searches have no citations yet.
News and categories. news holds stories only. Front pages, section pages, topic or tag pages, listing pages and site-search pages go in categories. results still holds both. categories is not on news feeds.
Search results
Each result in theresults array has this structure:
Fields added by metadata=full
These fields appear on results when you pass metadata=full. They are not included in the default metadata=basic response.
Page access fields
Withmetadata=full, each result’s reader object describes two things about the page. These fields are only set when Andi has read the page.
What the publisher shows a visitor
What Andi retrieved
These two groups are independent. A page can be gated (
paywall-hard) while Andi still holds the full text, and paywall-soft with completeContent: true is common. Each label is measured per article; two pages on the same site can differ.
Use completeContent and usefulContent to decide whether you can show or summarise the text. Use contentAccess to show a lock badge or warn your user they may hit a paywall on click.
Dead, moved and removed pages
Search indexes keep pages after a site goes offline. When Andi knows a site or page has a problem, the result carries anavailability object. Healthy results have none. The link is always the original address and never changes.
When a saved copy exists,
archive lists the copies of that exact page, newest first. Use the first entry unless you have a reason not to.
archive[0] when it has a url.
Accessing key fields
Result types
Thetype field indicates the kind of result:
Instant answers
Some queries trigger instant answers alongside regular results.Weather
Queries about weather return aweather object:
units parameter to get results in metric or imperial. The default is auto-detected from the country parameter. weather.timestamp is the time of the reading in Unix epoch milliseconds. The answer line and the regular web results come back alongside the weather object.
Wind speed is km/h (metric) or mph (imperial). visibility is km (metric) or miles (imperial). weatherCode always uses the WMO code set. location.country is a two-letter country code, with region (state or province, when known) and countryName beside it. timezone, utcOffsetMinutes, isDay, sunrise and sunset are the place’s own clock. uvIndex is present when known.
If you ask about a day (“weather on friday”, “tomorrow”, “this weekend”, a date), the object adds requested (the day or days asked for) and forecast, one entry per day with date, high, low, weatherCode, icon, precipitationChance, windSpeedMax, sunrise and sunset. When only current conditions can be given for that day (or it is too far ahead), available is "current" and the block is not the answer to the question.
Calculation
Mathematical queries return acalculation object:
Image results
Image results
Image queries return an Image results include
images array with thumbnail and dimension data:thumbnail (thumbnail URL), width, and height as string values.Data blocks
Some instant answers add a typed block at the top level of the response, besideresults. Each block is sent once: result rows never repeat it, and answer_metadata.block names the one that holds the answer’s data. A time or currency answer sends its own block and no calculation. The results_type is TimeZone for a clock answer, Currency for a conversion and Answer for a translation (Translation when the translation is left for you to write).
Each block has these fields:
On a league or team search,
score is the lead game and score.games lists the other games in the same shape, nearest start first. A block never replaces results. Regular web results come back with it.
A quote block shows close (the regular-session price) when the market is not open, and extendedPrice and extendedChange (the after-hours price and its change from the close) while marketState is post.
A
translation block has a method only when it is deferred (below). A request that is not really a translation (“write a polite email in french”) returns no translation block.
When a request needs tone, context or an idiom read with care but the search has no time left to write it (for example searchMode=fast), the block has method: "deferred" and no text, and results_type is Translation. The block carries sourceText and the target language (to, toCode). Write the translation yourself, for example with your own model. If one of the result pages states the translation, its words come back as answer, with the page in answer_metadata.citations, so you have something to show while yours is written. To get the finished translation from the API instead, use searchMode=balanced, auto or deeper, or a larger timeout.
A quote block carries refresh while the market is open, pre or post. A score block carries it while the game is live or at half-time. To update that one block, send its value to GET /api/v1/data/refresh:
{ "quote": { ... } } or { "score": { ... } }, plus asOf and metrics. Call it at most once a minute. Errors: 400 for a missing or invalid ref, 404 when no live data matches it, and 503 with a Retry-After header when the figures cannot be read. The cost is in metrics.cost_dollars and the X-Andi-Cost-Dollars header.
Stocks and sports
Questions about a company’s share price, a market index or a sports result can return a live data answer. The answer line comes back inanswer, and the figures in a quote block (a stock) or a score block (a game), sent once at the top level; answer_metadata.block names which one. Result rows do not repeat the block. See Data blocks for the fields every block shares (source, asOf, stale, refresh).
quote block with "kind": "index"; a company’s shares carry no kind.
In format=context, the <answer> block carries as_of, the publisher as source, stale="true" when the figures are old, and one line of key figures. Data answers run in fast, balanced, deep and exhaustive mode, and through auto. They are not part of instant or low-cost.
Parsing tips
- Check
results_typefirst to know the response shape before accessing type-specific fields resultsis always an array. Instant answers (weather, calculations) come with regular web results as welldescvssnippet:descis the page’s general description;snippetis a query-relevant excerpt (when available)answerat top level is the instant answer text when one is found (otherwise an empty string);answeron individual results is an inline answer for instant answer result typeslead: whenansweris empty on a web or news search,leadmay carry a quote from a top result and its link. Show it as a quote from that source, not as an answer.- Optional fields (
date,image,snippet,extracts) may not be present on every result — always check before accessing
Search intents
Theresults_type and type fields reflect what kind of search was performed. You can force an intent with the intent parameter, or let the API auto-detect it.
Common intent aliases:
See query parameters for the full list of intent aliases.
Metrics
The response always includes ametrics object with performance and billing data:
Warnings
When the API adjusts or ignores part of your request, the response says so instead of failing. JSON responses carry awarnings array of strings. format=context responses carry one warning line each in the frontmatter. The search, news and fetch endpoints add a warning when:
- A parameter name is unknown, or is not used by that endpoint. It is ignored.
- A value is invalid and the default is used instead, for example a
limitthat is not a positive number or adateRangethe API does not recognise. - A value is lowered to a limit, for example
maxContentLengthon fetch. contenthas a value the API does not recognise. The API treats it asfalse.searchMode=instantlowers alimitabove 10 to 10, or ignores a request for page content or extracts.
Context format
Withformat=context, the API returns results as markdown with YAML frontmatter instead of JSON. This format is sized for LLM context windows and can be passed directly to a language model without JSON parsing.
Document-level frontmatter
The response starts with a YAML frontmatter block describing the search:
When the response has a news summary (
aiSummary), it follows the frontmatter as a ## Summary block, before the first result.
Answer block
When one of the top results states the answer to a question, an<answer> block appears after the frontmatter and before the first article. Its attributes tell you where the answer came from:
kind:extractive(a quote from a result page),instant(weather, calculation, a facts panel), orllm(key points from a news summary).cited: the URL of each result the answer came from, separated by spaces.rank,source,title,date: the cited result’s position in this response, its site name, its title, and its date. Each is present only when known.
results_type: "Extracted Answer". Quotes use the page’s own words. Leading headings, bylines, and labels are removed; nothing else is changed. If no clear answer exists, the block is absent.
Index block
With theagent preset, an <index> block appears after the answer and entity blocks, before the first article. It lists what the reply holds, so an agent can plan its next step without reading every article:
Per-result structure
Each result renders as an<article> block with its own frontmatter:
language line (the page’s language) and a site_country line appear when known. With metadata=full, the reader’s lang line takes the place of language. A source line appears in the frontmatter only when the display source differs from the domain in the <article> tag. A date_modified line appears when the page’s last-updated date is known. With metadata=full, each article’s frontmatter adds domain, publisher, type, content_type, lang, word_count, image, keywords, and summary when available. For a research paper, an abstract line (the paper’s complete abstract) takes the place of description on articles shown with page text or extracts and at metadata=full, when the text shown does not already include it.
Each article that holds a quoted answer to the question shows it as an **Answer:** line before the page text. The article cited by the top <answer> block does not repeat it.
When an article shows less page text than the page holds (cut to fit the token budget, or focused to the parts that answer the query), its header carries truncated: true, shown_words, and total_words. Fetch the page’s URL for the rest. JSON results carry the same three fields, with or without maxTokens.
An article header carries the result’s snippet and description at every metadata level, unless they repeat each other or the answer block. Extracts stay on an article that also shows page content; within a token budget, up to three.
Three lines tell you how far to trust what the article holds. They appear at every metadata level and only when they apply:
access: how the page is gated when it is not openly readable. For examplepaywall-hard,paywall-stub,login, orprivate. Treat the text as a teaser.complete_content: false: only part of the page is available.kind: what sort of page it is when it is not ordinary reporting. For exampleopinion,satire,press-release, or a business-event kind such asfundingoracquisition.
metadata=full, an article also carries the page’s structured facts when available: <faq>, <items>, <breadcrumbs>, <events> (the page’s own event listings: name, when, where, status, price, and link, at most 5), and <images>.
Type-specific sections
The same type-specific groups the JSON response carries as additional arrays render as trailing sections after the main results, so a context-format caller sees everything a JSON caller would. Sections appear only when the group has results, in this order:Academic results, News results, Video results, Social results, Place results, Profile results. (images is JSON-only.)
Each section is a markdown heading followed by a compact item list — title, url, and when available date, source, description, and duration for videos:
<article> results are not repeated in these sections.
Extracts in context format
extracts defaults to on for format=context and for content=true (the opposite of plain JSON, where it defaults to off). To disable extracts in those cases, pass extracts=false.
Next steps
Query parameters
Full parameter reference.
Content retrieval
Fetch full page content from any URL.
RAG pipeline
Use search results as LLM context.
Build with AI agents
MCP server and agent integration.

