Search

Returns ranked results from one serving provider. The default strategy selects a provider that supports the requested options. The fallback strategy tries providers in the supplied order. Results are not blended across providers. Portable filters may be approximated or omitted according to provider capabilities; warnings describe those outcomes unless strict_params is true. Native options apply only to their selected provider.

post/search

Request

  • Base URL
    https://api.onkernel.com
  • URL
    https://api.onkernel.com/search
  • Auth
    HTTP bearer

Request body

countrystring

ISO 3166-1 alpha-2 search locale preference.

end_datestring date

Inclusive publication-date upper bound; must not precede start_date. If recency is also supplied, recency takes precedence with a warning. Unsupported or approximated filtering is reported, or rejected under strict_params.

exclude_domainsstring[]

Hostname exclusions, with the same best-effort/strict behavior as include_domains. Provider-specific combinations that cannot be represented are reported via warnings or rejected in strict mode.

include_domainsstring[]

Hostname inclusion preference, matching a hostname and its subdomains. Empty means unrestricted. Translated, emulated, or dropped with a warning according to provider capability unless strict_params is true. Native boost modes remain advisory and are identified in warnings.

include_rawboolean

Include untouched per-result payloads and the full serving-provider response in raw fields. Off by default; native top-level outputs such as answer remain available without it.

languagestring

BCP 47 search language preference.

max_resultsinteger

Requested result count from 1 through 100. The effective count is clamped to the serving provider's cap with a warning. Effective native counts are the lower of this limit and supplied provider-native count aliases. Strict mode rejects unsupported counts.

querystring required

Primary search query. A provider-native multi-query option applies only to that provider; other providers in a fallback chain receive this query.

recency'hour' | 'day' | 'week' | 'month' | 'year'

Relative search window. Takes precedence over start_date/end_date with a warning if both are set. Provider-native recency behavior is retained, including documented hour-to-day widening. Unsupported filters are rejected only in strict mode.

safe_search'off' | 'moderate' | 'strict'

Optional safety preference. Omit to use provider defaults. Unsupported values are dropped with a warning unless strict_params is true. A search filter is not an authorization boundary.

start_datestring date

Inclusive publication-date lower bound. If recency is also supplied, recency takes precedence with a warning. Provider date semantics, precision, and unsupported filters are reported; unknown source dates are not fabricated or universally post-filtered.

strict_paramsboolean

When false, unsupported portable parameters are omitted and approximations are described in warnings. When true, every supplied portable parameter must be honored exactly. Requests that cannot be served with those parameters are rejected. This does not guarantee identical rankings or document timestamps across indexes. Authentication and project isolation are always enforced.

timeout_msinteger

Overall deadline across search attempts and inline retrieval. No new attempt starts after the deadline. Completed search results survive inline retrieval timeouts.

Response

Completed search, including valid zero-result responses. Inline retrieval failures are reported per result. Arrays are never null.

answerstring

Provider-generated answer when requested (e.g. via Tavily include_answer or Perplexity). Preserved independently of include_raw.

expires_atstring date-time required

Expiration of result IDs for deferred retrieval. Results expire 24 hours after search completion.

idstring required

Search resource ID. Request tracing uses X-Request-Id.

providerstring required

Concrete serving provider, never auto or fallback.

querystring required

Echo of the query. Native multi-query inputs are visible in the selected strategy target and the optional raw response.

rawunknown

Example response

{
  "id": "srch_abc123",
  "results": [
    {
      "id": "srchr_def456"
    }
  ]
}

Changes

    • info

      the request property default value changed from error timeout to error timeout empty

    • info

      the request property default value changed from error timeout to error timeout empty

    • info

      endpoint added