Web search and web read

GET /llm/web/search searches the web and returns the results; POST /llm/web/read returns the content of one page. Call them from your own application when a feature needs information from the web. You do not need a model or a chat request; they take your company's API key like every other API call (API authentication), and each successful call uses Premium tokens. For your first request and the base URL, see Use the API.

Search the web

Send the search text in q:

bash
curl -G https://platform.datamind.ai/llm/web/search \
  -H "x-api-key: $DATAMIND_API_KEY" \
  --data-urlencode "q=industry trends 2026"

A call without a search text is refused with Search query is required (use 'q' or 'query' parameter).

Read a page

Send the page's address in url, in a JSON body:

bash
curl https://platform.datamind.ai/llm/web/read \
  -H "x-api-key: $DATAMIND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://example.com/report" }'

url is required and must not be empty. A body that is not a JSON object is refused with Request body must be a JSON object, and an empty or missing url with 'url' is required.

What comes back

Both endpoints relay the answer unchanged: your application receives the same status, body and content type that the service produced, including a non-success status. When the platform itself refuses the call, or cannot reach the service, the call fails with a DataMind error rather than a relayed answer; the shared statuses and codes are on Errors and retries.

Tokens and limits

Each successful call uses Premium tokens:

CallPremium tokens per successful call
Web search1,500
Page read2,000

Only a call that succeeds (HTTP 200) uses tokens; a call that fails costs nothing. Every forwarded call is recorded. These calls draw on the same Premium tokens as your chat usage; the Web Search and Web Read tiles on Pricing show the rates, as searches and reads per 1M Premium tokens.

The same limits as chat requests apply: requests per minute, requests running at once, and the spend cap on billable usage. How the gates work is on Limits and the spend cap, and the codes a refused call carries are on Errors and retries.

Refusals

WhenWhat the error says
No search text was sentSearch query is required (use 'q' or 'query' parameter)
The read body is not a JSON objectRequest body must be a JSON object
No url was sent, or it is empty'url' is required
Personal data, with Prohibit PII transmission onStatus 400, code content_filter; the call is not forwarded
The service that answers the call is briefly unavailableStatus 503, code service_unavailable; retry shortly

The full status and code reference, and what to retry, is on Errors and retries.

Questions, answered

How many Premium tokens does one web search or page read use?

A successful web search uses 1,500 Premium tokens, and a successful page read uses 2,000. The Web Search and Web Read tiles on Pricing show the same rates.

Do failed web calls use tokens?

No. Only a call that succeeds (HTTP 200) uses Premium tokens. A call that fails, or that comes back with an error status, costs nothing.

Should I use q or query for the search text?

Either: query is an alias for q. Send the text in one of the two; if both carry a value, the one in q is used.

Can I add my own search options to the request?

Yes. Everything you add to the query string besides the search text is forwarded unchanged.

Is the response changed before it reaches me?

No. The answer is relayed as the service sent it: the same status, body and content type, including a non-success status. When the platform itself refuses the call, or cannot reach the service, the call fails with a DataMind error rather than a relayed answer (Errors and retries).

Do web calls count against my limits?

Yes. The same limits as chat requests apply: requests per minute, requests running at once, and the spend cap on billable usage. Limits and the spend cap explains when a call is refused.

Does the company PII setting apply to web searches and page reads?

Yes. With Prohibit PII transmission on, the search text and the URL are checked before the call is forwarded; a call with personal data is refused with status 400 and code content_filter and is not forwarded. See Settings.

Why did my web call return 503?

The service that answers the call was briefly unavailable, so the call answered 503 with the code service_unavailable. Retry shortly.