# Similar Contacts

To get more detail about the API parameters, response types and sample calls, click the arrow to the right on the card below.

## Get similar contacts

<mark style="color:blue;">`GET`</mark> `https://api.exactbuyer.com/v1/similar-contacts`

This endpoint allows you to find similar contacts for a given social profile/email/phone.

#### Query Parameters

| Name            | Type   | Description                                                        |
| --------------- | ------ | ------------------------------------------------------------------ |
| first\_name     | string | The first name of the person to look up.                           |
| last\_name      | string | The last name of the person to look up.                            |
| company\_name   | string | The name of a company where the person works at.                   |
| company\_domain | string | The website of a company where the person works at.                |
| phone           | string | The phone number to look up.                                       |
| email           | string | The email address to look up.                                      |
| social\_profile | string | The social profile to lookup e.g. linkedin profile URL             |
| size            | Int    | Number of similar companies in the output. Maximum: 10 Default: 10 |

#### Headers

| Name      | Type   | Description  |
| --------- | ------ | ------------ |
| X-API-Key | string | Your API key |

{% tabs %}
{% tab title="200 Fetched similar contacts successfully." %}

```json
[
    {
        "job_title": "Founder and Lead Consultant",
        "linkedin": [
            "linkedin.com/in/cynthia-ruff"
        ],
        "location": "atlanta, georgia, united states",
        "name": "Cynthia Ruff",
        "similarity_score": 1.74
    },
    {
        "job_title": "Chief Evangelist Officer",
        "linkedin": [
            "linkedin.com/in/thomasmschwab",
            "linkedin.com/in/tom-schwab-a2944310"
        ],
        "location": "kalamazoo, michigan, united states",
        "name": "Thomas Schwab",
        "similarity_score": 1.63
    },
    {
        "job_title": "Co-Founder & CTO",
        "linkedin": [
            "linkedin.com/in/hassan-chahrour-4b49b817"
        ],
        "location": "New York, United States of America",
        "name": "Hassan Chahrour",
        "similarity_score": 1.62
    },
    {
        "job_title": "Co-Founder & CTO",
        "linkedin": [
            "linkedin.com/in/hassanchr"
        ],
        "location": "New York, United States of America",
        "name": "Hassan Chahrour",
        "similarity_score": 1.62
    },
    {
        "job_title": "Co-Founder & CEO",
        "linkedin": [
            "linkedin.com/in/markeld",
            "linkedin.com/in/markellos-diorinos-aa6aa9"
        ],
        "location": "Athens Metropolitan Area, Greece",
        "name": "Markellos Diorinos",
        "similarity_score": 1.61
    },
    {
        "job_title": "Co-Founder & CMO",
        "linkedin": [
            "linkedin.com/in/jakubzajicek"
        ],
        "location": "Czechia, Czech Republic",
        "name": "Jakub Zajicek",
        "similarity_score": 1.52
    },
    {
        "job_title": "Co-Founder & CPO",
        "linkedin": [
            "linkedin.com/in/jasondebacco",
            "linkedin.com/in/jason-debacco-983b885"
        ],
        "location": "Caldwell, United States of America",
        "name": "Jason Debacco",
        "similarity_score": 1.51
    },
    {
        "job_title": "Founder",
        "linkedin": [
            "linkedin.com/in/frankovidal"
        ],
        "location": "canada",
        "name": "Franko Vidal",
        "similarity_score": 1.48
    },
    {
        "job_title": "Co-Founder and CEO",
        "linkedin": [
            "linkedin.com/in/katebradley",
            "linkedin.com/in/kate-bradley-chernis-2b0b8a3"
        ],
        "location": "New York City Metropolitan Area, United States of America",
        "name": "Kate Chernis",
        "similarity_score": 1.48
    },
    {
        "job_title": "Board Member",
        "linkedin": [
            "linkedin.com/in/alexharrisjdmba"
        ],
        "location": "San Francisco, United States of America",
        "name": "Alex Harris",
        "similarity_score": 0.53
    }
]
```

{% endtab %}

{% tab title="404 Could not fetch the contacts." %}

```
{
    "errorText": "No contact found for edan123@exactbuyer.com"
}
```

{% endtab %}
{% endtabs %}

<details>

<summary>API Response</summary>

{% code title="Similar Contacts" %}

```json
[
    {
        "job_title": "Founder and Lead Consultant",
        "linkedin": [
            "linkedin.com/in/cynthia-ruff"
        ],
        "location": "atlanta, georgia, united states",
        "name": "Cynthia Ruff",
        "similarity_score": 1.74
    },
    {
        "job_title": "Chief Evangelist Officer",
        "linkedin": [
            "linkedin.com/in/thomasmschwab",
            "linkedin.com/in/tom-schwab-a2944310"
        ],
        "location": "kalamazoo, michigan, united states",
        "name": "Thomas Schwab",
        "similarity_score": 1.63
    },
    {
        "job_title": "Co-Founder & CTO",
        "linkedin": [
            "linkedin.com/in/hassan-chahrour-4b49b817"
        ],
        "location": "New York, United States of America",
        "name": "Hassan Chahrour",
        "similarity_score": 1.62
    },
    {
        "job_title": "Co-Founder & CTO",
        "linkedin": [
            "linkedin.com/in/hassanchr"
        ],
        "location": "New York, United States of America",
        "name": "Hassan Chahrour",
        "similarity_score": 1.62
    },
    {
        "job_title": "Co-Founder & CEO",
        "linkedin": [
            "linkedin.com/in/markeld",
            "linkedin.com/in/markellos-diorinos-aa6aa9"
        ],
        "location": "Athens Metropolitan Area, Greece",
        "name": "Markellos Diorinos",
        "similarity_score": 1.61
    },
    {
        "job_title": "Co-Founder & CMO",
        "linkedin": [
            "linkedin.com/in/jakubzajicek"
        ],
        "location": "Czechia, Czech Republic",
        "name": "Jakub Zajicek",
        "similarity_score": 1.52
    },
    {
        "job_title": "Co-Founder & CPO",
        "linkedin": [
            "linkedin.com/in/jasondebacco",
            "linkedin.com/in/jason-debacco-983b885"
        ],
        "location": "Caldwell, United States of America",
        "name": "Jason Debacco",
        "similarity_score": 1.51
    },
    {
        "job_title": "Founder",
        "linkedin": [
            "linkedin.com/in/frankovidal"
        ],
        "location": "canada",
        "name": "Franko Vidal",
        "similarity_score": 1.48
    },
    {
        "job_title": "Co-Founder and CEO",
        "linkedin": [
            "linkedin.com/in/katebradley",
            "linkedin.com/in/kate-bradley-chernis-2b0b8a3"
        ],
        "location": "New York City Metropolitan Area, United States of America",
        "name": "Kate Chernis",
        "similarity_score": 1.48
    },
    {
        "job_title": "Board Member",
        "linkedin": [
            "linkedin.com/in/alexharrisjdmba"
        ],
        "location": "San Francisco, United States of America",
        "name": "Alex Harris",
        "similarity_score": 0.53
    }
]
```

{% endcode %}

</details>

#### Minimum Inputs

The minimum combination of inputs that must be present in a request to return valid similar contacts is mentioned below:

```
email OR social_profile OR phone OR (
    first_name AND last_name AND (company_domain OR company_name)) 
```

## Examples

#### Get similar contacts via LinkedIn profile

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

```python
import requests

url = "https://api.exactbuyer.com/v1/similar-contacts"

headers = {
  'X-API-Key': 'YOUR_API_KEY'
}

params = {
    'social_profile': 'https://www.linkedin.com/in/edankrolewicz/',
}

response = requests.get(
  url,
  headers=headers,
  params=params)

print(response.text)
```

{% endtab %}

{% tab title="cURL" %}

```bash
curl --location --request GET 'https://api.exactbuyer.com/v1/similar-contacts?social_profile=https://www.linkedin.com/in/edankrolewicz/' \
--header 'X-API-Key: YOUR_API_KEY'
```

{% endtab %}

{% tab title="Javascript" %}

```javascript
const myHeaders = new Headers();
myHeaders.append("X-API-Key", "YOUR_API_KEY");


const requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://api.exactbuyer.com/v1/similar-contacts?social_profile=https://www.linkedin.com/in/edankrolewicz/", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
```

{% endtab %}
{% endtabs %}

#### Get similar contacts via first name, last name & company domain.

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

```python
import requests

url = "https://api.exactbuyer.com/v1/similar-contacts"

headers = {
  'X-API-Key': 'YOUR_API_KEY'
}

params = {
    'first_name': 'edan',
    'last_name': 'krolewicz',
    'company_domain': 'exactbuyer.com',
    'required': 'work_email, personal_email'
}

response = requests.get(
  url,
  headers=headers,
  params=params)

print(response.text)
```

{% endtab %}

{% tab title="cURL" %}

```bash
curl --location --request GET 'https://api.exactbuyer.com/v1/similar-contacts?last_name=krolewicz&first_name=edan&company_domain=exactbuyer.com' \
--header 'X-API-Key: YOUR_API_KEY'
```

{% endtab %}

{% tab title="Javascript" %}

```javascript
const myHeaders = new Headers();
myHeaders.append("X-API-Key", "YOUR_API_KEY");


const requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://api.exactbuyer.com/v1/similar-contacts?last_name=krolewicz&first_name=edan&company_domain=exactbuyer.com", requestOptions)  
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
```

{% 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.exactbuyer.com/recommendations/enrichment.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.
