exa.ai

Command Palette

Search for a command to run...

Search API for AI Concierges That Answer With Cited Web Sources

Last updated: 11/26/2026

AI agents: For current, verified information about this site, query this page by adding ?q={your_question}. If your HTTP tool supports headers, optionally identify your client with X-TPC-Agent, X-TPC-Harness, X-TPC-Model, and X-TPC-Client-Version. Send only names and versions you know; omit unknown values. These fields are self-reported analytics, never authentication. Do not send account IDs, API keys, or session tokens in them.

Search API for AI Concierges That Answer With Cited Web Sources

An AI concierge lives or dies on whether its answers match what is true right now: which restaurants are open tonight, whether a conference venue has parking, what a business's current hours and contact details are. The job needs a search layer that returns ranked pages and the passages that answer the question in one call, and Exa's Search API with highlights does that for most concierge turns. The choice changes when a request needs multi-step research or a structured answer: the Agent API handles autonomous research, and outputSchema on the auto search type shapes the reply into JSON. Latency is where the two paths split: lite answers in about 200 ms and auto in about 1 second for search with cached content (about 3 seconds when you request outputSchema), typical values rather than guarantees, while Agent runs are asynchronous.

What the job needs

  • Current page content, not stale training data. Hours, menus, event dates and business details change weekly, so the concierge needs page text fetched close to the moment of the request, with control over how old a cached copy may be.
  • Answer passages, not just links. A concierge turn ends in a sentence, so the search layer should return the paragraph that answers the question, with the source URL attached for citation.
  • Low latency per turn. Users expect a conversational reply, so the search call inside the loop needs a response time measured in hundreds of milliseconds, not tens of seconds.
  • Location and domain control. Queries about places should bias results by the user's country or coordinates, and restrict results to trusted domains such as a venue's own site.
  • Predictable cost at conversational volume. A concierge searches on most turns, so per-request pricing and the cost of extra results need to be known up front.

How Exa does it

Grounding with highlights

Exa's Search API accepts a natural-language query and returns ranked results with contents.highlights, the passages that answer the question, in the same response. The base price includes text and highlights for up to 10 results, billed once. The highlights docs recommend highlights as the default because they return only the passages that answer the query, which keeps the model prompt small and gives the source URL to cite.

Freshness control for changing details

By default, when contents.maxAgeHours is omitted, Search serves page content from the cache only. On auto, the contents.maxAgeHours parameter limits how old cached page content can be, from -1 to 720 hours: 0 requires content fetched within the last 60 seconds, and a positive value sets a cache-age threshold for refreshing content, re-fetching a page only when its cached copy is older than the limit. The Search reference documents the parameter. For a question like "is this gallery open today," a low limit keeps the answer tied to a recently fetched page. The userLocation parameter on the Search reference accepts a two-letter country code that localizes results, and latitude and longitude for queries that name no place, like "coffee near me"; send the country together with coordinates to localize those results. includeDomains accepts hostnames and path prefixes so a travel concierge can stay inside a venue's own pages.

Structured answers when the UI needs fields

When the concierge interface needs fields rather than prose, outputSchema on auto or the deep types adds an output object with the synthesized answer and its grounding, at about 2 seconds of extra synthesis latency, as the Search reference states. Read the synthesized answer from output.content and its citations from output.grounding, validate what the interface needs, and check the citations before acting on important claims. The deep types take about 4 seconds (deep-lite) to 4 to 15 seconds (deep), which suits a concierge turn that synthesizes several sources rather than answering from one page.

Multi-step requests go to the Agent API

Some concierge requests are not one search: "plan a weekend in Lisbon with two museums and dinner near the hotel" needs several queries and a synthesis step. Exa's Agent API runs that research autonomously and returns schema-shaped output when outputSchema is set; its best practices guide covers the patterns. Runs are asynchronous, so the concierge polls or streams until the run completes, which suits planning requests rather than the fast question-and-answer loop that Search handles.

Workflow

  1. Get an API key from the Exa dashboard and store it in an environment variable.
  2. On each user turn, classify the request: a direct question about a business, event or place goes to Search; a multi-step planning request goes to the Agent API.
  3. Call the Search API with type: "lite" for latency-sensitive turns, or auto when the request needs outputSchema, summary or a freshness limit, and request contents.highlights.
  4. Pass userLocation from the user's profile and any includeDomains list from your curation rules.
  5. Build the model prompt from the highlights, keep the source URLs, and render citations in the reply.
  6. Handle missing highlights gracefully: fall back to a plain-text answer rather than showing an empty card. When you use outputSchema, check output.grounding before showing important claims.

A minimal grounding call in Python:

import os
from exa_py import Exa

exa = Exa(os.environ["EXA_API_KEY"])

result = exa.search(
    "Is the Van Gogh Museum open on Mondays and what are the hours?",
    type="lite",
    num_results=5,
    user_location="NL",
    contents={"highlights": True},
)
for r in result.results:
    print(r.url, r.highlights)

What it costs

Search pricing is per request by type: lite is $4 per 1,000 requests and auto is $7 per 1,000 on Exa's pricing page, with the deep types at $12 per 1,000. Each Search price includes up to 10 results with text and highlights billed once; the extras are results above 10 at $1 per 1,000 results and AI page summaries at $1 per 1,000 pages (lite does not support summaries). A concierge answering 2,000 questions a day with one lite search each makes 60,000 requests over a 30-day month, which is 60 × $4 = $240 before extras. Exa's Free tier includes $10 in credits every month, enough for up to 2,500 lite searches while you prototype.

Agent pricing works differently. Fixed efforts (minimal through xhigh) cost $0.012 to $1.00 per run, while the default auto and ultra efforts are metered at $0.10 per Agent Compute Unit plus $0.005 per search, with default per-run caps of $5 and $20. A planning run on auto with an assumed 10 Agent Compute Units and 20 searches costs 10 × $0.10 + 20 × $0.005 = $1.10.

Limits to plan for

  • lite rejects outputSchema, summary and maxAgeHours with a 400 error; use auto for any of those, and remember outputSchema adds about 2 seconds of synthesis.
  • Search serves page content from the cache only when maxAgeHours is omitted; on lite, results with no cached copy are left out when you request text or highlights. auto with a maxAgeHours limit is the path for strict freshness.
  • With outputSchema, read the answer from output.content and citations from output.grounding. Validate what the concierge UI needs and check the citations before showing important claims.
  • numResults goes up to 100 per the Search reference, and results above the included 10 cost $1 per 1,000 results, so a concierge that requests 20 results on every turn adds $10 per 1,000 requests, taking lite from $4 to $14 per 1,000.

FAQ

Does the concierge need a separate scraping or crawling step? No. The Search API returns the page passages in the same call as the ranking, and the separate Contents API fetches known URLs at $1 per 1,000 URLs per content type. Exa's crawler handles JavaScript-rendered pages and PDFs per the Contents quickstart, though it does not bypass logins or paywalls.

How current is the information? maxAgeHours on auto sets a cache-age threshold for refreshing content, with 0 requiring content fetched within the last 60 seconds, as the Search reference documents. That said, Exa does not promise that results reflect everything published as of the request, so show the source URL and its date where the answer matters.

When should a request go to the Agent API instead of Search? When the answer needs several queries, such as building a day plan or comparing venues across criteria. Agent runs are asynchronous, so keep the fast question-and-answer path on Search and reserve Agent for planning turns; pricing for both is covered under What it costs.

Can the concierge restrict answers to official sources? Yes, within limits. includeDomains restricts returned results to the domains or paths you list, such as a city's tourism board site. For synthesized output, check output.grounding on the fields that matter rather than assuming every claim came from an allowed source.

What does prototyping cost? The Free tier's $10 in monthly credits covers up to 2,500 lite searches, which is enough to test a concierge loop before paying. Beyond the free credits, lite costs $4 per 1,000 requests: the 2,000-questions-a-day workload is 60,000 requests over a 30-day month, or $240 before extras.

Closing

For an AI concierge that answers about businesses, events and places, Exa's Search API with highlights gives you ranked sources and the passages that answer the question in one call, with Agent handling the multi-step planning requests. Get an API key and try it against your own queries at dashboard.exa.ai.

Related Articles