Agent402 / tools / exa-answer

Exa grounded answer

$0.010 per call · USDC via x402 · POST /api/exa-answer

Ask a question and get a written answer with the sources it was drawn from. Exa searches its index, reads the pages and composes the answer, returning the citation list (title, URL, published date) alongside it so every claim can be checked. Model-backed: the answer text is generated, the citations are retrieved.

TRY IN PLAYGROUND →

Input

FieldTypeDescription
query *stringThe question to answer (max 1000 chars).
textbooleanInclude the full page text of each citation (bills extra per page; default false).

Example output

{
  "source": "exa",
  "fetchedAt": "2026-09-13T20:00:00.000Z",
  "query": "What is the x402 payment protocol and who uses it?",
  "answer": "x402 is an HTTP-native payment protocol that settles stablecoin payments per request ...",
  "citationCount": 1,
  "citations": [
    {
      "title": "What is the x402 payment protocol?",
      "url": "https://example.com/x402-explained",
      "publishedDate": "2026-08-02T00:00:00.000Z",
      "author": null,
      "text": null
    }
  ]
}

Try it - see the 402 challenge (free)

curl -i -X POST https://agent402.tools/api/exa-answer \
  -H "Content-Type: application/json" \
  -d '{"query":"What is the x402 payment protocol and who uses it?"}'

The response is HTTP 402 Payment Required with exact payment requirements. Any x402 v2 client pays automatically and retries:

Paid call (JavaScript agent)

import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
import { metaTitle, metaDescription } from "./seo-meta.js";

const client = new x402Client();
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agent402.tools/api/exa-answer", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "query": "What is the x402 payment protocol and who uses it?"
  }),
});
Wallet-only. This tool reaches the network/browser/storage, so it is paid in USDC via x402 (no proof-of-work tier).

Related tools

Extract article

$0.010 · POST /api/extract

Extract the main article content from any public URL as clean markdown. Returns title, byline, excerpt, word count, and …

try in playground →

Page metadata

$0.002 · GET /api/meta

Fetch page metadata for a URL: title, description, OpenGraph, Twitter cards, canonical URL, favicon.

try in playground →

Browser render

$0.02 · POST /api/render

Render a page in a real headless Chromium browser (JavaScript executed), then extract the main content as clean markdown…

try in playground →