# Email to Profile data

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

```bash
cURL 'https://api.enrich.so/v1/api/person?email=<username@domain.com>&in_realtime=false' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json'
```

{% endtab %}

{% tab title="Javascript" %}

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

axios.get('https://api.enrich.so/v1/api/person?email=<username@domain.com>', {
    headers: {accept: 'application/json', Authorization: 'Bearer <token>'}
})
  .then(response => {
    console.log(response.data);
  })
  .catch(error => {
    console.log(error);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
payload = {'email':'<username@domain.com>'}
headers = {'accept': 'application/json', 'authorization': 'Bearer <token>'}
resp = requests.get('https://api.enrich.so/v1/api/person', params=payload, headers=headers)
print (resp.text)
```

{% endtab %}

{% tab title="Java" %}

```java
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.enrich.so/v1/api/person?email=<username@domain.com>")
  .get()
  .addHeader("accept", "application/json")
  .addHeader("authorization", "Bearer <token>")
  .build();

Response response = client.newCall(request).execute();
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.enrich.so/v1/api/person?email=<username@domain.com>")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'
request["authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

{% endtab %}

{% tab title="Php" %}

```php
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.enrich.so/v1/api/person?email=<username@domain.com>",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "accept: application/json",
    "authorization: Bearer <token>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}

```javascript
You can use the in_realtime flag true to retrieve data while skipping cached data points.
```

{% endhint %}

## Example response

```json
{
  "displayName": "Bill Gates",
  "firstName": "Bill",
  "lastName": "Gates",
  "headline": "Co-chair, Bill & Melinda Gates Foundation",
  "occupation": "Co-chair at Bill & Melinda Gates Foundation",
  "summary": "Co-chair of the Bill & Melinda Gates Foundation. Founder of Breakthrough Energy. Co-founder of Microsoft. Voracious reader. Avid traveler. Active blogger.",
  "location": "Seattle, Washington, United States of America",
  "photoUrl": "https://kollect-assets.sgp1.digitaloceanspaces.com/enrich-images/2f4393ba-321c-4e38-aa35-9ba1d9071e1e.jpg",
  "linkedInUrl": "https://www.linkedin.com/in/williamhgates/",
  "connectionCount": 9,
  "isConnectionCountObfuscated": false,
  "skills": [],
  "locale": {
    "country": "us",
    "language": "en"
  },
  "schools": {
    "educationsCount": 2,
    "educationHistory": [
      {
        "school": {
          "schoolName": "Harvard University",
          "schoolLocation": null,
          "schoolLogo": "https://media.licdn.com/dms/image/C4E0BAQF5t62bcL0e9g/company-logo_100_100/0/1519855919126?e=2147483647&v=beta&t=xQR2sj62cuK1N9Gc38PeaCYdYYlRO5Bx8ssZpQp3Pds",
          "linkedInUrl": null
        },
        "degreeName": null,
        "startEndDate": {
          "start": {
            "year": 1973
          },
          "end": {
            "year": 1975
          }
        },
        "fieldOfStudy": null,
        "schoolName": "Harvard University",
        "schoolLocation": "Madhya Pradesh, India",
        "schoolLogo": "https://media.licdn.com/dms/image/C4E0BAQF5t62bcL0e9g/company-logo_100_100/0/1519855919126?e=2147483647&v=beta&t=xQR2sj62cuK1N9Gc38PeaCYdYYlRO5Bx8ssZpQp3Pds",
        "linkedInUrl": null
      }
    ]
  },
  "positions": {
    "positionsCount": 3,
    "positionHistory": [
      {
        "title": "Founder",
        "startEndDate": {
          "start": {
            "month": 1,
            "year": 2015
          },
          "end": null
        },
        "company": {
          "companyName": "Breakthrough Energy",
          "companyLocation": null,
          "companyLogo": "https://media.licdn.com/dms/image/C4D0BAQGwD9vNu044FA/company-logo_100_100/0/1601560874941?e=2147483647&v=beta&t=kU-bG3k-Zo4SCW6HwfGmVKW_iyPkuVilSsXtp1kWxcM",
          "linkedInUrl": "https://www.linkedin.com/company/breakthrough-energy"
        },
        "companyName": "Breakthrough Energy",
        "companyLocation": null,
        "companyLogo": "https://kollect-assets.sgp1.digitaloceanspaces.com/enrich-images/2ca8d10b-d35a-49cd-aef3-dbeceafc22ef.jpg",
        "linkedInUrl": "https://www.linkedin.com/company/breakthrough-energy"
      }
    ]
  },
  "skillEndorsements": null,
  "userGeneratedContents": {},
  "people_also_viewed": [],
  "recommendations": [],
  "languages": [],
  "accomplishment_organisations": [],
  "accomplishment_publications": [],
  "accomplishment_honors_awards": [],
  "accomplishment_patents": [],
  "accomplishment_courses": [],
  "accomplishment_projects": [],
  "accomplishment_test_scores": [],
  "volunteer_work": [],
  "certifications": [],
  "groups": [],
  "version": 1
}
```
