# Filtering clients

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

<table><thead><tr><th width="362.1906390650572" valign="top">Attribute</th><th>Type</th></tr></thead><tbody><tr><td valign="top"><code>type</code></td><td>string<br><br>Valid values are <code>person</code> and <code>company</code>.</td></tr><tr><td valign="top"><code>email</code></td><td>string</td></tr><tr><td valign="top"><code>joinedDate</code></td><td>string</td></tr><tr><td valign="top"><code>mobile</code></td><td>string</td></tr><tr><td valign="top"><code>telephone</code></td><td>string</td></tr><tr><td valign="top"><code>externalId</code></td><td>string</td></tr><tr><td valign="top"><code>personDetails.firstName</code></td><td>string</td></tr><tr><td valign="top"><code>personDetails.middleName</code></td><td>string</td></tr><tr><td valign="top"><code>personDetails.lastName</code></td><td>string</td></tr><tr><td valign="top"><code>personDetails.dob</code></td><td>string</td></tr><tr><td valign="top"><code>personDetails.gender</code></td><td>string</td></tr><tr><td valign="top"><code>personDetails.nationality</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><tr><td valign="top"><code>personDetails.birthCountry</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><tr><td valign="top"><code>companyDetails.name</code></td><td>string</td></tr><tr><td valign="top"><code>companyDetails.website</code></td><td>string</td></tr><tr><td valign="top"><code>companyDetails.registrationNumber</code></td><td>string</td></tr><tr><td valign="top"><code>companyDetails.incorporationType</code></td><td>string</td></tr><tr><td valign="top"><code>companyDetails.incorporationCountry</code></td><td>string</td></tr><tr><td valign="top"><code>metadata.{yourCustomKey}</code></td><td>string</td></tr></tbody></table>

#### Example - Get all clients for one type

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

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

```bash
curl -X GET https://api.complycube.com/v1/clients?type=company \
     -H 'Authorization: <YOUR_API_KEY>'
```

{% endtab %}

{% tab title="Python" %}

```python
from complycube import ComplyCubeClient
cc_api = ComplyCubeClient(api_key='<YOUR API KEY>')

filter = { 'type':'company' }

companies = cc_api.clients.list(filter)
```

{% endtab %}

{% tab title="PHP" %}

```php
use ComplyCube\ComplyCubeClient;

$ccapi = new ComplyCubeClient('<YOUR API KEY>');

$companies = $ccapi->clients()->list(['type' => 'company']);
```

{% endtab %}

{% tab title=".NET" %}

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

var clientApi = new ClientApi(new ComplyCubeClient("<YOUR_API_KEY>"));

var filter = new ClientRequest { type = "company" };

var companies = await clientApi.ListAsync(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/clients/filtering.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.
