LinkedIn video transcript API
The captions of a LinkedIn video post: the full text and timed segments, read from the caption file LinkedIn serves with the video.
GET /v1/linkedin/posts/{post}/transcriptBeta10 credits per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/linkedin/posts/7529228974980526080/transcript",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 10 credits{ "activity_id": "7529228974980526080", "urn": "urn:li:activity:7529228974980526080", "url": "https://www.linkedin.com/posts/google_what-can-technical-revolutions-from-history-activity-7529228974980526080-1WIO", "language": "en", "duration": "PT47S", "source": "captions", "text": "Humans connected closely to machines will produce more than machines alone ever will or humans alone ever will. And so y…", "segments": [ { "start_ms": 110, "end_ms": 3971, "text": "Humans connected closely to machines will produce more than" }, { "start_ms": 3971, "end_ms": 7767, "text": "machines alone ever will or humans alone ever will. And so" }, "… 10 more" ]}Parameters
| Name | Type | Description |
|---|---|---|
postpath · required | string | The post URL (linkedin.com/posts/… or /feed/update/urn:li:activity:…), its activity id or URN. Example: 7528601878516084736. |
Response fields
200 with a LinkedInTranscript, in LinkedIn’s own schema.org JSON-LD, with the rest of the public page beside it.
| Field | Type | Description |
|---|---|---|
activity_id | string | null | |
urn | string | |
url | string | null | |
language | string | null | |
duration | string | null | ISO 8601 duration, e.g. PT47S. |
source | "captions" | "page" | captions: the timed caption file; page: the page’s transcript text. |
text | string | |
segments | object[] |
Status codes
| Status | Meaning |
|---|---|
200 | The transcript. |
400 | Invalid input. Nothing was charged. |
401 | Missing or invalid API key. |
402 | Not enough credits, a spend cap was reached, or payment is required. |
403 | The target is private, or the account is suspended. |
404 | LinkedIn has no such public page, or it was removed. |
429 | Too many requests. Wait for Retry-After seconds. |
503 | LinkedIn is temporarily unavailable. Retryable; nothing was charged. |
Every error has code, message, hint and retryable. All error codes
Questions
What if the video has no captions?
It answers 404 target_not_found and is never charged.
LinkedIn is a trademark of LinkedIn Corporation. We are not affiliated with or endorsed by LinkedIn.