Web Search

Searches the live web and returns ranked results with model-ready highlights and optional full content. Optional filters narrow sources, time windows, and languages.

post/search

Request

  • Base URL: https://api.octen.ai
  • URL: https://api.octen.ai/search
  • Auth: one of:
    • HTTP bearer
    • API key in header x-api-key

Request body

countinteger

Number of results to return.

include_domainsstring[]

A list of domains to specifically include in the search results. The site: query operator adds to this list.

exclude_domainsstring[]

A list of domains to specifically exclude from the search results. The -site: query operator adds to this list. If a domain appears in both include_domains and exclude_domains, exclude_domains takes precedence.

include_textstring[]

Strings that must appear in the result page text.

exclude_textstring[]

Strings that must not appear in the result page text.

time_basis'auto' | 'published' | 'crawled'

Determines which time field is used for time filtering. published uses time_published; crawled uses time_last_crawled. Results missing this field are excluded when filtering by time.

time_range'day' | 'week' | 'month' | 'year' | 'd' | 'w' | 'm' | 'y'

Relative time window counting back from the current time based on time_basis. Mutually exclusive with start_time/end_time — if both are provided, start_time/end_time take precedence.

start_timestring date-time

Start time for filtering results. ISO 8601 format.

end_timestring date-time

End time for filtering results. ISO 8601 format.

languagestring[]

A list of languages to restrict results to, as ISO 639-1 codes. By default, no language filter is applied.

format'markdown' | 'text'

Controls the formatting of highlight outputs.

safesearch'off' | 'strict'

Controls filtering of explicit/adult content. off disables filtering; strict drops all adult content.

include_imagesboolean

Whether to include images in each result.

Example request

{
  "include_domains": [
    "octen.ai",
    "wikipedia.org"
  ],
  "exclude_domains": [
    "spam.com",
    "ads.example.net"
  ],
  "start_time": "2025-01-01T00:00:00+08:00",
  "end_time": "2025-01-01T00:00:00+08:00",
  "language": [
    "en",
    "zh"
  ]
}

Response

Successful search response

codeinteger

Business status code. 0 indicates success.

msgstring

A message describing the result.

request_idstring

The unique identifier for this request.

Changes

No recorded changes to this operation across all 1 revision of this API.