Docs/Search API/Search

Search API

Web search as a plain JSON endpoint. This is Venym Search, now on the same key and balance as the models.

POST/v1/search
$0.0020 / search
example results · 3 of max_results$0.0020 billed
POST/v1/searchkey required
200okapplication/jsonBearer vk-…billed $0.0020 per search
Pick a status to see the error body the gateway returns.

Request

POST /v1/searchcURL
curl https://venym.io/v1/search \  -H "Authorization: Bearer $VENYM_API_KEY" \  -H "Content-Type: application/json" \  -d '{"query": "rust async runtime benchmarks", "max_results": 5}'
querystring, required
The search query. Truncated to 500 characters.
max_resultsinteger
How many results. Default 10, clamped to 1 to 25.

Response

payload.jsonJSON
{  "query": "rust async runtime benchmarks",  "results": [    {      "title": "Async runtimes compared",      "url": "https://example.com/post",      "snippet": "We ran tokio, async-std and smol against..."    }  ],  "cost_usd": 0.002}
  • results may hold fewer than max_results items.
  • cost_usd is what this call cost. It is 0 when there were no results.

Pricing

$0.0020 per search that returns results. Empty result sets are free. It is deducted from the same prepaid balance as model usage. You need at least one search's worth of credit, otherwise you get 402 insufficient_credits.

Errors

  • 400 if query is missing or not a string.
  • 401 key problems, 402 out of credits. See errors.
  • 502 if the search backend failed. Safe to retry after a short wait; you are not charged.