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 concise JSON object. Only query is required.
| Field | Type | Default | Description |
|---|---|---|---|
query | string | — | Required. The question or search phrase. Natural language works best. Max 500 characters. |
answer | boolean | true | Include a synthesized answer in results.answer. Send false for citations only. |
depth | string | advanced | advanced does full passage extraction; basic returns faster, snippet-level results. |
include_snippets | boolean | false | Add one attributed sentence per citation in citations[].snippet. |
{
"query": "latest EU AI Act enforcement timeline",
"answer": true,
"depth": "advanced",
"include_snippets": true
}
Response body#
| Field | Type | Description |
|---|---|---|
query | string | Your query, echoed back. |
trace_id | string | Unique diagnostic ID for this request. Include it when reporting an issue. |
cached | boolean | true when the result was served from edge cache in tens of milliseconds. |
results | object | The answer and its citations. |
results.answer | string | Synthesized answer, in the same language as the query. Present unless answer: false. |
results.citations | array | Ranked source list, highest relevance first. |
results.citations[].title | string | Title of the source page. |
results.citations[].url | string | Canonical URL of the source. |
results.citations[].score | number | Relevance from 0.0 to 1.0. Higher score denotes stronger semantic proximity. |
results.citations[].snippet | string | One 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 search depth#
Choose your depth according to your application latency budget and information density requirements:
| Metric / Feature | depth: "basic" | depth: "advanced" |
|---|---|---|
| Typical latency | 80 – 180 ms | 350 – 650 ms |
| Content extraction | Snippet-level index scanning | Deep DOM parsing & passage extraction |
| Synthesis engine | Lightweight answer generation | Full multi-source synthesis |
| Ideal use case | Autocomplete, routing, entity checks | RAG pipelines, user chatbots, agent tools |
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 an end user sees.basicreturns snippet-level results faster and cheaper. Use it for autocomplete-style lookups or when you only need to know which sources are relevant.
Query syntax & search operators#
ODEN natively accepts natural language questions while supporting structured precision operators:
- Exact phrase matching: Wrap phrases in double quotation marks (
"corporate sustainability reporting directive") to enforce exact substring occurrence in sources. - Domain scoping: Use
site:prefixes to restrict retrieval to authoritative institutional sources (e.g.,site:regeringen.se,site:europa.eu, orsite:riksdagen.se). - Domain exclusion: Prefix unwanted domains with a minus sign (e.g.,
-site:pinterest.com) to suppress social media noise.
{
"query": "site:europa.eu "AI Act" high-risk classification criteria",
"depth": "advanced"
}
TypeScript interfaces#
For type-safe integrations, drop this contract directly into your codebase:
export interface OdenSearchRequest {
query: string;
answer?: boolean;
depth?: "basic" | "advanced";
include_snippets?: boolean;
}
export interface OdenCitation {
title: string;
url: string;
score: number;
snippet?: string;
}
export interface OdenSearchResponse {
query: string;
trace_id: string;
cached: boolean;
results: {
answer?: string;
citations: OdenCitation[];
};
}
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#
- Work with the output: Answers & citations.
- Handle failure: Errors and Rate limits.