LurkAPI
Docs · Media transcript

Media transcript

The words spoken in a public Instagram reel or video, as text.

1 credit per call; 2 if speech-to-text runsFresh within 30 daysMCP tool: instagram_media_transcript
GEThttps://api.lurkapi.com/v2/instagram/media/transcript

Example response

When to use this

Use it to get what's said in a reel as text. Pass a public reel or video URL; it works on videos up to 120 seconds. For a carousel, its first video is transcribed. The post's author, caption and preview image come with the transcript.

A new transcript costs 2 credits when speech-to-text succeeds. One we already have costs 1, since speech-to-text doesn't run again. A video with no audio or no speech returns 404 transcript_unavailable at the base price. (Instagram mutes reels whose song was removed.)

Photos, private posts, videos over 120 seconds and videos whose length Instagram doesn't give can't be transcribed. The transcript is machine-made and can contain mistakes.

Example request

Copy one and replace YOUR_API_KEY with your API key (get one free). The code versions read the key from the LURKAPI_API_KEY environment variable instead.

Language

Parameters

Add them to the URL after a ?. Join several with &.

ParameterDescription
code
stringoptional
The post's shortcode, the part after /p/ or /reel/ in its URL, e.g. Ddl5eH-u4le. Required unless you pass url.
url
stringoptional
A post or reel URL (instagram.com/p/…, /reel/…, /reels/… or /tv/…), or just its shortcode. Required unless you pass code.
Example
https://www.instagram.com/reel/Ddl5eH-u4le/
max_credits
integeroptional
The most this call may cost, in credits. A paid step that would go past it doesn't run; a call that can't be done within it fails with 402 over_max_credits, free.

Example response

A real response, captured from the live API. Lists are trimmed to a couple of items, and long text such as media links is cut short with ….

Show the example response (2 KB)
{
  "success": true,
  "credits_remaining": 999971,
  "credits_charged": 2,
  "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."
    }
  ],
  "user": {
    "pk": "13460080",
    "username": "nike",
    "full_name": "Nike",
    "profile_pic_url": "https://scontent-iad3-1.cdninstagram.com/v/t51.82787-19/551608484_185671…",
    "is_verified": true
  },
  "caption": "*Just a normal day for @caitlinclark22.\n\nWake up. Eat cereal. Lace up th…",
  "taken_at": 1790085604,
  "display_url": "https://scontent-iad6-1.cdninstagram.com/v/t51.82787-15/809201733_186664…"
}

Response fields

Every field in a successful response, and what it means. A name with [] belongs to each item of a list: segments[].start is the start of every item in segments. null means there's no value.

Show all 22 fields
FieldTypeDescription
successtrueAlways true here; errors have success: false.
credits_remainingnumberYour balance after this call. On anonymous playground calls: free tries left today.
credits_chargednumberCredits this call cost; 0 on free endpoints. On anonymous playground calls: tries used (1).
codestringThe video's Instagram shortcode.
urlstringCanonical Instagram post URL.
transcriptstringRecognized speech as plain text; machine transcription may contain mistakes.
languagestringcan be nullThe spoken language we detected, as an ISO 639-1 code (e.g. en); null when not returned.
duration_snumbercan be nullAudio duration in seconds; null when Instagram doesn't show it. Null doesn't mean zero.
segmentsobject[]The transcript in timed segments; empty when unavailable.
segments[].startnumberWhen the segment starts, in seconds from the beginning.
segments[].endnumberWhen the segment ends, in seconds from the beginning.
segments[].textstringThe words spoken in this segment.
source"speech_to_text"How the transcript was produced: speech_to_text.
userobjectPost author.
user.pkstringThe account's numeric Instagram id, as a string.
user.usernamestringInstagram username, without @.
user.full_namestringcan be nullDisplay name; null when not returned.
user.profile_pic_urlstringcan be nullProfile image URL; CDN links can expire; null when not returned.
user.is_verifiedbooleancan be nullWhether Instagram shows a verified badge; null when not returned.
captionstringcan be nullPost caption as plain text, preserving line breaks; null when the post has no caption.
taken_atnumbercan be nullWhen it was posted, as Unix seconds; null when Instagram doesn't show it. Null doesn't mean zero.
display_urlstringcan be nullPreview image URL. Image links expire within days while transcripts are kept for 30, so it can be dead; null when not returned.

Cost and freshness

Each call costs 1 credit; 2 if speech-to-text runs. Calls turned away before they reach the platform (invalid parameters, a key or balance problem, a rate limit) are free, and so are 5xx errors. A not_found is charged, since the platform was checked. How charging works.

Answers are cached for up to 30 days. A repeat call within that time can return the same data, and costs the same.

Errors

A failed call returns success: false, an error message, a code your program can check, and a docs link. These are the errors this endpoint can return. All error codes.

StatusCodeMeaning
400invalid_paramsA parameter is missing or invalid. issues names each one.
401missing_api_keyNo API key was sent. Put it in the x-api-key header.
401invalid_api_keyThis key doesn't exist or was revoked.
402insufficient_creditsNot enough credits for this call. Buy a pack, or wait for tomorrow's free top-up.
402over_max_creditsThis call would cost more than the max_credits you set. The error says what it needs; raise max_credits to allow it. Not charged.
403account_suspendedThis account is suspended. Email support@lurkapi.com. Not charged.
403not_publicThe platform shows this account or post only to people who are logged in. Try a public one. Charged, since the platform was checked.
404not_foundWhat you asked for (a post, an ad, a subreddit) doesn't exist, or there's no endpoint at that path. Charged if the platform was checked.
404transcript_unavailableThe video has no captions, and speech-to-text heard no speech in it. You pay the base credit, never the speech-to-text extra. The answer is cached.
405method_not_allowedEndpoints only take GET, with parameters in the URL.
429rate_limitedToo many calls in a short time. Wait as many seconds as the retry-after header says, then retry.
500internal_errorSomething broke on our side. Retry. Not charged.
502upstream_errorThe platform didn't send a usable answer. Retry. Not charged.
503upstream_busyAll our connections to the platform are busy. Retry in a few seconds. Not charged.
504upstream_timeoutThe platform took over 30 seconds to answer (90 for web pages). Retry. Not charged.

Use it in Claude

Connect LurkAPI to Claude and ask in plain English. This endpoint is the instagram_media_transcript tool. For example:

Ask Claude
Use LurkAPI's instagram_media_transcript tool with url "https://www.instagram.com/reel/Ddl5eH-u4le/", then summarize what you find.

Claude calls instagram_media_transcript with arguments like these, and each call costs 1 credit; 2 if speech-to-text runs:

Tool arguments
{"url": "https://www.instagram.com/reel/Ddl5eH-u4le/"}

To save tokens, tool results leave out empty fields, keep one URL per image or video, and give transcripts as plain text unless you pass timestamps=true. A result over 45,000 characters comes in parts. Its _note gives the offset for the next part, and later parts are free for 15 minutes. Pass trim=false for the full response.

From the blog

All posts