# Filtering addresses

Below is a list of attributes available for [filtering](/documentation/api-reference/filtering.md) addresses.

<table><thead><tr><th width="321.32421875" valign="top">Attribute</th><th>Type</th></tr></thead><tbody><tr><td valign="top"><code>type</code></td><td><p>string</p><p></p><p>Valid values are <code>main</code>, <code>alternative</code>, and <code>other</code>.</p></td></tr><tr><td valign="top"><code>propertyNumber</code></td><td>string</td></tr><tr><td valign="top"><code>buildingName</code></td><td>string</td></tr><tr><td valign="top"><code>line</code></td><td>string</td></tr><tr><td valign="top"><code>city</code></td><td>string</td></tr><tr><td valign="top"><code>state</code></td><td>string</td></tr><tr><td valign="top"><code>country</code></td><td>string<br><br>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 - Get all addresses for one type

In the example below, we will request to get all addresses that are of type `main`.

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

```bash
curl -X GET https://api.complycube.com/v1/addresses?clientId={:clientId}&type=main \
     -H 'Authorization: <YOUR_API_KEY>'
```

{% endtab %}

{% tab title="Python" %}

```python
from complycube import ComplyCubeClient

cc_api = ComplyCubeClient(api_key='<YOUR_API_KEY>')

filtered = cc_api.addresses.list('CLIENT_ID',type='main')
```

{% endtab %}

{% tab title="PHP" %}

```php
use ComplyCube\ComplyCubeClient;

$ccapi = new ComplyCubeClient('<YOUR_API_KEY>');

$filtered = $ccapi->address()->list($clientId , ['type' => 'main']);
```

{% endtab %}

{% tab title=".NET" %}

```csharp
using ComplyCube.Net;
using ComplyCube.Net.Resources.Addresses;

var addressApi = new AddressApi(new ComplyCubeClient("<YOUR_API_KEY>"));

var filter = new AddressRequest { type = "main" };

var address = await addressApi.ListAsync("CLIENT_ID", filter);
```

{% endtab %}
{% endtabs %}


---

# 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://docs.complycube.com/documentation/api-reference/core-resources/addresses/filtering-addresses.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.
