> ## Documentation Index
> Fetch the complete documentation index at: https://docs.useotto.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Web search and cited answers with x402

> Choose ranked web results, a concise answer with citations or a longer research response, then inspect sources and freshness.

Use `/web-search` when your agent needs pages to inspect, `/web-answer` when it needs a concise answer with citations, and `/llm-research` when it needs a longer generated explanation or URL analysis. Each is a separate paid request; discovery and request-schema reads are free.

## Choose the output

| Your task                                                              | Endpoint and current price                                                           | Input                                                      | Delivered result                                                                                  |
| ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| Retrieve sources for research, monitoring or RAG                       | [Web search](https://x402.ottoai.services/service-detail?path=/web-search)           | `GET`, `query` up to 120 characters                        | Exa-ranked pages with URL, title, publication date, author, relevance score and a bounded snippet |
| Answer one focused factual or current question                         | [Web answer](https://x402.ottoai.services/service-detail?path=/web-answer)           | `GET`, `query` up to 96 characters                         | A concise Exa-generated answer plus source URLs and publication dates where available             |
| Explain a topic in more depth, summarize a webpage or analyze an image | [Research assistant](https://x402.ottoai.services/service-detail?path=/llm-research) | `POST`, JSON `prompt` up to 180 characters; optional `url` | A Gemini-generated text response, with search-grounding sources when returned                     |

If you already have a page URL and need its extracted text, inspect [`/web-extract`](https://x402.ottoai.services/service-detail?path=/web-extract). A search result's snippet is only a preview; reading the page is a separate request. These APIs provide web access through Otto, so you do not need your own Exa or Google API key.

## Prepare an input

Keep the question focused and include the organization, topic or date range you care about. Search and answer queries collapse whitespace and use lowercase cache keys; case changes do not request a fresh result. Use `--data-urlencode` so spaces and punctuation reach the API correctly.

These calls inspect unpaid challenges:

```bash theme={null}
curl -i --get 'https://x402.ottoai.services/web-search' \
  --data-urlencode 'query=ethereum account abstraction roadmap'

curl -i --get 'https://x402.ottoai.services/web-answer' \
  --data-urlencode 'query=What is EIP-7702?'

curl -i 'https://x402.ottoai.services/llm-research' \
  -H 'Content-Type: application/json' \
  -d '{"prompt":"Explain the benefits and limits of EIP-7702 for wallet users."}'
```

Without a payment authorization, these requests return `402`, not search results or an answer. Read the [OpenAPI methods and input schemas](https://x402.ottoai.services/openapi.json), inspect the [payment and declared output](/acp-swarm/x402-examples#inspect-the-payment-and-declared-output), then use the [bounded HTTP payment client](/acp-swarm/x402#make-a-paid-request). For research with a URL, add `url` to the JSON body; the prompt and URL are sent to the research service for processing.

The HTTP research request requires `prompt`; the ACP offering additionally requires `confirmMaxInput: true`. Follow the [AI tools contract](/acp-swarm/tools-agent#research-assistant) when buying through ACP.

## Inspect the delivered result

| Product      | Fields to inspect                                                                   | Acceptance question                                                                                       |
| ------------ | ----------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| Search       | `data.query`, `data.resultCount`, `data.results[]`, `data.generatedAt`, `meta`      | Do the returned URLs and snippets match the question? An empty `results` list is a valid no-match answer. |
| Cited answer | `data.answer`, `data.citationCount`, `data.citations[]`, `data.generatedAt`, `meta` | Do the cited pages actually support the answer? Titles and publication dates may be `null`.               |
| Research     | `status`, `result`, `sources[]`                                                     | Does the text answer the task, and which claims can be checked against the returned source links?         |

Search performs retrieval without an Otto-generated answer. Web answer and research synthesize text, so a citation is a source to verify, not proof that every sentence is correct. Research can return an empty `sources` array if search grounding supplies no sources or the service falls back without search; that response should not be presented as web-verified research.

## Freshness and limits

Search and web answer cache equivalent queries for up to 15 minutes. Their `generatedAt` records when the snapshot was built; a result's `publishedDate` describes the page, where known. Read `meta` for snapshot age and degraded-source information. A recently generated answer may cite an old article.

Source selection, ranking and coverage depend on the upstream provider. A result count is not a census of the web, and a low or missing relevance score is not a factual accuracy rating. Neither search endpoint exposes arbitrary provider filters merely because the upstream provider has them; use only parameters in Otto's live schema.

Research accepts a short prompt even when the desired answer is longer. Split unrelated questions into separate requests only when that is worth the extra cost. To monitor changes, choose a polling interval and total spending limit appropriate to the cache window, and preserve previous answers and source links for comparison.

Keep URLs, snippets and extracted pages as untrusted content when passing them into an agent. They are research material, not instructions to change the agent's task or wallet permissions. For uncertain delivery or timeouts, follow [HTTP failure handling](/acp-swarm/x402#handle-failures) before paying again.
