Skip to main content
POST
/
search
curl --request POST \
  --url https://api.octen.ai/search \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "query": "What record did Kendrick Lamar break at the 2026 Grammy Awards?",
  "count": 5,
  "search_type": "auto"
}
'
{
  "code": 0,
  "msg": "success",
  "data": {
    "query": "latest WHO guidance on influenza vaccination",
    "search_type": "semantic",
    "results": [
      {
        "title": "Influenza (Seasonal) - World Health Organization (WHO)",
        "url": "https://www.who.int/news-room/fact-sheets/detail/influenza-(seasonal)",
        "highlight": "WHO recommends annual vaccination for high-risk groups\n\n...\n\nSeasonal influenza vaccination policies vary by region...",
        "authors": "World Health Organization",
        "time_published": "2024-10-15T00:00:00Z",
        "time_last_crawled": "2026-01-20T02:12:34Z"
      }
    ]
  },
  "meta": {
    "usage": {
      "num_search_queries": 1,
      "full_content_tokens": 0
    },
    "latency": 237,
    "warning": null
  }
}

Authorizations

x-api-key
string
header
required

API key used for request authentication. Obtain an API key before using the API.

Body

application/json
query
string
required

The search query.

Maximum string length: 500
search_type
enum<string>
default:auto

Controls the search strategy. auto automatically selects the best retrieval method based on the query; keyword uses keyword-based search only; semantic uses vector-based or hybrid semantic retrieval.

Available options:
auto,
keyword,
semantic
count
integer
default:5

Number of results to return.

Required range: 1 <= x <= 100
include_domains
string[]

A list of domains to specifically include in the search results.

Maximum array length: 1000
Maximum string length: 30
Example:
["octen.ai", "wikipedia.org"]
exclude_domains
string[]

A list of domains to specifically exclude from the search results.

Maximum array length: 150
Maximum string length: 30
Example:
["spam.com", "ads.example.net"]
include_text
string[]

Strings that must appear in the result page text.

Maximum array length: 5
Maximum string length: 30
exclude_text
string[]

Strings that must not appear in the result page text.

Maximum array length: 5
Maximum string length: 30
time_basis
enum<string>
default:auto

Determines which time field is used for time filtering. published uses time_published; crawled uses time_last_crawled.

Available options:
auto,
published,
crawled
start_time
string<date-time>

Start time for filtering results (based on time_basis). ISO 8601 format.

Example:

"2025-01-01T00:00:00+08:00"

end_time
string<date-time>

End time for filtering results (based on time_basis). ISO 8601 format.

Example:

"2025-01-01T00:00:00+08:00"

highlight
object

Controls highlight extraction from result pages.

format
enum<string>
default:text

Controls the formatting of highlight outputs.

Available options:
markdown,
text
safesearch
enum<string>
default:strict

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

Available options:
off,
strict
full_content
object

Controls whether to return the full raw content of each result page.

Response

Successful search response

code
integer

Business status code. 0 indicates success.

msg
string

A human-readable message describing the result.

data
object

The main response payload.

meta
object

Additional metadata for the search request.