Search and Fetch API
Search the web and read web pages through /v1, charged to your Cloud project per request.Search the web and read the text of web pages with your API key at https://api.dexto.ai. Each
request is Dexto Cloud usage of your key’s Cloud project: it is charged from your organization’s
credits, counts toward the project’s and key’s monthly spend limits, and returns what it cost in
usage.charge_usd.
Use a developer API key, or the key Dexto gives a deployed Function or Site. A CLI sign-in key gets
403.
Search the web
Section titled “Search the web”/v1/search curl -X POST https://api.dexto.ai/v1/search \ -H "Authorization: Bearer $DEXTO_API_KEY" \ -H "Content-Type: application/json" \ -d '{"query":"Cloudflare Workers limits","num_results":5}'| Field | Type | Default | Notes |
|---|---|---|---|
query | string | 1-2,000 characters. | |
num_results | integer | 8 | 1-20. |
type | string | auto | auto, or fast for lightweight lookups. |
max_characters | integer | 2000 | Highlight characters per result, 100-10,000. |
max_age_hours | integer | Use cached pages only when younger; 0 always reads live. |
{ "id": "8f1c6b55-7d6c-4ad6-9a8e-0f1a33a1c0de", "object": "search", "results": [ { "title": "Limits · Cloudflare Workers docs", "url": "https://developers.cloudflare.com/workers/platform/limits/", "published_date": "2026-09-30", "highlights": ["Workers on the Paid plan can run for up to 5 minutes of CPU time..."] } ], "usage": { "charge_usd": 0.01625 }}Fetch web pages
Section titled “Fetch web pages”/v1/fetch 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/"]}'| Field | Type | Default | Notes |
|---|---|---|---|
urls | string[] | 1-10 absolute http or https URLs without credentials. | |
max_characters | integer | 20000 | Text characters per page, 100-100,000. |
max_age_hours | integer | As for search. |
Each distinct URL gets one result. A page that could not be read has status: "error" and an
error with a code and the page’s http_status when there was one; it is not charged.
{ "id": "0d1c6b55-7d6c-4ad6-9a8e-0f1a33a1c0de", "object": "fetch", "results": [ { "url": "https://developers.cloudflare.com/workers/platform/limits/", "status": "ok", "title": "Limits · Cloudflare Workers docs", "text": "Limits ...", "error": null } ], "usage": { "charge_usd": 0.00125 }}Pricing and errors
Section titled “Pricing and errors”Search and fetch are charged at the provider’s cost plus 25%. A search with 8 results is about $0.019; a fetched page is about $0.00125. Each request is checked against your credits and spend limits before anything is fetched.
| Status | Code | When |
|---|---|---|
400 | validation_failed | The body is invalid; nothing is charged. |
402 | insufficient_credits | The organization’s credits do not cover the request. |
402 | spend_limit_reached | The project or key reached its monthly spend limit. |
403 | forbidden | The key is not a developer key or a deployed key. |
429 | rate_limited | More than 120 requests a minute for the organization. |
502 | upstream_failure | The search provider failed; nothing is charged. |
Cloud SDK
Section titled “Cloud SDK”import { createCapabilitiesClient } from "@dexto-cloudflare/capabilities-client";
const cloud = createCapabilitiesClient({ apiKey: process.env.DEXTO_API_KEY });const { results } = await cloud.web.search({ query: "Cloudflare Workers limits",});const pages = await cloud.web.fetch({ urls: [results[0].url] });