LinkedIn profile posts
GET https://api.api.sh/linkedin/v1/profile/posts
The recent posts a public LinkedIn profile shows logged out (about 10), plus the comments and reactions activity it shows: post link, activity id, author and link, age, text, shared link, image, reaction and comment counts.
Every response includes credits_used: the credits this call cost.
Parameters
| name | type | description |
|---|---|---|
urlrequired | string | Profile link (linkedin.com/in/<handle>) or handle. Example: williamhgates |
Every endpoint also takes fresh, raw, fields (see lean responses and caching).
Example
curl "https://api.api.sh/linkedin/v1/profile/posts?url=williamhgates" \
-H "x-api-key: $APISH_KEY" import os, requests
res = requests.get(
"https://api.api.sh/linkedin/v1/profile/posts",
params={"url": "williamhgates"},
headers={"x-api-key": os.environ["APISH_KEY"]},
timeout=120,
)
res.raise_for_status()
data = res.json() const url = new URL("https://api.api.sh/linkedin/v1/profile/posts");
url.searchParams.set("url", "williamhgates");
const res = await fetch(url, { headers: { "x-api-key": process.env.APISH_KEY } });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json(); Response
A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).
Example response (real call, trimmed: lists cut to 2 items, long text shortened, raw left out)
{"profile": "Bill Gates - Chair, Gates Foundation and Founder, Breakthrough Energy","url": "https://www.linkedin.com/in/williamhgates","count": 10,"posts": [{"kind": "post","url": "https://www.linkedin.com/posts/williamhgates_world-bank-says-small-ai-could-transform-activity-7522801130767224832-2eZH","urn": "urn:li:activity:7522801130767224832","activity_id": "7522801130767224832","author": "Bill Gates","author_url": "https://www.linkedin.com/in/williamhgates","age": "1d","headline": null,"text": "Useful advice for farmers, in their own language, on a phone they already have in their pocket. That’s the type of AI I’m excited about.","shared_url": "https://www.theguardian.com/technology/2026/oct/18/world-bank-artificial-intelligence-developing-economies","shared_title": null,"image": "https://media.licdn.com/dms/image/sync/v2/D4E27AQFkOX_Yu-a3fA/articleshare-shrink_800/B4EaFOeCzFLEAc-/0/1792317861513?e=2147483647&v=beta&t=…","reactions": 1261,"comments": 225},{"kind": "post","url": "https://www.linkedin.com/posts/williamhgates_millions-of-children-arent-getting-vaccinated-activity-7522355573359558657-snZT","urn": "urn:li:activity:7522355573359558657","activity_id": "7522355573359558657","author": "Bill Gates","author_url": "https://www.linkedin.com/in/williamhgates","age": "2d","headline": null,"text": "We have vaccines that can save children’s lives, but 13.5 million kids have never received a single dose. Many live in remote areas that are…","shared_url": "https://theconversation.com/millions-of-children-arent-getting-vaccinated-how-mapping-tools-can-help-find-them-290370","shared_title": null,"image": "https://media.licdn.com/dms/image/sync/v2/D4E27AQGC_jVEpCLIJQ/articleshare-shrink_800/B4EaFUr15UKsAc-/0/1792422142510?e=2147483647&v=beta&t=…","reactions": 1368,"comments": 227},"… 8 more"],"activity_count": 4,"other_activity": [{"kind": "reaction","url": "https://www.linkedin.com/posts/yasmin-mulji_what-does-a-doctor-say-to-a-philanthropist-activity-7520763761922744320-36M0","urn": "urn:li:activity:7521763026652368896","activity_id": "7521763026652368896","author": "Dr Yasmin Mulji","author_url": "https://uk.linkedin.com/in/yasmin-mulji","age": "1w","headline": null,"text": "What does a doctor say to a philanthropist who’s already given over $100bn to improve global health and reduce poverty, and yet is still wil…","shared_url": null,"shared_title": null,"image": "https://media.licdn.com/dms/image/v2/D4E22AQFBvS1CHMQQXQ/feedshare-shrink_800/B4EaF6bBF6I4Ac-/0/1793055266051?e=2147483647&v=beta&t=9Bu0ODiT…","reactions": 177,"comments": 11},{"kind": "reaction","url": "https://www.linkedin.com/posts/yasmin-mulji_what-does-a-doctor-say-to-a-philanthropist-activity-7520763761922744320-36M0","urn": null,"activity_id": "7520763761922744320","author": "Dr Yasmin Mulji","author_url": "https://uk.linkedin.com/in/yasmin-mulji","age": "1w","headline": null,"text": "What does a doctor say to a philanthropist who’s already given over $100bn to improve global health and reduce poverty, and yet is still wil…","shared_url": null,"shared_title": null,"image": "https://media.licdn.com/dms/image/v2/D4E22AQFBvS1CHMQQXQ/feedshare-shrink_800/B4EaF6bBF6I4Ac-/0/1793055266051?e=2147483647&v=beta&t=9Bu0ODiT…","reactions": null,"comments": null},"… 2 more"],"cached": false,"credits_used": 1} The fastest way to see the full response is the playground: it runs this endpoint with your account and shows the exact JSON.