Web Search
Web Search
POST /v1/web-search
Search the web and get structured results with titles, URLs, and metadata. Powered by Exa (default) or Tavily.
Headers
| Header | Required | Description |
|---|---|---|
Authorization |
Yes | Bearer <api-key-or-jwt> |
Content-Type |
Yes | application/json |
X-Quantized-Provider |
No | Force a provider (exa or tavily) |
Request body
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
query |
string | Yes | — | The search query |
num_results |
integer | No | 5 | Number of results to return |
Examples
cURL
Python
curl -X POST https://api.quantized.us/v1/web-search \
-H "Authorization: Bearer sk-quantized-YOUR-KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "Python 3.13 new features",
"num_results": 3
}'
import httpx
response = httpx.post(
"https://api.quantized.us/v1/web-search",
headers={"Authorization": "Bearer sk-quantized-YOUR-KEY"},
json={"query": "Python 3.13 new features", "num_results": 3},
)
data = response.json()
for result in data["results"]:
print(f"{result['title']}: {result['url']}")
Response
{
"results": [
{
"title": "What's New in Python 3.13",
"url": "https://docs.python.org/3/whatsnew/3.13.html",
"id": "r1",
"published_date": "2025-01-15",
"author": "Python Software Foundation"
},
{
"title": "Python 3.13 Release Notes",
"url": "https://www.python.org/downloads/release/python-3130/",
"id": "r2",
"published_date": "2024-10-07",
"author": null
}
],
"usage": {
"search_time": 0.42,
"credits_used": 8000,
"credits_remaining": 992000
}
}
Response fields
| Field | Type | Description |
|---|---|---|
results |
array | List of search results |
results[].title |
string | Page title |
results[].url |
string | Page URL |
results[].id |
string or null | Result ID (provider-specific) |
results[].published_date |
string or null | Publication date |
results[].author |
string or null | Author name |
usage.search_time |
float or null | Search duration in seconds |
usage.credits_used |
integer | Micro-credits consumed |
usage.credits_remaining |
integer or null | Micro-credits remaining |
Errors
| Status | Condition |
|---|---|
400 |
Invalid request (missing query, unknown fields) |
401 |
Invalid or missing API key |
402 |
Insufficient credits |
503 |
Search provider unavailable |