API · Web
GET /web/search
Search the web: titles, URLs, snippets and news, optionally with page content.
| Request | GET /v1/web/search |
| Operation id | web.search.all |
| Cost | 2 credits, refunded if the call fails |
| Auth | API key: Authorization: Bearer <key> or x-api-key. |
Search the web: titles, URLs, snippets and news, optionally with page content.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
query | string | yes | Example: open source vector database. |
sources | string | no | Comma-separated: web, news (default web). |
categories | string | no | Accepted for compatibility. |
limit | integer | no | |
country | string | no | |
location | string | no | Accepted for compatibility; use country. |
time_range | "any" | "day" | "week" | "month" | "year" | no | One of any, day, week, month, year. |
sort_by_date | "true" | "false" | no | One of true, false. |
include_domains | string | no | |
exclude_domains | string | no | |
include_content | "true" | "false" | no | One of true, false. |
Responses
| Status | Meaning | Schema |
|---|---|---|
200 | Web and news results. | |
400 | Invalid input. Nothing was charged. | Error |
401 | Missing or invalid API key. | Error |
402 | Not enough credits, a spend cap was reached, or payment is required. | Error |
403 | The target is private, or the account is suspended. | Error |
404 | That host does not resolve or the page does not exist. | Error |
429 | Too many requests. Wait for Retry-After seconds. | Error |
503 | Web is temporarily unavailable. Retryable; nothing was charged. | Error |
Errors use one shape everywhere; see Errors for every code and what to do.