Docs · Media transcript
Media transcript
Transcribe speech from a public Instagram video or reel.
https://api.lurkapi.com/v2/instagram/media/transcriptWhen to use this
Pass a public reel or video URL with a known duration of at most 120 seconds. Speech-to-text costs 5 credits when it succeeds; a cached transcript costs 1 credit because speech-to-text does not run again. Photos, videos without a known duration, longer videos, unavailable audio and private media cannot be transcribed. Transcription is machine-generated and can contain errors.
Parameters
All parameters go in the query string.
| Parameter | Description |
|---|---|
codestringoptional | The post's shortcode, e.g. Ddl5eH-u4le. Required unless url is given. |
urlstringoptional | An instagram.com/p/, /reel/ or /tv/ URL, or the shortcode. Required unless code is given.
|
Example request
Replace YOUR_API_KEY with your key, or set LURKAPI_KEY for the code. Get a free key.
curl "https://api.lurkapi.com/v2/instagram/media/transcript?url=https%3A%2F%2Fwww.instagram.com%2Freel%2FDdl5eH-u4le%2F" \
-H "x-api-key: YOUR_API_KEY"const params = new URLSearchParams({
url: "https://www.instagram.com/reel/Ddl5eH-u4le/",
});
const res = await fetch(`https://api.lurkapi.com/v2/instagram/media/transcript?${params}`, {
headers: { "x-api-key": process.env.LURKAPI_KEY },
});
const data = await res.json();
if (!data.success) throw new Error(`${data.code}: ${data.error}`);
console.log(data.segments);import os
import requests
res = requests.get(
"https://api.lurkapi.com/v2/instagram/media/transcript",
params={
"url": "https://www.instagram.com/reel/Ddl5eH-u4le/",
},
headers={"x-api-key": os.environ["LURKAPI_KEY"]},
timeout=60,
)
data = res.json()
if not data["success"]:
raise RuntimeError(f"{data['code']}: {data['error']}")
print(data["segments"])Example response
A real response from this endpoint, captured from the live API and trimmed to a couple of items. Strings over 96 characters (mostly signed media URLs) are cut short and end in ….
Show the example response (2 KB)Hide
{
"success": true,
"credits_remaining": 999995,
"credits_charged": 5,
"code": "Ddl5eH-u4le",
"url": "https://www.instagram.com/p/Ddl5eH-u4le/",
"transcript": "Caitlin Clark is just a normal girl from Iowa, raised to do normal stuff…",
"source": "speech_to_text",
"language": "en",
"duration_s": 30.0248125,
"segments": [
{
"start": 0.3,
"end": 4.92,
"text": "Caitlin Clark is just a normal girl from Iowa, raised to do normal stuff."
},
{
"start": 5.12,
"end": 9.22,
"text": "Cereal for breakfast, football on Sundays, golf on her days off."
},
{
"start": 9.46,
"end": 11.72,
"text": "Eventually, she grew up and got a job."
},
{
"start": 11.94,
"end": 20.48,
"text": "At this job, she sells out a variety of arenas, shoots from distances pr…"
},
{
"start": 20.72,
"end": 25.84,
"text": "The media finds all of this extremely interesting, but to her, this is all totally normal."
},
{
"start": 26.62,
"end": 28.26,
"text": "Nothing special to see here."
}
]
}Response fields
Every field of a successful response. [] marks a list: a[].b is the b of each item in a. nullable fields can be null; optional fields can be missing.
Show all 13 fieldsHide
| Field | Type | Description |
|---|---|---|
| success | true | Always true here; errors have success: false. |
| credits_remaining | number | Your balance after this call. On anonymous playground calls: free tries left today. |
| credits_charged | number | Credits this call cost; 0 on free endpoints. On anonymous playground calls: tries used (1). |
| code | string | The video's Instagram shortcode. |
| url | string | Canonical Instagram post URL. |
| transcript | string | Recognized speech as plain text; machine transcription may contain mistakes. |
| language | stringnullable | Detected spoken language, ISO 639-1; null when not returned. |
| duration_s | numbernullable | Audio duration in seconds; null when not shown or returned. A null count is not zero. |
| segments | object[] | Timed transcript segments returned by speech-to-text; empty when unavailable. |
| segments[].start | number | Segment start offset in seconds. |
| segments[].end | number | Segment end offset in seconds. |
| segments[].text | string | Recognized speech in this segment. |
| source | "speech_to_text" | How the transcript was produced: speech_to_text. |
Caching and freshness
Responses are cached for up to 1 hour, so a repeat call within that window can return the same data. It still costs 1 credit.
Errors
Errors return { success: false, error, code, docs } with the HTTP status below. Validation errors, 401/402/429 rejections and 5xx failures are free; not_found is charged (how charging works). All error codes.
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_params | A parameter is missing or invalid. issues names each one. |
| 401 | missing_api_key | No API key. Send it in the x-api-key header. |
| 401 | invalid_api_key | The key is unknown or was revoked. |
| 402 | insufficient_credits | Not enough credits for this call. Buy a pack or wait for tomorrow's top-up. |
| 403 | not_public | The platform confirmed this account or content isn't available to logged-out visitors. Use a publicly visible target. |
| 404 | not_found | The endpoint, or the thing you asked for (ad, post, subreddit), doesn't exist. Charged when the platform was checked. |
| 405 | method_not_allowed | Endpoints take GET with query params. |
| 429 | rate_limited | Too many calls at once. Wait for the retry-after seconds, then retry. |
| 500 | internal_error | Something broke on our side. Retry; 5xx errors are free. |
| 502 | upstream_error | The platform didn't give a usable answer. Retry; 5xx errors are free. |
| 503 | upstream_busy | All our connections to the platform are busy. Retry in a few seconds; 5xx errors are free. |
| 504 | upstream_timeout | The platform took over 30 seconds to answer. Retry; timeouts are free. |
Use it in Claude
Once LurkAPI is connected to Claude, this endpoint is the instagram_media_transcript tool. Ask in plain English, for example:
Use LurkAPI's instagram_media_transcript with url "https://www.instagram.com/reel/Ddl5eH-u4le/" and summarize what you find.Claude calls instagram_media_transcript with arguments like these, and each call costs 1 credit:
{
"url": "https://www.instagram.com/reel/Ddl5eH-u4le/"
}Tool results skip nulls and empty lists to save tokens.