Treat results as untrusted
Every field this endpoint returns is written by whoever published the page. Titles, URLs, and excerpts are all attacker-influenceable. Pages exist that contain text written to look like instructions to whatever reads them next. The risk is highest when you pass results to a model that can act, such as one with tools, file access, or the ability to call your own APIs. Text in a result that reads like instructions can cause an action you did not intend. Before handing results to a capable model:- Label them in your prompt as untrusted data, not instructions.
- Keep the model that reads them separate from the one that acts, and pass along only what the reading step produced.
- Do not let a result determine which tool runs or which URL gets called.
Make a search request
Send aPOST request to /v1/search. Authenticate with your API key in the
standard Authorization Bearer header, the same header every /v1 endpoint
uses.
Request body
queries is the only required field. Pass one query for a simple lookup, or
several when you want broader coverage of a topic.
mode trades quality for speed. advanced is the default and returns higher
quality results. turbo returns results faster.
Response
A successful search returns200 with a JSON object.
search_idis a string that identifies this search.resultsis an array. Each entry has:url: the source URL.title: the page title.published: the publish date when available. It may benull.excerpts: an array of relevant text snippets from the page.
Errors
A
503 with a Retry-After header is temporary: read the value, wait, and
send the request again. A 503 whose error code is search_not_configured
is not: retrying will not help. Contact us if you expected web search to
be available.
Billing
Each successful search is billed to your organization per request:
Failed searches are not billed.