Downloading media
How to turn Instagram media links into stable download files with the IGramAPI Downloader: video, merged HD with sound, MP3 audio and images.
Media links in API responses point to Instagram’s CDN. They expire after a while and browsers frequently cannot download them directly. The Downloader endpoint solves both problems.
The flow
- Get a media URL from another endpoint (
video_url, aformats[].url, adownloads[].urlor athumbnail). - Send it to
POST /v1/downloads. - Download the file from the returned
download_url. No API key is needed for that link.
Request
curl -X POST "https://api.igramapi.com/v1/downloads" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"type": "video", "url": "https://scontent.cdninstagram.com/v/example/clip.mp4", "filename": "my-reel"}'
| Field | Required | Description |
|---|---|---|
type |
Yes | video, audio or image. |
url |
Yes | A media URL from an IGramAPI response. |
audio_url |
No | For video: the audio stream to merge, when the chosen quality lists one. |
filename |
No | File name for the download. The extension is added for you. |
Response
{
"download_url": "https://download.example.com/files/my-reel.mp4?signature=example",
"expires_at": "2026-10-31T12:00:00Z",
"filename": "my-reel.mp4",
"content_type": "video/mp4",
"size_bytes": 4100000
}
The link works until expires_at (about an hour). Request a new one after that.
Types and prices
type |
Result | Credits |
|---|---|---|
video |
MP4 as it is | 2 |
video + audio_url |
One MP4 with picture and sound (this is how 1080p works) | 5 |
audio |
MP3 extracted from a video URL | 1 |
image |
JPEG | 1 |
Why some qualities have an audio_url
Instagram publishes its highest qualities as a video-only stream and a separate audio stream. When a formats entry from the Post & Reel Data API has an audio_url, send both and the Downloader returns a single MP4.
Good to know
- Identical requests are served from the stored copy, so repeated downloads are fast.
- Only Instagram media addresses are accepted; other URLs return
invalid_media_url. - An expired media link returns
media_url_expired. Fetch the post again to get a fresh URL. - Errors are not charged.
- Only download content you are allowed to use. See the Acceptable Use Policy.
Something unclear or missing? Tell us and we will fix the page.