Semantic search (embedding-based)

Performs semantic similarity search using vector embeddings.

Availability: This endpoint works for both built-in and custom code systems.

When to use: Best for natural language queries where you want to find conceptually related codes, even when different terminology is used. The search understands meaning, not just keywords.

Examples:

  • Query "trouble breathing at night" finds codes like "Sleep apnea", "Orthopnea", "Nocturnal dyspnea" — semantically related but no exact keyword matches
  • Query "heart problems" finds "Myocardial infarction", "Cardiac arrest", "Arrhythmia"

Trade-offs: Slower than text search (requires embedding generation), but finds conceptually similar results that keyword search would miss.

See also: /search/text for faster keyword-based lookup with typo tolerance.

Usage of CPT is subject to AMA requirements: see PhenoML Terms of Service.

Path Params
string
required

Code system name

Query Params
string
required
length ≤ 10000

Natural language text to find semantically similar codes for

string

Specific version of the code system

integer
≤ 50
Defaults to 10

Maximum number of results (default 10, max 50)

Responses

400

Invalid parameters or missing search text

401

Unauthorized

404

Code system not found

500

Server error

Language
Credentials
Bearer
JWT
URL
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json