# Search address

Searches for an address.

The API returns a list of matching addresses.

### URL

<mark style="color:green;">**POST**</mark> `https://api.complycube.com/v1/lookup/addresses`

### Headers

<table><thead><tr><th width="277">Name</th><th width="95">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>Content-Type</code><mark style="color:red;">*</mark></td><td>string</td><td>The content-type must always be set to <code>application/json</code>.</td></tr><tr><td><code>Authorization</code><mark style="color:red;">*</mark></td><td>string</td><td>The API <code>live</code> or <code>test</code> key.</td></tr></tbody></table>

### Body

<table><thead><tr><th width="277">Name</th><th width="93">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>line</code><mark style="color:red;">*</mark></td><td>string</td><td>The line of the address.</td></tr><tr><td><code>country</code><mark style="color:red;">*</mark></td><td>string</td><td>The country of the address. This will be the <a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">two-letter country ISO code</a>.</td></tr><tr><td><code>postalCode</code><mark style="color:red;">*</mark></td><td>string</td><td>The zip or postal code of the address.</td></tr></tbody></table>

### Example request

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X POST https://api.complycube.com/v1/lookup/addresses \
     -H 'Authorization: <YOUR_API_KEY>' \
     -H 'Content-Type: application/json' \
     -d '{
               "line": "350 Fifth",
               "postalCode": "10118",
               "country": "US"
        }'
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
const { ComplyCube } = require("@complycube/api");

const complycube = new ComplyCube({ apiKey: "<YOUR_API_KEY>" });

const client = await complycube.lookup.searchAddress({
    line: "350 Fifth",
    postalCode: "10118",
    country: "US"
});
```

{% endtab %}
{% endtabs %}

### The Address object

<table><thead><tr><th width="246.0881760603683">Attribute</th><th width="87">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>propertyNumber</code></td><td>string</td><td>The property number of the address.</td></tr><tr><td><code>buildingName</code></td><td>string</td><td>The building name of the address.</td></tr><tr><td><code>line</code></td><td>string</td><td>The line of the address.</td></tr><tr><td><code>city</code></td><td>string</td><td>The city or town of the address.</td></tr><tr><td><code>state</code></td><td>string</td><td>The county, state, or province of the client's address. When country is <code>US</code>, this will be the state's <a href="https://pe.usps.com/text/pub28/28apb.htm">USPS abbreviation</a> (e.g. <code>NY</code>, <code>CA</code>, or <code>DE</code>).</td></tr><tr><td><code>postalCode</code></td><td>string</td><td>The zip or postal code of the address.</td></tr><tr><td><code>country</code></td><td>string</td><td>The country of the address. This will be the <a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">two-letter country ISO code</a>.</td></tr></tbody></table>

### Example response

{% tabs %}
{% tab title="Success (200)" %}

```javascript
{
    "totalItems": 1,
    "items": [
        {
            "propertyNumber": "350",
            "line": "350 5th Ave, New York, NY 10118-0100",
            "city": "New York",
            "state": "NY",
            "postalCode": "10118-0100",
            "country": "US"
        }
    ]
}
```

{% endtab %}
{% endtabs %}
