> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.medicomp.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.medicomp.com/_mcp/server.

# Search

GET https://quippe.medicomp.com/api/Quippe/Search

Searches the MEDCIN clinical terminology for medical terms matching a search query, ranked by a relevance/confidence score. Given free-text input such as "headache" — or a partial term for type-ahead / autocomplete — the Search API ([/Quippe/Search](/api-reference/rest/get-quippe-search)) returns matching MEDCIN terms (findings, symptoms, diagnoses, history, physical-exam, tests, and therapies) that can then be mapped to standard vocabularies such as ICD-10, SNOMED CT, and CPT via the coding endpoints ([/Quippe/Coding/TranslateItem](/api-reference/rest/get-quippe-coding-translate-item) for a single term, [/Quippe/Coding/ChartMap](/api-reference/rest/post-quippe-coding-chart-map) for a whole chart). 

 Common uses include clinical-note autocomplete, encoding free text into structured findings, and looking up a term before translating its codes. 

 GET /Quippe/Search 

To search code descriptions across many vocabularies at once (SNOMED, ICD-10, LOINC, and others), use [/Quippe/Coding/Search/Search](/api-reference/rest/get-quippe-coding-search-search) instead.

Reference: https://docs.medicomp.com/api-reference/rest/get-quippe-search

## Authentication

- `Authorization` header (basic auth, required) — Login and password used to access quippe.medicomp.com. On-premise Quippe deployments can be configured to use whatever authentication and authorization your application is configured for, so basic authentication is used here to access the Quippe sandbox and is not a product requirement.
- `Authorization` header (bearer token, required) — JSON web token generated by a request to the [/Quippe/Security/Token](/api-reference/rest/get-quippe-security-token) web service endpoint in Quippe.

## Request

### Query parameters

- `Query` (string, required) — The free-text search query, such as "headache" or "chest pain". Required. Beyond plain text it accepts a compact syntax: an embedded command (e.g. "-dx headache"), a single term by id ("!12345"), a trailing "+"/"-" result qualifier, and code-like input that is matched and mapped to MEDCIN. See the remarks for the full syntax and command list. Queries are trimmed and normalized (apostrophes and extra whitespace removed) and, unless disabled, common stop words are dropped; a query must exceed 2 characters to return results.
- `Command` (string, optional) — An explicit search command, as an alternative to embedding one in Query (e.g. Command=dx is equivalent to "-dx ..."). Commands restrict the search to a term type (dx, sx, hx, px, tx, rx), search a specific code vocabulary (icd10, snomed, cpt, loinc, rxnorm, and others), or switch result type (draw, list, form, library, childterms, customterms). Case-insensitive. See the remarks for the complete list.
- `SearchVersion` (integer, optional) — Term search algorithm version. Use version 1 for the legacy Medcin Engine search, version 2 to use the ITermSearchService.
- `MaxResults` (integer, optional) — Maximum number of results to return when paging is not used. Defaults to -1 (no limit). Superseded by `PageSize`; for paged access use `StartIndex` and `PageSize` instead.
- `StartIndex` (integer, optional) — For paged results, the zero-based index of the first item to return. Defaults to 0. Only takes effect when `PageSize` is greater than 0.
- `PageSize` (integer, optional) — For paged results, the number of items per page. Defaults to -1 (paging disabled). When greater than 0, the response adds StartIndex, PageSize, Page, and Pages attributes.
- `IncludeImages` (boolean, optional) — When true (default), includes related images from the MEDCIN Knowledge Base and Content Library. Automatically disabled when `TermRoots` restricts the search to a subtree, and by term-type commands. To also include images built into the MEDCIN engine, set `UseMedcinServerImages`.
- `Tags` (string, optional) — Comma-separated list of tag sets to evaluate and attach to matching terms (for example HCC or other quality tags). Returned per item in the Tags attribute, alongside built-in tags such as udf (custom/user-defined), ret (retired), and rn (nurse role). Defaults to none.
- `UseApproximateMatching` (boolean, optional) — Enables fuzzy matching (default true), so approximate spellings and minor misspellings in `Query` still match terms.
- `PatientSex` (string, optional) — Patient sex used to filter out sex-specific terms: M or F. For example, an F patient excludes male-only findings. Leave blank (default) to disable sex filtering. Ignored for family-history queries. May be supplied directly or resolved from `PatientId`.
- `PatientAge` (integer, optional) — Patient age in minutes, used to filter age-specific terms and content. Defaults to 0 (no age filtering). MEDCIN expresses age in minutes for neonatal/pediatric precision; for example 1 year is about 525,960 minutes. May be supplied directly or resolved from `PatientId`.
- `PatientId` (string, optional) — Patient identifier used to look up age and sex from the configured patient data provider, as an alternative to passing `PatientAge` and `PatientSex` directly. Requires an IPatientDataService. Defaults to none.
- `EncounterTime` (string, optional) — The encounter date/time used to compute patient age when `PatientId` is supplied (age = encounter time − birth date). Defaults to the current time when a patient is resolved. Has no effect when age and sex are passed directly.
- `IncludeScore` (boolean, optional) — When true, adds the computed relevance Score to each result. Higher scores indicate a closer match (exact matches rank highest, then prefix matches, then partial-word matches). Defaults to false.
- `IncludeHighlight` (boolean, optional) — When true (default), each result includes a Highlight attribute: a list of [start, length] character ranges marking where the query matched the term text, for highlighting in a UI.
- `TermRoots` (string, optional) — One or more MEDCIN ids to use as search roots. A value ≥ 0 limits results to descendants of that term; -1 (default) means no restriction; 0 limits results to MEDCIN terms only. When multiple roots are supplied, all must be greater than zero. Supplying a root also disables image and content-library results.
- `TermDepth` (integer, optional) — When a positive `TermRoots` value is set, limits how many levels below the root are searched. Defaults to -1 (no depth limit).
- `UseMedcinServerImages` (boolean, optional) — When true, also searches images built into the MEDCIN engine, in addition to Knowledge Base and Content Library images. Defaults to false; only effective when `IncludeImages` is true.
- `DataFormat` (enum, optional) — Specifies how objects are encoded in the output
  - Allowed values: `Default`, `XML`, `JSON`, `JSF`
- `RequestId` (string, optional) — Optional value that can be used by clients to track multiple requests.
- `Culture` (string, optional) — Culture to use when handling the request. If not specified the default value configured on the server will be used.

## Response

### 200

Successful response

- `searchResults` (object, optional)
  - `item` (list of object, optional)
    - `id` (string, optional)
    - `text` (string, optional)
    - `type` (string, optional)
    - `score` (integer, optional)
    - `termType` (integer, optional)
    - `nodeKey` (string, optional)
    - `prefix` (string, optional)
    - `result` (string, optional)
    - `subs` (enum, optional)
      - Allowed values: `+`, ``
    - `highlight` (string, optional)
    - `tags` (string, optional)
  - `suggestion` (string, optional)
  - `message` (string, optional)
  - `startIndex` (integer, optional)
  - `pageSize` (integer, optional)
  - `page` (integer, optional)
  - `pages` (integer, optional)
  - `query` (string, optional)
  - `count` (integer, optional)
  - `time` (double, optional)
  - `command` (string, optional)

## Examples

**Response**

```json
{
  "searchResults": {
    "item": [
      {
        "id": "1006398",
        "text": "headache",
        "type": "term",
        "score": 1,
        "termType": 1,
        "nodeKey": "-AAVVX",
        "prefix": "string",
        "result": "string",
        "subs": "+",
        "highlight": "[[0,8]]",
        "tags": "udf"
      }
    ],
    "suggestion": "string",
    "message": "string",
    "startIndex": 1,
    "pageSize": 1,
    "page": 1,
    "pages": 1,
    "query": "headache",
    "count": 42,
    "time": 647,
    "command": "string"
  }
}
```

**SDK Code**

```python
import requests

url = "https://quippe.medicomp.com/api/Quippe/Search"

querystring = {"Query":"Query"}

response = requests.get(url, params=querystring, auth=("<username>", "<password>"))

print(response.json())
```

```javascript
const url = 'https://quippe.medicomp.com/api/Quippe/Search?Query=Query';
const credentials = btoa("<username>:<password>");

const options = {method: 'GET', headers: {Authorization: `Basic ${credentials}`}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://quippe.medicomp.com/api/Quippe/Search?Query=Query"

	req, _ := http.NewRequest("GET", url, nil)

	req.SetBasicAuth("<username>", "<password>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://quippe.medicomp.com/api/Quippe/Search?Query=Query")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request.basic_auth("<username>", "<password>")

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://quippe.medicomp.com/api/Quippe/Search?Query=Query")
  .basicAuth("<username>", "<password>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://quippe.medicomp.com/api/Quippe/Search?Query=Query', [
  'headers' => [
  ],
    'auth' => ['<username>', '<password>'],
]);

echo $response->getBody();
```

```csharp
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://quippe.medicomp.com/api/Quippe/Search?Query=Query");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.GET);

IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = ["Authorization": "Basic \(credentials)"]

let request = NSMutableURLRequest(url: NSURL(string: "https://quippe.medicomp.com/api/Quippe/Search?Query=Query")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```