Skip to main content
The API returns JSON by default. The format=context option returns markdown with YAML frontmatter instead — see context format below.
The results_type field tells you the shape of the response. Use it to determine which arrays and objects are present — for example, results_type: "Weather" means a weather object is included.

Top-level fields

Locale

locale is on every search response, in every format. It reports the language and country Andi used.
With 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 alongside results — 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 the results 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

With metadata=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 an availability 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.
A dead site or removed page with no saved copy is left out of results, unless your search names that site. Sites that are only likely dead stay in the results, ranked lower. To show a “cached copy” link, use archive[0] when it has a url.

Accessing key fields

Result types

The type field indicates the kind of result:

Instant answers

Some queries trigger instant answers alongside regular results.

Weather

Queries about weather return a weather object:
Use the 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.

Calculation

Mathematical queries return a calculation object:
Image queries return an images array with thumbnail and dimension data:
Image results include thumbnail (thumbnail URL), width, and height as string values.

Parsing tips

  • Check results_type first to know the response shape before accessing type-specific fields
  • results is always an array. Instant answers (weather, calculations) come with regular web results as well
  • desc vs snippet: desc is the page’s general description; snippet is a query-relevant excerpt (when available)
  • answer at top level is the instant answer text when one is found (otherwise an empty string); answer on individual results is an inline answer for instant answer result types
  • Optional fields (date, image, snippet, extracts) may not be present on every result — always check before accessing

Search intents

The results_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 a metrics object with performance and billing data:

Context format

With format=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 pre-written news summary (aiSummary), it follows the frontmatter as a ## Summary block, before the first result.

Per-result structure

Each result renders as an <article> block with its own frontmatter:
A 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.

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:
Items already present in the main <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.