CognitiveX Docs
API

POST /api/search

Web Search

POST /api/search

Web Search

Authentication: Authorization: Bearer <key> or X-API-Key: <key>. Create keys at developers.cognitivx.io/keys.

Parameters

NameInTypeRequiredDescription
X-Org-IDheaderstring | nullNo-

Request body

A JSON request body is required.

FieldTypeRequiredDescription
querystringYes-
max_resultsintegerNoDefaults to 5.

Example request

curl -X POST https://api.cognitivx.io/api/search \
  -H "Authorization: Bearer icog_..." \
  -H "Content-Type: application/json" \
  -d '{
    "query": "what did we decide about billing",
    "max_results": 5
  }'

Example response

200 application/json

{
  "results": [
    {
      "title": "string",
      "url": "https://example.com",
      "snippet": "string"
    }
  ],
  "query": "what did we decide about billing"
}

Responses

StatusDescription
200Success. Returns the response body shown below.
422Request validation failed. detail lists each offending field.