Get profile
GET
/v1/profile
$0.0640 per request
Get the LinkedIn profile of the user.
Get the LinkedIn profile of the user. Required at least one of the query parameters
Try it
Runs against the sandbox, so it is free and needs no API key. The response shape is identical to the live endpoint.
GET
Sandbox · free
/v1/profile
Parameters
Billed equivalent
With a real key this call costs at Starter, less your tier discount.
Response
msQuery parameters
At least one of
url, publicIdentifier, profileId is required.
| Parameter | Example | Description |
|---|---|---|
profileId
required
|
— | ID of the LinkedIn profile (optional) |
publicIdentifier
required
|
williamhgates | Public identifier of the LinkedIn profile (optional) |
url
required
|
https://www.linkedin.com/in/williamhgates | URL of the LinkedIn profile (optional) |
short
|
— | Include this parameter to return a short version of the profile (includes name, title, followers and some other info). |
Code
curl 'https://api.enricho.io/v1/profile?publicIdentifier=williamhgates&url=https%3A%2F%2Fwww.linkedin.com%2Fin%2Fwilliamhgates' \
-H 'X-API-Key: YOUR_API_KEY'
import requests
response = requests.get(
"https://api.enricho.io/v1/profile",
headers={"X-API-Key": "YOUR_API_KEY"},
params={
'publicIdentifier': 'williamhgates',
'url': 'https://www.linkedin.com/in/williamhgates',
},
timeout=30,
)
response.raise_for_status()
# Every response reports what it cost and what is left.
print(response.headers["X-Request-Cost"], response.headers["X-Balance-Remaining"])
print(response.json())
const params = new URLSearchParams({
"publicIdentifier": "williamhgates",
"url": "https://www.linkedin.com/in/williamhgates"
});
const response = await fetch(`https://api.enricho.io/v1/profile?${params}`, {
headers: { 'X-API-Key': 'YOUR_API_KEY' },
});
if (!response.ok) {
throw new Error(`${response.status}: ${(await response.json()).error.message}`);
}
console.log(response.headers.get('X-Request-Cost'));
console.log(await response.json());
$client = new GuzzleHttp\Client();
$response = $client->get('https://api.enricho.io/v1/profile', [
'headers' => ['X-API-Key' => 'YOUR_API_KEY'],
'query' => [
'publicIdentifier' => 'williamhgates',
'url' => 'https://www.linkedin.com/in/williamhgates',
],
'timeout' => 30,
]);
echo $response->getHeaderLine('X-Request-Cost');
$data = json_decode((string) $response->getBody(), true);
Example response
{
"error": "You need to provide at least one valid argument: url, publicIdentifier, or profileId",
"element": null,
"query": [],
"status": 400
}
Error response
Full list of codes on the errors page.
{
"error": {
"code": "invalid_params",
"message": "profile requires at least one of: url, publicIdentifier, profileId.",
"docs": "https://enricho.io/docs/errors#invalid_params",
"required_one_of": [
"url",
"publicIdentifier",
"profileId"
]
}
}