Skip to main content
POST
/
v1
/
search
Structured clinical search
curl --request POST \
  --url https://core.locusmedical.fr/v1/search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "query": "<string>",
  "source_ids": [],
  "limit": 10,
  "max_chunks_per_unit": 3
}
'
{
  "query": "<string>",
  "units": [
    {
      "document_id": 123,
      "document_title": "<string>",
      "reco_id": 123,
      "reco_title": "<string>",
      "source_id": 123,
      "source_name": "<string>",
      "score": 123,
      "chunks": [
        {
          "chunk_index": 123,
          "content": "<string>",
          "score": 123
        }
      ],
      "year": "<string>",
      "deep_link": "<string>"
    }
  ],
  "retrieved_pool": 123
}

Authorizations

Authorization
string
header
required

Locus API key — paste the raw lsk_… value (no 'Bearer ' prefix).

Body

application/json
query
string
required

Free-text clinical query in French, matched against the clinical knowledge base.

Minimum string length: 1
Examples:

"antibioprophylaxie chirurgie colorectale"

"prise en charge HTA gravidique"

source_ids
integer[] | null

Optional allow-list of source ids to restrict retrieval to specific sources. Omit (the default) to search all sources.

Example:
[]
limit
integer
default:10

Maximum number of structured document units to return.

Required range: 1 <= x <= 50
max_chunks_per_unit
integer
default:3

Maximum number of best-matching chunks to keep per document unit. Lower keeps the payload tight; raise to expose more excerpts.

Required range: 1 <= x <= 20

Response

Successful Response

query
string
required

Echo of the submitted query.

units
SearchUnit · object[]
required

Structured document units, ordered by relevance. Each is a citable source — never a free-form answer blob.

retrieved_pool
integer
required

Diagnostic: number of raw chunks swept from the knowledge base before grouping into units. This is the retrieval pool size, NOT bounded by limit (which caps returned units).