Skip to content
Enricho

Profile posts

GET /v1/profile-posts $0.0400 per request

Get LinkedIn profile posts by profile URL, ID, or public identifier.

Get LinkedIn profile posts by profile URL, ID, or public identifier.

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 /v1/profile-posts
Sandbox · free

Parameters

Billed equivalent


                

With a real key this call costs at Starter, less your tier discount.

Response


        

Query parameters

At least one of profile, profileId, profilePublicIdentifier is required.

Parameter Example Description
profile required https://www.linkedin.com/in/williamhgates Filter posts by author's profile URL
profileId required Filter posts by author's profile ID. It's faster to search by ID
profilePublicIdentifier required Filter posts by author's profile public identifier (last part in the URL).
page 1 Page number for pagination
paginationToken Required if it was returned by the previous page. Otherwise the page will always be 1 (on LinkedIn side). Doesn't apply for all queries, usually profile posts return this token
postedLimit Filter posts by maximum posted date. Supported values: '24h', 'week', 'month'. Since LinkedIn doesn't offer a way to filter by date, the filtering will be done on our side, due to that the pagination might have incorrect values, because pagination is returned by LinkedIn without applying the postedLimit filter

Code

curl 'https://api.enricho.io/v1/profile-posts?profile=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-posts",
    headers={"X-API-Key": "YOUR_API_KEY"},
    params={
    'profile': '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({
    "profile": "https://www.linkedin.com/in/williamhgates"
});

const response = await fetch(`https://api.enricho.io/v1/profile-posts?${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-posts', [
    'headers' => ['X-API-Key' => 'YOUR_API_KEY'],
    'query' => [
        'profile' => 'https://www.linkedin.com/in/williamhgates',
    ],
    'timeout' => 30,
]);

echo $response->getHeaderLine('X-Request-Cost');

$data = json_decode((string) $response->getBody(), true);

Example response

{
    "pagination": null,
    "elements": null,
    "error": "No valid target provided",
    "status": 400,
    "query": []
}

Error response

Full list of codes on the errors page.

{
    "error": {
        "code": "invalid_params",
        "message": "profile-posts requires at least one of: profile, profileId, profilePublicIdentifier.",
        "docs": "https://enricho.io/docs/errors#invalid_params",
        "required_one_of": [
            "profile",
            "profileId",
            "profilePublicIdentifier"
        ]
    }
}