API reference · Search

GET /v1/search

Run a real-time web search and return ranked results.

Endpoint

GEThttps://chat-api.you.com/search

Authenticate with the X-API-Key header.

Query parameters

FieldTypeDescription
queryrequiredstringThe search query, 1–500 characters.
num_web_resultsintegerNumber of web results to return.
default: 10
freshnessenumOne of day, week, month, year. Restricts results to the time window.
countrystringISO country code for localization.
safesearchenumoff | moderate | strict.
default: moderate
include_contentbooleanReturn 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"