curl -X POST "https://api.omophub.com/v1/search/similar" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "type 2 diabetes mellitus",
"vocabulary_ids": ["SNOMED", "ICD10CM"],
"domain_ids": ["Condition"],
"algorithm": "hybrid",
"similarity_threshold": 0.8,
"page_size": 10,
"include_scores": true,
"include_explanations": true,
"standard_concept": "S"
}'
import { OMOPHub } from '@omophub/omophub-node';
const client = new OMOPHub();
const { data } = await client.search.similar({
query: 'type 2 diabetes mellitus',
vocabularyIds: ['SNOMED', 'ICD10CM'],
domainIds: ['Condition'],
algorithm: 'hybrid',
similarityThreshold: 0.8,
pageSize: 10,
includeScores: true,
includeExplanations: true,
standardConcept: 'S',
});
import requests
url = "https://api.omophub.com/v1/search/similar"
payload = {
"query": "type 2 diabetes mellitus",
"vocabulary_ids": ["SNOMED", "ICD10CM"],
"domain_ids": ["Condition"],
"algorithm": "hybrid",
"similarity_threshold": 0.8,
"page_size": 10,
"include_scores": True,
"include_explanations": True,
"standard_concept": "S"
}
response = requests.post(
url,
json=payload,
headers={"Authorization": "Bearer YOUR_API_KEY"}
)
data = response.json()
{
"success": true,
"data": {
"similar_concepts": [
{
"concept_id": 4193704,
"concept_name": "Type 2 diabetes mellitus without complication",
"concept_code": "313436004",
"vocabulary_id": "SNOMED",
"domain_id": "Condition",
"concept_class_id": "Clinical Finding",
"standard_concept": "S",
"matched_text": "Type 2 diabetes mellitus without complication",
"source_type": "concept_name",
"similarity_score": 0.93,
"explanation": "Semantic similarity 0.94 and lexical overlap 0.91, combined at 0.7/0.3",
"similarity_explanation": "Semantic similarity 0.94 and lexical overlap 0.91, combined at 0.7/0.3"
},
{
"concept_id": 3191208,
"concept_name": "Type 2 diabetes mellitus with hyperglycemia",
"concept_code": "1481000119100",
"vocabulary_id": "SNOMED",
"domain_id": "Condition",
"concept_class_id": "Clinical Finding",
"standard_concept": "S",
"matched_text": "Type 2 diabetes mellitus with hyperglycemia",
"source_type": "concept_name",
"similarity_score": 0.9,
"explanation": "Semantic similarity 0.89 and lexical overlap 0.91, combined at 0.7/0.3",
"similarity_explanation": "Semantic similarity 0.89 and lexical overlap 0.91, combined at 0.7/0.3"
},
{
"concept_id": 35206879,
"concept_name": "Type 2 diabetes mellitus without complications",
"concept_code": "E11.9",
"vocabulary_id": "ICD10CM",
"domain_id": "Condition",
"concept_class_id": "4-char nonbill code",
"standard_concept": "S",
"matched_text": "Type 2 diabetes mellitus without complications",
"source_type": "concept_name",
"similarity_score": 0.87,
"explanation": "Semantic similarity 0.86 and lexical overlap 0.9, combined at 0.7/0.3",
"similarity_explanation": "Semantic similarity 0.86 and lexical overlap 0.9, combined at 0.7/0.3"
}
],
"search_metadata": {
"original_query": "type 2 diabetes mellitus",
"algorithm_used": "hybrid",
"similarity_threshold": 0.8,
"total_candidates": 3,
"results_returned": 3,
"processing_time_ms": 1,
"totals_are_lower_bound": false,
"embedding_latency_ms": 18
}
},
"meta": {
"request_id": "req_01HQZX3M5K8P2N7R4T6V9W1Y3B",
"timestamp": "2026-09-06T13:37:12.848Z",
"vocab_release": "2026.1",
"search": {
"query": "type 2 diabetes mellitus",
"total_results": 3,
"filters_applied": {
"algorithm": "hybrid",
"vocabulary_ids": ["SNOMED", "ICD10CM"],
"domain_ids": ["Condition"],
"standard_concept": "S",
"include_invalid": false,
"exclude_self": true
}
},
"pagination": {
"page": 1,
"page_size": 10,
"total_items": 3,
"total_pages": 1,
"has_next": false,
"has_previous": false
}
}
}
{
"success": false,
"error": {
"code": "validation_error",
"message": "Validation failed: similarity_threshold must be between 0 and 1 (field: similarity_threshold, received: 1.5)",
"details": {
"validationErrors": [
{
"field": "similarity_threshold",
"message": "similarity_threshold must be between 0 and 1",
"value": 1.5,
"code": "VALIDATION_FAILED"
}
]
}
},
"meta": {
"request_id": "req_01HQZX3M5K8P2N7R4T6V9W1Y3B",
"timestamp": "2026-09-06T13:38:09.105Z"
}
}
Search Similar Concepts
Find semantically similar medical concepts using advanced machine learning algorithms with flexible search criteria and body parameters.
curl -X POST "https://api.omophub.com/v1/search/similar" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "type 2 diabetes mellitus",
"vocabulary_ids": ["SNOMED", "ICD10CM"],
"domain_ids": ["Condition"],
"algorithm": "hybrid",
"similarity_threshold": 0.8,
"page_size": 10,
"include_scores": true,
"include_explanations": true,
"standard_concept": "S"
}'
import { OMOPHub } from '@omophub/omophub-node';
const client = new OMOPHub();
const { data } = await client.search.similar({
query: 'type 2 diabetes mellitus',
vocabularyIds: ['SNOMED', 'ICD10CM'],
domainIds: ['Condition'],
algorithm: 'hybrid',
similarityThreshold: 0.8,
pageSize: 10,
includeScores: true,
includeExplanations: true,
standardConcept: 'S',
});
import requests
url = "https://api.omophub.com/v1/search/similar"
payload = {
"query": "type 2 diabetes mellitus",
"vocabulary_ids": ["SNOMED", "ICD10CM"],
"domain_ids": ["Condition"],
"algorithm": "hybrid",
"similarity_threshold": 0.8,
"page_size": 10,
"include_scores": True,
"include_explanations": True,
"standard_concept": "S"
}
response = requests.post(
url,
json=payload,
headers={"Authorization": "Bearer YOUR_API_KEY"}
)
data = response.json()
{
"success": true,
"data": {
"similar_concepts": [
{
"concept_id": 4193704,
"concept_name": "Type 2 diabetes mellitus without complication",
"concept_code": "313436004",
"vocabulary_id": "SNOMED",
"domain_id": "Condition",
"concept_class_id": "Clinical Finding",
"standard_concept": "S",
"matched_text": "Type 2 diabetes mellitus without complication",
"source_type": "concept_name",
"similarity_score": 0.93,
"explanation": "Semantic similarity 0.94 and lexical overlap 0.91, combined at 0.7/0.3",
"similarity_explanation": "Semantic similarity 0.94 and lexical overlap 0.91, combined at 0.7/0.3"
},
{
"concept_id": 3191208,
"concept_name": "Type 2 diabetes mellitus with hyperglycemia",
"concept_code": "1481000119100",
"vocabulary_id": "SNOMED",
"domain_id": "Condition",
"concept_class_id": "Clinical Finding",
"standard_concept": "S",
"matched_text": "Type 2 diabetes mellitus with hyperglycemia",
"source_type": "concept_name",
"similarity_score": 0.9,
"explanation": "Semantic similarity 0.89 and lexical overlap 0.91, combined at 0.7/0.3",
"similarity_explanation": "Semantic similarity 0.89 and lexical overlap 0.91, combined at 0.7/0.3"
},
{
"concept_id": 35206879,
"concept_name": "Type 2 diabetes mellitus without complications",
"concept_code": "E11.9",
"vocabulary_id": "ICD10CM",
"domain_id": "Condition",
"concept_class_id": "4-char nonbill code",
"standard_concept": "S",
"matched_text": "Type 2 diabetes mellitus without complications",
"source_type": "concept_name",
"similarity_score": 0.87,
"explanation": "Semantic similarity 0.86 and lexical overlap 0.9, combined at 0.7/0.3",
"similarity_explanation": "Semantic similarity 0.86 and lexical overlap 0.9, combined at 0.7/0.3"
}
],
"search_metadata": {
"original_query": "type 2 diabetes mellitus",
"algorithm_used": "hybrid",
"similarity_threshold": 0.8,
"total_candidates": 3,
"results_returned": 3,
"processing_time_ms": 1,
"totals_are_lower_bound": false,
"embedding_latency_ms": 18
}
},
"meta": {
"request_id": "req_01HQZX3M5K8P2N7R4T6V9W1Y3B",
"timestamp": "2026-09-06T13:37:12.848Z",
"vocab_release": "2026.1",
"search": {
"query": "type 2 diabetes mellitus",
"total_results": 3,
"filters_applied": {
"algorithm": "hybrid",
"vocabulary_ids": ["SNOMED", "ICD10CM"],
"domain_ids": ["Condition"],
"standard_concept": "S",
"include_invalid": false,
"exclude_self": true
}
},
"pagination": {
"page": 1,
"page_size": 10,
"total_items": 3,
"total_pages": 1,
"has_next": false,
"has_previous": false
}
}
}
{
"success": false,
"error": {
"code": "validation_error",
"message": "Validation failed: similarity_threshold must be between 0 and 1 (field: similarity_threshold, received: 1.5)",
"details": {
"validationErrors": [
{
"field": "similarity_threshold",
"message": "similarity_threshold must be between 0 and 1",
"value": 1.5,
"code": "VALIDATION_FAILED"
}
]
}
},
"meta": {
"request_id": "req_01HQZX3M5K8P2N7R4T6V9W1Y3B",
"timestamp": "2026-09-06T13:38:09.105Z"
}
}
Overview
This endpoint identifies medical concepts that are semantically similar to a provided query or set of criteria. It leverages advanced machine learning models trained on medical terminology to discover related concepts that may not share exact keywords but are clinically relevant and contextually similar.Request Body
integer
Reference concept to find similar concepts for. Its name becomes the search
text, and the concept itself is excluded from the results unless
exclude_self is false.string
Reference concept name, when you have the name but not the ID
string
Free-text query or concept description to find similar concepts for
Exactly one starting point is required:
concept_id, concept_name or
query. A request with none of them returns 400, and so does a request with
more than one — supplying two used to be accepted, with the extra silently
discarded. Vocabulary and domain filters narrow a search; they are not
starting points, so a request carrying only filters is also a 400.string[]
Target vocabularies to search within (array of strings)
Examples:
Examples:
["SNOMED", "ICD10CM"], ["RxNorm", "NDC"]string[]
Clinical domains to focus the similarity search (array of strings)
Examples:
Examples:
["Condition", "Procedure"], ["Drug", "Device"]string[]
Concept classes to include in similarity search (array of strings)
Examples:
Examples:
["Clinical Finding", "Procedure"], ["Ingredient", "Brand Name"]number
default:"0.7"
Minimum similarity score threshold (0 to 1.0)
Higher values = More strict similarity matching
Higher values = More strict similarity matching
0 is a valid value and is honoured: it returns every candidate the retrieval
produced, ranked by score.integer
default:"20"
Number of similar concepts to return per page
Every page size is served from the same fixed candidate pool, so this changes how results are sliced, never how they are scored - see Pagination for the bound on how deep paging can go.
Every page size is served from the same fixed candidate pool, so this changes how results are sliced, never how they are scored - see Pagination for the bound on how deep paging can go.
boolean
default:"true"
Include
similarity_score on each returned concept. Set false to omit it;
ranking is unaffected.boolean
default:"false"
Add an
For one release each concept also carries a duplicate
explanation field to each returned concept describing the evidence
behind its score.For one release each concept also carries a duplicate
similarity_explanation
field with the same value. It is deprecated and exists only so clients
that read the old name keep working; read explanation.string
Filter by standard concept designation
Options:
OMOP stores non-standard concepts with a null
Options:
S (standard), C (classification), N (non-standard)OMOP stores non-standard concepts with a null
standard_concept; N selects
those rows.boolean
default:"false"
Include invalid/deprecated concepts in the similarity search.
Supported only with
Supported only with
algorithm=lexical. The embedding index contains valid
concepts only, so include_invalid=true with semantic or hybrid returns
400 rather than silently ignoring the filter.boolean
default:"true"
Exclude the reference concept from its own results. Applies when the request
started from a
concept_id.string
default:"semantic"
Similarity algorithm to use
Options:
Options:
semantic(default) - Neural embedding similarity. Best for finding conceptually similar terms that share no words (e.g. “heart attack” → “Myocardial infarction”). Returns503if the embedding service is unavailable.lexical- Text-based Jaccard word and character similarity. Good for fuzzy text matching and typo tolerance, and the only algorithm that can search invalid concepts.hybrid- Runs both retrievals, unions their candidates and scores every one of them by the same rule:0.7 × semantic + 0.3 × lexical, where a signal neither retrieval established counts as0. Note that this puts hybrid scores on a different scale from bothsemanticandlexicalscores — a candidate sharing no words with the query keeps only0.7 ×its semantic score, and one the embedding search did not return keeps only0.3 ×its lexical score — so the samesimilarity_thresholdis stricter here than in either single-signal algorithm. See Algorithm Comparison. If the embedding service is unavailable, hybrid serves its lexical half and reportsalgorithm_used: "lexical"withdegraded_from: "hybrid"rather than failing.
integer
default:"1"
Page number (1-based indexing)
Response
object
Request, release, and pagination metadata.
boolean
Indicates if the request was successful
object
Contains the similar concepts search results
Show data
Show data
array
Array of concepts similar to the query.Each entry carries the concept row as the retrieval that found it returned
it, plus the similarity fields below. The core OMOP columns are always
present; the remaining fields depend on which retrieval supplied the
candidate, so treat anything beyond them as optional.
Show similar_concepts
Show similar_concepts
integer
OMOP concept ID
string
Primary concept name
string
Vocabulary-specific concept code
string
Source vocabulary identifier
string
Clinical domain classification
string
Concept class identifier
number
Similarity score between 0.0 and 1.0
string
Evidence behind the score. Present only when
include_explanations is true.string
Standard concept flag (S, C, or N)
string
The text whose embedding matched the query. Present on candidates the semantic retrieval returned — so on
semantic results, and on the hybrid results that came from its semantic half.string
Which text
matched_text came from, for example concept_name. Present alongside matched_text.string
Deprecated alias of
explanation, emitted with the same value. Read explanation; this field will be removed in a future release.object
The concept the search started from. Present when the request supplied
concept_id.object
Information about the similarity search
Show search_metadata
Show search_metadata
string
The original search query provided
string
Similarity algorithm applied (
semantic, lexical, or hybrid)number
Minimum similarity threshold applied
integer
How many concepts cleared
similarity_threshold within the bounded retrieval pool — the size of the ranked set the pages are cut from, and identical to pagination.total_items.Despite the name it is not the number of candidates evaluated: the pool holds up to 500, and everything scoring below the threshold is discarded before this is counted. A value of 3 means three concepts qualified, not that three were examined. Since the pool is bounded, check totals_are_lower_bound before treating it as a corpus-wide total.boolean
true when retrieval hit its candidate bound, meaning total_candidates and pagination.total_items count only what qualified inside the pool that was searched, rather than across the whole corpus. For hybrid it also means individual similarity_score values may understate: a candidate the semantic half did not return is fused with a semantic score of 0.integer
The concept the search started from. Present when the request supplied
concept_id.string
The algorithm that was requested, when it could not run in full and a fallback served the request instead. Present only when
algorithm_used differs from what was asked for.integer
Number of similar concepts returned
integer
Search processing time in milliseconds
integer
Time spent on embedding generation. Present whenever the semantic
retrieval ran — so for
semantic, and for hybrid unless it degraded
to its lexical half.curl -X POST "https://api.omophub.com/v1/search/similar" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "type 2 diabetes mellitus",
"vocabulary_ids": ["SNOMED", "ICD10CM"],
"domain_ids": ["Condition"],
"algorithm": "hybrid",
"similarity_threshold": 0.8,
"page_size": 10,
"include_scores": true,
"include_explanations": true,
"standard_concept": "S"
}'
import { OMOPHub } from '@omophub/omophub-node';
const client = new OMOPHub();
const { data } = await client.search.similar({
query: 'type 2 diabetes mellitus',
vocabularyIds: ['SNOMED', 'ICD10CM'],
domainIds: ['Condition'],
algorithm: 'hybrid',
similarityThreshold: 0.8,
pageSize: 10,
includeScores: true,
includeExplanations: true,
standardConcept: 'S',
});
import requests
url = "https://api.omophub.com/v1/search/similar"
payload = {
"query": "type 2 diabetes mellitus",
"vocabulary_ids": ["SNOMED", "ICD10CM"],
"domain_ids": ["Condition"],
"algorithm": "hybrid",
"similarity_threshold": 0.8,
"page_size": 10,
"include_scores": True,
"include_explanations": True,
"standard_concept": "S"
}
response = requests.post(
url,
json=payload,
headers={"Authorization": "Bearer YOUR_API_KEY"}
)
data = response.json()
{
"success": true,
"data": {
"similar_concepts": [
{
"concept_id": 4193704,
"concept_name": "Type 2 diabetes mellitus without complication",
"concept_code": "313436004",
"vocabulary_id": "SNOMED",
"domain_id": "Condition",
"concept_class_id": "Clinical Finding",
"standard_concept": "S",
"matched_text": "Type 2 diabetes mellitus without complication",
"source_type": "concept_name",
"similarity_score": 0.93,
"explanation": "Semantic similarity 0.94 and lexical overlap 0.91, combined at 0.7/0.3",
"similarity_explanation": "Semantic similarity 0.94 and lexical overlap 0.91, combined at 0.7/0.3"
},
{
"concept_id": 3191208,
"concept_name": "Type 2 diabetes mellitus with hyperglycemia",
"concept_code": "1481000119100",
"vocabulary_id": "SNOMED",
"domain_id": "Condition",
"concept_class_id": "Clinical Finding",
"standard_concept": "S",
"matched_text": "Type 2 diabetes mellitus with hyperglycemia",
"source_type": "concept_name",
"similarity_score": 0.9,
"explanation": "Semantic similarity 0.89 and lexical overlap 0.91, combined at 0.7/0.3",
"similarity_explanation": "Semantic similarity 0.89 and lexical overlap 0.91, combined at 0.7/0.3"
},
{
"concept_id": 35206879,
"concept_name": "Type 2 diabetes mellitus without complications",
"concept_code": "E11.9",
"vocabulary_id": "ICD10CM",
"domain_id": "Condition",
"concept_class_id": "4-char nonbill code",
"standard_concept": "S",
"matched_text": "Type 2 diabetes mellitus without complications",
"source_type": "concept_name",
"similarity_score": 0.87,
"explanation": "Semantic similarity 0.86 and lexical overlap 0.9, combined at 0.7/0.3",
"similarity_explanation": "Semantic similarity 0.86 and lexical overlap 0.9, combined at 0.7/0.3"
}
],
"search_metadata": {
"original_query": "type 2 diabetes mellitus",
"algorithm_used": "hybrid",
"similarity_threshold": 0.8,
"total_candidates": 3,
"results_returned": 3,
"processing_time_ms": 1,
"totals_are_lower_bound": false,
"embedding_latency_ms": 18
}
},
"meta": {
"request_id": "req_01HQZX3M5K8P2N7R4T6V9W1Y3B",
"timestamp": "2026-09-06T13:37:12.848Z",
"vocab_release": "2026.1",
"search": {
"query": "type 2 diabetes mellitus",
"total_results": 3,
"filters_applied": {
"algorithm": "hybrid",
"vocabulary_ids": ["SNOMED", "ICD10CM"],
"domain_ids": ["Condition"],
"standard_concept": "S",
"include_invalid": false,
"exclude_self": true
}
},
"pagination": {
"page": 1,
"page_size": 10,
"total_items": 3,
"total_pages": 1,
"has_next": false,
"has_previous": false
}
}
}
{
"success": false,
"error": {
"code": "validation_error",
"message": "Validation failed: similarity_threshold must be between 0 and 1 (field: similarity_threshold, received: 1.5)",
"details": {
"validationErrors": [
{
"field": "similarity_threshold",
"message": "similarity_threshold must be between 0 and 1",
"value": 1.5,
"code": "VALIDATION_FAILED"
}
]
}
},
"meta": {
"request_id": "req_01HQZX3M5K8P2N7R4T6V9W1Y3B",
"timestamp": "2026-09-06T13:38:09.105Z"
}
}
Usage Examples
Basic Similarity Search
Find concepts similar to a medical condition:{
"query": "hypertension",
"page_size": 5,
"similarity_threshold": 0.7
}
Cross-Vocabulary Similarity
Find similar concepts across multiple vocabularies:{
"query": "myocardial infarction",
"vocabulary_ids": ["SNOMED", "ICD10CM", "ICD9CM"],
"domain_ids": ["Condition"],
"similarity_threshold": 0.8,
"include_explanations": true
}
Pharmacological Similarity
Find similar drug concepts with detailed scoring:{
"query": "metformin hydrochloride",
"vocabulary_ids": ["RxNorm"],
"domain_ids": ["Drug"],
"concept_class_ids": ["Ingredient", "Clinical Drug"],
"similarity_threshold": 0.75,
"include_scores": true,
"algorithm": "semantic"
}
Semantic Search for Clinical Terms
Use neural embeddings to find conceptually similar terms (even when words don’t match):{
"query": "heart attack",
"vocabulary_ids": ["SNOMED"],
"domain_ids": ["Condition"],
"similarity_threshold": 0.5,
"algorithm": "semantic",
"page_size": 10
}
Algorithm Comparison
| Feature | semantic (default) | lexical | hybrid |
|---|---|---|---|
| Model | Neural embeddings | Jaccard word similarity | Both, fused as 0.7 x semantic + 0.3 x lexical |
| Best for | Conceptual similarity | Fuzzy text matching | Conceptually related terms re-ranked by wording |
| ”heart attack” → “MI” | Excellent | Poor (word mismatch) | Found and ranked, but scored down — see below |
| Exact name or code match | Only if it also embeds closely | Excellent | Capped at 0.3 unless the embedding search also returned it |
| Typo tolerance | Moderate | Good | Moderate — a match the embedding search misses caps at 0.3 |
| Total counts | Lower bound when the candidate pool saturates | Lower bound when the candidate pool saturates | Lower bound when either half saturates |
| Speed | One embedding lookup | One text search | Both, run concurrently |
| Requirements | Embedding service | None | Embedding service; degrades to lexical without it |
hybrid scores are not on the same scale as semantic scores, so the same
similarity_threshold is not equivalent between them.Every candidate is scored by the same rule, with a signal neither retrieval
established counting as 0. That cuts both ways.A concept that shares no words with the query keeps only 0.7 x its semantic
score: “Myocardial infarction” scoring 0.85 semantically against “heart attack”
fuses to 0.7 x 0.85 = 0.595 — below the default threshold of 0.7, which
semantic would have passed comfortably.A concept the embedding search did not return keeps only 0.3 x its lexical
score, so it cannot exceed 0.3 at all. An exact name or code match with no
semantic evidence scores 0.3 x 1.0 = 0.3 and is filtered by any threshold
above that. Use lexical when you want those matches to rank on their own —
hybrid is not a superset of the other two algorithms.When totals_are_lower_bound is true, a hybrid score is itself a lower
bound: the semantic retrieval filled its pool, so a candidate it did not return
may have had real semantic evidence that was counted as 0. The score is still
stable — it does not change with page or page_size — but it can understate.The consequence: at the default threshold, hybrid returns few cross-wording
matches, because clearing 0.7 with no lexical overlap requires a semantic score
of 1.0. Ranking within a hybrid result is unaffected — semantic ordering is
preserved among candidates with equally little overlap — but the absolute
scores are compressed. Lower similarity_threshold for hybrid, or use
semantic when you want conceptual matches that share no vocabulary.Counts are pool-relative.
total_candidates and pagination.total_items
count the concepts that cleared similarity_threshold inside a bounded
retrieval pool — not the concepts evaluated, and not the corpus. When
search_metadata.totals_are_lower_bound is true, treat them as “at least
this many”. has_next remains reliable for paging: it describes the ranked
pool being served and goes false at the end of it.Pagination
Every algorithm ranks a bounded candidate pool and serves pages out of it. The pool is a constant 500 candidates - it depends on neitherpage nor
page_size. Every page of a given request therefore ranks exactly the same
candidates, which is what makes consecutive pages disjoint slices of one stable
ordering rather than independently-ranked result sets that can repeat or skip
concepts. It also means a concept’s similarity_score is a property of the
concept and the query: asking for a different page_size cannot change it.
Two consequences worth planning for:
has_nextdescribes the ranked pool that was served, and nothing beyond it. Paging whilehas_nextistruealways terminates.- Reachable depth is bounded at roughly
500 / page_sizepages. 500 is what the vector index can return in one ordered pass, so the pool cannot be enlarged by asking for a bigger page. Asking for a page past the end returns an emptysimilar_conceptsarray withhas_next: false— not an error.
total_candidates and pagination.total_items count what
qualified inside that pool
rather than the corpus. search_metadata.totals_are_lower_bound says when that
is the case. It is reported separately from has_next on purpose: whether more
pages of this ranking exist and whether more matches exist are different
questions, and answering the first with the second produced responses that
promised a next page forever.
To search deeper, narrow the query with filters rather than paging further.
Related Endpoints
- GET Search Similar by ID - Get similar concepts for a specific concept ID
- Semantic Search - Dedicated semantic search endpoint using neural embeddings
- Advanced Search - Advanced search with multiple criteria
Was this page helpful?