# Search & Autocomplete

Enables a progressive search for individual elements (e.g. name, street) with the option to successively refine the results.

## Authentication with API key

An API key is required to access the API.

* The API key is provided by us upon successful [onboarding](https://www.multisource.ch/en/autocomplete-start).
* The API key must be transmitted in the header with every request.

Example:&#x20;

{% code overflow="wrap" %}

```http
curl 'https://api.multisource.ch/v2/Search/AutoComplete?source=business&value=swisscom+directories' \
  --header 'Auth-Key: <API-KEY>'
```

{% endcode %}

## API Endpoint

## GET /Search/AutoComplete

>

```json
{"openapi":"3.0.1","info":{"title":"multisource•api","version":"v2"},"tags":[{"name":"Search"}],"servers":[{"url":"https://api.multisource.ch/v2","description":"Production - v2"}],"security":[{"auth-key":[]}],"components":{"securitySchemes":{"auth-key":{"type":"apiKey","description":"API Key required for authorized endpoints.","name":"auth-key","in":"header"}},"schemas":{"SearchOutputOfListOfOutputAddress":{"type":"object","properties":{"hitCount":{"type":"integer","format":"int32"},"resultCount":{"type":"integer","format":"int32"},"data":{"type":"array","items":{"$ref":"#/components/schemas/OutputAddress"}}}},"OutputAddress":{"type":"object","properties":{"companyname":{"type":"string","nullable":true},"firstname":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"street":{"type":"string","nullable":true},"houseNumber":{"type":"string","nullable":true},"zip":{"type":"string","nullable":true},"location":{"type":"string","nullable":true}}}}},"paths":{"/Search/AutoComplete":{"get":{"tags":["Search"],"parameters":[{"name":"source","in":"query","required":true,"schema":{"type":"string"}},{"name":"value","in":"query","required":true,"schema":{"type":"string"}},{"name":"type","in":"query","description":"Optional.","schema":{"enum":["0 = Exact","1 = Like","2 = Phonetic","3 = PhoneticLike"],"type":"string","description":"**Allowed values:**\n- `0` = `Exact`\n- `1` = `Like`\n- `2` = `Phonetic`\n- `3` = `PhoneticLike`","default":1}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/SearchOutputOfListOfOutputAddress"}},"application/json":{"schema":{"$ref":"#/components/schemas/SearchOutputOfListOfOutputAddress"}},"text/json":{"schema":{"$ref":"#/components/schemas/SearchOutputOfListOfOutputAddress"}}}}}}}}}
```

## Parameters

<table><thead><tr><th width="130.1171875">Parameter</th><th width="110.0078125">Type</th><th width="500.01953125">Description</th><th>Example</th></tr></thead><tbody><tr><td><code>source</code></td><td>string</td><td><p>Data source:</p><ul><li><code>consumer</code> (Private individuals)</li><li><code>business</code> (Companies)</li><li><code>geo</code> (Addresses)</li><li>Multiple sources can be combined, comma-separated: <code>consumer,business</code></li></ul></td><td><code>consumer,business</code></td></tr><tr><td><code>value</code></td><td>string</td><td>Search term or phrase – combinations of name, city, street possible.</td><td><code>Lara Graf Zürich</code></td></tr></tbody></table>

## Response Fields

### Root-Level Fields

<table><thead><tr><th width="145">Field</th><th width="88">Type</th><th width="290">Description</th><th>Example</th></tr></thead><tbody><tr><td><code>hitCount</code></td><td>integer</td><td>Total number of matches in the database for the query</td><td><code>1</code></td></tr><tr><td><code>resultCount</code></td><td>integer</td><td>Number of entries actually returned in the <code>data</code> array</td><td><code>1</code></td></tr><tr><td><code>data</code></td><td>array</td><td>Array containing the found directory entries</td><td>see output fields below</td></tr></tbody></table>

### Output Fields

<table><thead><tr><th width="145">Field</th><th width="88">Type</th><th width="290">Description</th><th>Example</th></tr></thead><tbody><tr><td><code>companyname</code></td><td>string</td><td>Company name for business entries</td><td><code>Swisscom Directories AG</code></td></tr><tr><td><code>firstname</code></td><td>string</td><td>First name for private individuals</td><td><code>Lara</code></td></tr><tr><td><code>name</code></td><td>string</td><td>Last name for private individuals</td><td><code>Graf</code></td></tr><tr><td><code>street</code></td><td>string</td><td>Street name</td><td><code>Förrlibuckstrasse</code></td></tr><tr><td><code>houseNumber</code></td><td>string</td><td>House number</td><td><code>62</code></td></tr><tr><td><code>zip</code></td><td>string</td><td> Postal code</td><td><code>8005</code></td></tr><tr><td><code>location</code></td><td>string</td><td>City or town name</td><td><code>Zürich</code></td></tr><tr><td><code>category</code></td><td>string</td><td><p>Category / industry</p><p>(multilingual: DE, FR, IT, EN)</p></td><td><p><code>"de": "Pizzakurier",</code></p><p><code>"en": "Pizza delivery",</code></p><p><code>"it": "Pizza consegne a domicilio",</code></p><p><code>"fr": Pizza livraison à domicile"</code></p></td></tr><tr><td><code>email</code></td><td>string</td><td>Email</td><td><code>info@abc.com</code></td></tr><tr><td><code>url</code></td><td>string</td><td>Website</td><td><code>www.multisource.ch</code></td></tr><tr><td><code>phoneNumbers</code></td><td>array</td><td>Array with one or more landline numbers</td><td><p><code>[</code></p><p><code>“*0800 123 456",</code></p><p><code>"*058 123 45 67"</code></p><p><code>]</code> </p></td></tr><tr><td><code>mobileNumbers</code></td><td>array</td><td>Array with one or more mobile numbers</td><td><p><code>[</code></p><p><code>“*079  123 45 67"</code></p><p><code>]</code></p></td></tr></tbody></table>

## Metrics & Usage

**Monitor your usage** Use the `metrics/usage` endpoint to retrieve the number of requests sent and data elements returned for this module – broken down by time period. [**Learn more**](/multisource-integration-api/integration/metrics-and-usage.md)

## Plans

Monthly lookup packages and pricing. Change anytime at\
<https://www.multisource.ch/en/autocomplete-change><br>

<table data-view="cards"><thead><tr><th>Plan</th><th>Matches</th><th>Price</th></tr></thead><tbody><tr><td><strong>Starter</strong></td><td>1'000</td><td>CHF 19.00</td></tr><tr><td><strong>Pro</strong></td><td>5'000</td><td>CHF 59.00</td></tr><tr><td><strong>Business</strong></td><td>10'000</td><td>CHF 99.00</td></tr><tr><td><strong>Enterprise 50k</strong></td><td>50'000</td><td>CHF 395.00</td></tr><tr><td><strong>Enterprise 125k</strong></td><td>125'000</td><td>CHF 845.00</td></tr><tr><td><strong>Enterprise 250k</strong></td><td>250'000</td><td>CHF 1'450.00</td></tr><tr><td><strong>Unlimited</strong></td><td>1'000'000+</td><td>On Request</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://multisource.gitbook.io/multisource-integration-api/integration/search-and-autocomplete.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
