Search endpoint

Full reference for POST /search: the request parameters (query, answer, depth, include_snippets) and every field in the JSON response, with examples.

Documentation2 min readUpdated 2026-07-30

The ODEN API has one endpoint. You send a query; you get a synthesized answer and ranked citations.

POST https://api.oden-api.com/search
Authorization: Bearer <your-key>
Content-Type: application/json

Request body#

A small JSON object. Only query is required.

FieldTypeDefaultDescription
querystringRequired. The question or search phrase. Natural language works best. Max 500 characters.
answerbooleantrueInclude a synthesized answer in results.answer. Send false for citations only.
depthstringadvancedadvanced does full passage extraction; basic returns faster, snippet-level results.
include_snippetsbooleanfalseAdd one attributed sentence per citation in citations[].snippet.
{
  "query": "latest EU AI Act enforcement timeline",
  "answer": true,
  "depth": "advanced",
  "include_snippets": true
}

Response body#

FieldTypeDescription
querystringYour query, echoed back.
trace_idstringUnique ID for this request. Include it when reporting an issue.
cachedbooleantrue when the result was served from cache. Cached calls are much faster.
resultsobjectThe answer and its citations.
results.answerstringSynthesized answer, in the same language as the query. Present unless answer: false.
results.citationsarrayRanked source list, highest relevance first.
results.citations[].titlestringTitle of the source page.
results.citations[].urlstringCanonical URL of the source.
results.citations[].scorenumberRelevance from 0 to 1. Higher is closer to the query.
results.citations[].snippetstringOne attributed sentence. Present only when include_snippets: true.
{
  "query": "capital of sweden",
  "trace_id": "oden-mquycpae-p3thrk",
  "cached": false,
  "results": {
    "answer": "The capital of Sweden is Stockholm, which is also its largest city.",
    "citations": [
      { "title": "Stockholm — Wikipedia", "url": "https://en.wikipedia.org/wiki/Stockholm", "score": 0.964 }
    ]
  }
}

Choosing depth#

  • advanced (default) reads the candidate pages and extracts the passages that actually answer the query. Use it when the answer quality matters — RAG context, agent tool calls, anything a user sees.
  • basic returns snippet-level results faster and cheaper. Use it for autocomplete-style lookups or when you only need to know which sources are relevant.

Notes#

  • Language follows the query. Ask in Swedish, get a Swedish answer; ask in English, get English, with facts translated from foreign-language sources where needed.
  • Citations are metadata, not reproduced text. You get titles, URLs and scores — plus one attributed sentence per source if you ask for it. This is what keeps ODEN on the right side of the TDM opt-out.

Next steps#