> ## Documentation Index
> Fetch the complete documentation index at: https://docs.transcriptmagic.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Instagram

> Fetch transcripts from Instagram Reels, video posts, and IGTV with one REST call.

```http theme={null}
POST https://api.transcriptmagic.com/api/instagram/transcript
```

Reels (`/reel/…`), video posts (`/p/…`), and IGTV (`/tv/…`) URLs are all supported. Stories are not (they expire and don't have stable URLs).

## Request

```bash cURL theme={null}
curl -X POST https://api.transcriptmagic.com/api/instagram/transcript \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://www.instagram.com/reel/ABC123/"}'
```

```python Python theme={null}
import requests

response = requests.post(
    "https://api.transcriptmagic.com/api/instagram/transcript",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={"url": "https://www.instagram.com/reel/ABC123/"},
)

data = response.json()
# Instagram returns a `transcripts` array (plural) of {text} objects
for seg in data.get("transcripts", []):
    print(seg["text"])
```

```javascript JavaScript theme={null}
const response = await fetch("https://api.transcriptmagic.com/api/instagram/transcript", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ url: "https://www.instagram.com/reel/ABC123/" }),
});

const data = await response.json();
// Instagram returns a `transcripts` array (plural) of {text} objects
for (const seg of (data.transcripts || [])) {
  console.log(seg.text);
}
```

```go Go theme={null}
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"net/http"
)

func main() {
	body, _ := json.Marshal(map[string]string{
		"url": "https://www.instagram.com/reel/ABC123/",
	})

	req, _ := http.NewRequest("POST",
		"https://api.transcriptmagic.com/api/instagram/transcript",
		bytes.NewBuffer(body))
	req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
	req.Header.Set("Content-Type", "application/json")

	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()

	var data struct {
		Transcripts []struct {
			Text string `json:"text"`
		} `json:"transcripts"`
	}
	json.NewDecoder(resp.Body).Decode(&data)
	for _, seg := range data.Transcripts {
		fmt.Println(seg.Text)
	}
}
```

```php PHP theme={null}
<?php
$ch = curl_init('https://api.transcriptmagic.com/api/instagram/transcript');

curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer YOUR_API_KEY',
    'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    'url' => 'https://www.instagram.com/reel/ABC123/',
]));

$response = curl_exec($ch);
curl_close($ch);

$data = json_decode($response, true);
foreach (($data['transcripts'] ?? []) as $seg) {
    echo $seg['text'] . "\n";
}
```

## Response

```json theme={null}
{
  "success": true,
  "transcripts": [
    {
      "id": "3870781634534573841",
      "shortcode": "DW3x2NpigcR",
      "text": "Five things I wish I knew before I started this challenge..."
    }
  ],
  "credits": 995
}
```

Instagram returns its transcript as a `transcripts` array (note the **plural**). Each entry has `id`, `shortcode`, and `text`. The `text` field holds the full transcript as a single string — there is no per-line timing on this endpoint, no `transcript` (singular) field, and no `title`. Reels typically return a single entry; the array shape is preserved for potential future multi-segment responses.

## Supported URL formats

| Format | Example |
| - | - |
| Reel | `https://www.instagram.com/reel/<shortcode>/` |
| Video post | `https://www.instagram.com/p/<shortcode>/` |
| IGTV | `https://www.instagram.com/tv/<shortcode>/` |

Stories are not supported because they expire and don't have stable, crawlable URLs.

## FAQ

> [accordion] Do private Instagram accounts work?
>
> No. Private accounts and stories behind a follow-gate aren't supported. Only publicly viewable Reels and posts can be transcribed.

> [accordion] What about Instagram Stories?
>
> Stories aren't supported because they expire and don't have stable, crawlable URLs. Reels and video posts are the supported formats.

> [accordion] Does this work on carousels with multiple videos?
>
> POST the URL of the specific video item in the carousel (Instagram exposes per-item URLs). The API transcribes the single video at that URL.

> [accordion] Why no timestamps?
>
> Instagram's upstream caption source emits plain text lines without timing metadata. If you need per-second timing, use the YouTube endpoint instead — it's the only platform on this API that returns `startMs`/`endMs` per segment.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.