Skip to main content
POST
/
web-search
/
search
Execute Web Search
curl --request POST \
  --url https://cloud.onyx.app/api/web-search/search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "queries": [
    "<string>"
  ],
  "max_results": 10
}
'
{
  "search_provider_type": "google_pse",
  "search_results": [
    {
      "document_citation_number": 123,
      "url": "<string>",
      "title": "<string>",
      "snippet": "<string>",
      "unique_identifier_to_strip_away": "<string>",
      "type": "web_search"
    }
  ],
  "full_content_results": [
    {
      "document_citation_number": 123,
      "content": "<string>",
      "unique_identifier_to_strip_away": "<string>",
      "type": "open_url"
    }
  ],
  "content_provider_type": "onyx_web_crawler"
}

Authorizations

Authorization
string
header
required

Authorization header with Bearer token

Body

application/json
queries
string[]
required

List of search queries to send to the configured provider.

Minimum array length: 1
max_results
integer | null
default:10

Optional cap on number of results to return per query. Defaults to 10.

Response

Successful Response

search_provider_type
enum<string>
required
Available options:
google_pse,
serper,
exa,
searxng
search_results
LlmWebSearchResult · object[]
required
full_content_results
LlmOpenUrlResult · object[]
required
content_provider_type
enum<string> | null
Available options:
onyx_web_crawler,
firecrawl