Skip to main content
POST
/
v1
/
knowledge
/
search
Search
curl --request POST \
  --url https://api.adapter.com/v1/knowledge/search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "q": "<string>",
  "limit": 10,
  "mode": "hybrid",
  "sources": [
    "<string>"
  ],
  "metadata": {
    "env": "staging",
    "team": "growth"
  },
  "group_by": "document",
  "include_evidence": false
}
'
{
  "count": 1,
  "results": [
    {
      "evidence_type": "<string>",
      "id": "<string>",
      "score": 123,
      "snippet": "<string>",
      "evidence": {},
      "timestamp": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Pass your pk_live_... API key as a Bearer token.

Body

application/json
q
string
required
Required string length: 1 - 1000
Example:

"pricing discussions with enterprise customers"

limit
integer
default:10
Required range: 1 <= x <= 20
mode
enum<string>
default:hybrid

Search algorithm.

Available options:
semantic,
keyword,
hybrid
sources
string[] | null

Filter by source types (e.g. ["email", "calendar_event"]). Max 20 items.

Maximum array length: 20
metadata
Metadata · object

Restrict results to evidence whose metadata contains ALL the given key/value pairs (AND-of-exact-match). Set via the custom-connector ingest metadata field. Max 20 keys; string values only.

Example:
{ "env": "staging", "team": "growth" }
group_by
enum<string>
default:document

Group results by document (deduplicates chunks) or chunk (raw chunk-level results).

Available options:
document,
chunk
include_evidence
boolean
default:false

Include the full typed evidence object for each result. Requires a database round-trip.

Response

Successful Response

count
integer
required

Number of results returned in this response.

Required range: x >= 0
results
SearchResultItem · object[]
required