curl --request POST \
--url https://api.opper.ai/v3/tools/web/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>"
}
'import requests
url = "https://api.opper.ai/v3/tools/web/search"
payload = { "query": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: '<string>'})
};
fetch('https://api.opper.ai/v3/tools/web/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"results": [
{
"snippet": "<string>",
"title": "<string>",
"url": "<string>",
"published_at": "<string>",
"score": 123
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {}
}Web search
Search the web and return results with title, URL, and snippet.
curl --request POST \
--url https://api.opper.ai/v3/tools/web/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>"
}
'import requests
url = "https://api.opper.ai/v3/tools/web/search"
payload = { "query": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: '<string>'})
};
fetch('https://api.opper.ai/v3/tools/web/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"results": [
{
"snippet": "<string>",
"title": "<string>",
"url": "<string>",
"published_at": "<string>",
"score": 123
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {}
}Authorizations
API key authentication. Pass your API key as a Bearer token.
Body
Search query string. Required.
Restrict results to these domains (e.g. "go.dev" or "pkg.go.dev").
Two-letter ISO-3166 alpha-2 country code (e.g. "se" or "us") biasing results to that region. Case-insensitive.
Search backend. auto (default) routes to Opper's default engine (Jina today). jina and exa pin a specific backend (when configured server-side).
auto, jina, exa Exclude results from these domains (e.g. "reddit.com").
Maximum results per page. 0 uses the engine default (typically 5). Must be between 0 and 20.
Cap on total results accumulated across pages. 0 disables pagination. Silently ignored on engines without paginated search.
Per-result snippet length in characters. very_low ≈ 1000; low ≈ 5000; medium ≈ 10000 (default); high ≈ 30000; full returns the full extracted page content (capped ~50000).
very_low, low, medium, high, full Response
Successful response
Show child attributes
Show child attributes