Skip to content

Search the web and read pages

Web search and page fetch for AI agents: search the live web, then read up to 10 pages as clean text, from the CLI, an agent tool or the HTTP API.

Dexto gives an agent two web tools: search returns ranked results with highlights, and fetch reads up to 10 pages as plain text. Both are charged per request to your Cloud project, with no separate search account or key.

Terminal window
dexto cloud search "Cloudflare Workers CPU time limit" --num 5
dexto cloud fetch https://developers.cloudflare.com/workers/platform/limits/

Search prints results, each with a title, url and highlights. Read the pages a result points to with fetch, which takes up to 10 URLs and prints each page’s text:

Terminal window
URL=$(dexto cloud search "Cloudflare Workers CPU time limit" --num 1 --json | jq -r '.results[0].url')
dexto cloud fetch "$URL" --max-chars 5000

A page that could not be read comes back with status: "error" and is not charged.

Web search is a capability, not a separate MCP tool: dexto_capability_describe shows the dexto.platform.web_search capability’s input, and dexto_capability_call runs it with a query. dexto_capabilities_search finds it by name. The call is paid, so your client asks you first. Reading pages has no MCP tool; use the CLI or the API for fetch.

Terminal window
curl -X POST https://api.dexto.ai/v1/search \
-H "Authorization: Bearer $DEXTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query":"Cloudflare Workers CPU time limit","num_results":5}'
curl -X POST https://api.dexto.ai/v1/fetch \
-H "Authorization: Bearer $DEXTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"urls":["https://developers.cloudflare.com/workers/platform/limits/"]}'

Use a developer API key. See the Search and Fetch API for every field and error.

Terminal window
dexto cloud agents create --name "Researcher" \
--instructions "Answer with sources. Search first, then read the best pages." \
--tool web_search --tool web_fetch

Search and fetch are charged at the provider’s cost plus 25%: about $0.019 for a search with 8 results and about $0.00125 a page. Every response says what it cost in usage.charge_usd. An organization can make 120 requests a minute.