Skip to main content
POST
/
search
curl --request POST \
  --url https://api.octen.ai/search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "query": "What record did Kendrick Lamar break at the 2026 Grammy Awards?",
  "count": 5
}
'
{
  "code": 0,
  "msg": "success",
  "request_id": "req_abc123def456",
  "data": {
    "query": "latest WHO guidance on influenza vaccination",
    "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",
        "favicon": "https://www.who.int/favicon.ico",
        "cover_image": {
          "url": "https://www.who.int/images/default-source/influenza/seasonal-influenza-cover.jpg",
          "description": "Seasonal influenza vaccination"
        },
        "images": [
          {
            "url": "https://www.who.int/images/default-source/influenza/influenza-vaccine-vial.jpg",
            "description": "A vial of seasonal influenza vaccine."
          }
        ]
      }
    ]
  },
  "meta": {
    "usage": {
      "num_search_queries": 1,
      "full_content_tokens": 0
    },
    "latency": 237,
    "warning": null
  }
}
{
"code": 400,
"msg": "Missing parameter query"
}
{
"code": 401,
"msg": "Invalid API Key"
}
{
"code": 403,
"msg": "Insufficient balance in account"
}
{
"code": 429,
"msg": "Exceeding the rate limit"
}
{
"code": 500,
"msg": "Internal error"
}

Authorizations

Authorization
string
header
required

Bearer token used for request authentication. Alternatively, you can send the API key in the x-api-key header. Note: A payment method is required to use the API.

Body

application/json

Web search behavior configuration.

query
string
required

The search query.

Maximum string length: 500
topic
enum<string>
default:general

Use general for general web search, or news for news-focused results.

Available options:
general,
news
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: 1200
Maximum string length: 60
Example:
["octen.ai", "wikipedia.org"]
exclude_domains
string[]

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

Maximum array length: 1200
Maximum string length: 60
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
time_range
enum<string>

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.

Available options:
day,
week,
month,
year,
d,
w,
m,
y
start_time
string<date-time>

Start time for filtering results. ISO 8601 format.

Example:

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

end_time
string<date-time>

End time for filtering results. 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.

include_images
boolean
default:false

Whether to include images in each result.

Response

Successful search response

code
integer

Business status code. 0 indicates success.

msg
string

A message describing the result.

request_id
string

The unique identifier for this request.

data
object

The main response payload.

meta
object

Additional metadata for the search request.