API reference · Search
GET /v1/search
Run a real-time web search and return ranked results.
Endpoint
GET
https://chat-api.you.com/searchAuthenticate with the X-API-Key header.
Query parameters
| Field | Type | Description |
|---|---|---|
| queryrequired | string | The search query, 1–500 characters. |
| num_web_results | integer | Number of web results to return. default: 10 |
| freshness | enum | One of day, week, month, year. Restricts results to the time window. |
| country | string | ISO country code for localization. |
| safesearch | enum | off | moderate | strict. default: moderate |
| include_content | boolean | Return cleaned page text inline. default: false |
Response
JSON
{
"results": {
"web": [
{
"title": "string",
"url": "string",
"snippet": "string",
"published_at": "string|null",
"content": "string|null"
}
],
"news": [{ "...": "..." }]
}
}Example
cURL
curl -G "https://chat-api.you.com/search" \
--data-urlencode "query=open source vector db comparison" \
--data-urlencode "freshness=month" \
-H "X-API-Key: $YOU_API_KEY"