# Search customers

<mark style="color:blue;">`GET`</mark> `https://us-central1-appgregator.cloudfunctions.net/stripe/customers/search/`

#### Query Parameters

| Name                                               | Type   | Description                       |
| -------------------------------------------------- | ------ | --------------------------------- |
| name<mark style="color:red;">\*</mark>             | String | ft-4                              |
| connection\_name<mark style="color:red;">\*</mark> | String | stripe-1                          |
| limit                                              | 1      |                                   |
| query<mark style="color:red;">\*</mark>            | String | email:'<jenny.rosen@example.com>' |

#### Headers

| Name                                        | Type   | Description |
| ------------------------------------------- | ------ | ----------- |
| x-api-key<mark style="color:red;">\*</mark> | String | XXX         |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    "object": "search_result",
    "data": [
        {
            "id": "cus_LtLicgvX1EQaV8",
            "object": "customer",
            "address": {
                "city": "New York",
                "country": "USA",
                "line1": "jl.xxxx",
                "line2": null,
                "postal_code": null,
                "state": null
            },
            "balance": 18000,
            "created": 1655448660,
            "currency": "usd",
            "default_currency": "usd",
            "default_source": "src_1LChAzIyq0PiFIhULXbn6LKG",
            "delinquent": false,
            "description": "test only",
            "discount": null,
            "email": "jenny.rosen@example.com",
            "invoice_prefix": "7633C82C",
            "invoice_settings": {
                "custom_fields": null,
                "default_payment_method": "pm_1LBZ1EIyq0PiFIhU48bQlUDF",
                "footer": null,
                "rendering_options": null
            },
            "livemode": false,
            "metadata": {},
            "name": null,
            "next_invoice_sequence": 3,
            "phone": null,
            "preferred_locales": [],
            "shipping": null,
            "tax_exempt": "none",
            "test_clock": null
        }
    ],
    "has_more": false,
    "next_page": null,
    "url": "/v1/customers/search"
}
```

{% endtab %}
{% endtabs %}

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

```shell
curl --location --request GET 'https://us-central1-appgregator.cloudfunctions.net/stripe/customers/search?name=ft-4&connection_name=stripe-1&query=email:'\''jenny.rosen@example.com'\''&limit=1' \
--header 'x-api-key: XXX'
```

{% endtab %}

{% tab title="NodeJS - Axios" %}

```javascript
var axios = require('axios');

var config = {
  method: 'get',
  url: 'https://us-central1-appgregator.cloudfunctions.net/stripe/customers/search?name=ft-4&connection_name=stripe-1&query=email:\'jenny.rosen@example.com\'&limit=1',
  headers: { 
    'x-api-key': 'XXX'
  }
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

```

{% endtab %}

{% tab title="PHP - cURL" %}

```php
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://us-central1-appgregator.cloudfunctions.net/stripe/customers/search?name=ft-4&connection_name=stripe-1&query=email:\'jenny.rosen@example.com\'&limit=1',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'x-api-key: XXX'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

{% endtab %}
{% endtabs %}
