> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omophub.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Bulk Semantic Search

> Find related OMOP concepts for multiple English-language queries in one request.

## Overview

Find related OMOP concepts for up to 25 English-language queries in one request.
Each query is processed independently and can override the shared defaults.
Results are suggestions for review, not automatic clinical coding decisions.

## Request Body

**searches** `array` *required*

Array of semantic search query objects (1-25 items)

**Search Object**

**search\_id** `string` *required*

Unique identifier for this search within the batch. NUL characters (U+0000)
are stripped before processing; results echo the normalized identifier.
The identifier must remain nonempty after normalization.

**query** `string` *required*

English natural-language search query. After trimming, queries must
contain 3-500 characters. `MI` is also accepted as a case-insensitive
abbreviation. Other 1-2 character queries fail only their own bulk item.

**page\_size** `integer` (default: 10)

Number of results per search (1-50). Overrides `defaults.page_size` for
this search.

**threshold** `number` (default: 0.5)

Minimum similarity score (0.0-1.0). Higher values return fewer, closer
matches. Overrides `defaults.threshold` for this search.

**vocabulary\_ids** `string[]`

Filter results to specific vocabularies (e.g., `["SNOMED", "ICD10CM"]`).
In a mixed list, inaccessible vocabularies are omitted; an
all-inaccessible list fails that search item. Overrides
`defaults.vocabulary_ids`.

**domain\_ids** `string[]`

Filter results to specific domains (e.g., `["Condition", "Drug"]`).
Overrides `defaults.domain_ids` for this search.

**standard\_concept** `string`

Filter by standard concept status: `"S"` (Standard) or `"C"`
(Classification). Overrides `defaults.standard_concept` for this search.

**concept\_class\_id** `string`

Filter by concept class (e.g., `"Clinical Finding"`). Overrides
`defaults.concept_class_id` for this search.

**defaults** `object`

Default parameters applied to all searches. Individual searches can override
any default.

**Defaults Object**

**page\_size** `integer` (default: 10)

Default results per search (1-50)

**threshold** `number` (default: 0.5)

Default minimum similarity score (0.0-1.0). This is not a probability or
clinical confidence threshold.

**vocabulary\_ids** `string[]`

Default vocabulary filter for all searches (e.g., `["SNOMED"]`)

**domain\_ids** `string[]`

Default domain filter for all searches (e.g., `["Condition"]`)

**standard\_concept** `string`

Default standard concept filter: `"S"` or `"C"`

**concept\_class\_id** `string`

Default concept class filter

## Query Parameters

**vocab\_release** `string`

Specific vocabulary release version (defaults to latest)

## Response

**success** `boolean`

Indicates if the request was successful

**data** `object`

Response data object containing results and summary counts

**Data Object**

**results** `array`

Array of search results, one per query

**Search Result**

**search\_id** `string`

Identifier matching the request's search\_id

**query** `string`

Original search query

**status** `string`

Query execution status: `completed` or `failed`

**results** `array`

Matching concept suggestions, ordered by similarity.

**Concept Result**

**concept\_id** `integer`

Unique concept identifier

**concept\_name** `string`

Primary concept name

**concept\_code** `string`

Concept code from source vocabulary

**vocabulary\_id** `string`

Source vocabulary

**domain\_id** `string`

Domain classification

**concept\_class\_id** `string`

Concept class

**standard\_concept** `string | null`

Standard concept indicator: `S`, `C`, or `null`

**similarity\_score** `number`

Relative match score from 0.0 to 1.0. Relevance remains primary,
but within an anchored score band of at most `0.0025` the API may
prefer more clinically useful concepts and demote non-clinical
concept classes. Scores are therefore not guaranteed to be
strictly descending. The score is not a probability or clinical
confidence value.

**matched\_text** `string`

Text associated with the match.

**error** `string`

Error message (only present if query failed)

**similarity\_threshold** `number`

The similarity threshold used for this query

**result\_count** `integer`

Number of results returned for this query

**retrieval\_truncated** `boolean`

`true` when additional matching concepts may exist beyond those
returned.

**totals\_are\_lower\_bound** `boolean`

`true` when reported totals are minimum known values rather than exact
counts. `result_count` remains the exact number returned for this
item.

**duration** `number`

Processing time for this query in milliseconds

**total\_searches** `integer`

Total number of searches in the request

**completed\_count** `integer`

Number of successfully completed searches

**failed\_count** `integer`

Number of failed searches

**total\_duration** `number`

Total processing time in milliseconds

**meta** `object`

**Metadata**

**request\_id** `string`

Unique identifier for the request

**vocab\_release** `string`

Vocabulary release version used

**timestamp** `string`

Request timestamp

> [!WARNING]
>
> Review each result before using it in a clinical workflow. Similarity scores
> rank matches; they are not probabilities or clinical confidence values.

```bash cURL theme={null}
curl -X POST "https://api.omophub.com/v1/search/semantic-bulk" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "defaults": {
      "vocabulary_ids": ["SNOMED"],
      "standard_concept": "S",
      "threshold": 0.5,
      "page_size": 5
    },
    "searches": [
      {
        "search_id": "s1",
        "query": "heart attack"
      },
      {
        "search_id": "s2",
        "query": "sugar diabetes",
        "threshold": 0.7
      },
      {
        "search_id": "s3",
        "query": "aspirin tablets",
        "vocabulary_ids": ["RxNorm"],
        "domain_ids": ["Drug"]
      }
    ]
  }'
```

```json Response theme={null}
{
  "success": true,
  "data": {
    "results": [
      {
        "search_id": "s1",
        "query": "heart attack",
        "status": "completed",
        "results": [
          {
            "concept_id": 4329847,
            "concept_name": "Myocardial infarction",
            "concept_code": "22298006",
            "vocabulary_id": "SNOMED",
            "domain_id": "Condition",
            "concept_class_id": "Clinical Finding",
            "standard_concept": "S",
            "similarity_score": 0.92,
            "matched_text": "Myocardial infarction"
          }
        ],
        "similarity_threshold": 0.5,
        "result_count": 1,
        "retrieval_truncated": false,
        "totals_are_lower_bound": false,
        "duration": 45
      }
    ],
    "total_searches": 1,
    "completed_count": 1,
    "failed_count": 0,
    "total_duration": 45
  }
}
```

## Error Handling

Each query is processed independently. A failed item has `status: "failed"`
and an `error` message; other valid items continue normally.

## Related Endpoints

* [Semantic Search](https://docs.omophub.com/api-reference/search/semantic-search.md) - Single query semantic search with pagination
* [Bulk Search](https://docs.omophub.com/api-reference/search/bulk-search.md) - Keyword-based bulk search (up to 50 queries)
* [Basic Search](https://docs.omophub.com/api-reference/search/basic-search.md) - Single query keyword search with pagination
* [Similar Concepts](https://docs.omophub.com/api-reference/search/search-similar.md) - Find concepts similar to a given concept


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.