Instagram photos, reels and carousels from one link
Send an Instagram post or reel link. Get every photo and video in the post, in order, labelled image or video from the real file.
POST
/v1/download
https://www.instagram.com/p/XXXXXXXXXXX/
{
"success": true,
"data": {
"platform": "instagram",
"media": [
{ "type": "image", "url": "https://…/1.jpg" },
{ "type": "image", "url": "https://…/2.jpg" },
{ "type": "video", "url": "https://…/3.mp4" }
]
}
}
Photos
Single photos and every slide of a carousel
Videos
Reels and videos inside posts
Links we accept
- instagram.com/p/…
- instagram.com/reel/…
- instagram.com/tv/…
What to know about Instagram
- Carousels come back as one list in post order. Take every item.
- Some sources label Instagram photos as video. We read the real file type, so image means image.
- Stories, highlights and private accounts are not supported.
- Only public posts work. Errors never use up a download.
curl -s -X POST https://omnimediaapi.com/v1/download \
-H "X-API-Key: $OMNI_API_KEY" \
-H "Content-Type: application/json" \
-H "User-Agent: my-agent/1.0" \
-d '{"url":"https://www.instagram.com/p/XXXXXXXXXXX/"}'
import os, requests
UA = {"User-Agent": "my-agent/1.0"} # required: "python" user agents are blocked
r = requests.post(
"https://omnimediaapi.com/v1/download",
json={"url": "https://www.instagram.com/p/XXXXXXXXXXX/"},
headers={"X-API-Key": os.environ["OMNI_API_KEY"], **UA},
timeout=120,
)
for i, item in enumerate(r.json().get("data", {}).get("media", [])):
if item.get("type") == "audio" or not item.get("url"):
continue
ext = ".mp4" if item["type"] == "video" else ".jpg"
with open(f"file_{i}{ext}", "wb") as f:
f.write(requests.get(item["url"], headers=UA, timeout=120).content)
const r = await fetch("https://omnimediaapi.com/v1/download", {
method: "POST",
headers: {
"X-API-Key": process.env.OMNI_API_KEY,
"Content-Type": "application/json",
"User-Agent": "my-agent/1.0",
},
body: JSON.stringify({ url: "https://www.instagram.com/p/XXXXXXXXXXX/" }),
});
const { data } = await r.json();
console.log(data.media.map((m) => `${m.type} ${m.url}`));
You can download photos and videos from public social media posts with OmniMediaApi.
Call:
POST https://omnimediaapi.com/v1/download
Headers: X-API-Key: $OMNI_API_KEY, Content-Type: application/json,
User-Agent: my-agent/1.0
Body: {"url": ""}
Supported: Instagram (posts, reels, carousels), TikTok (videos, photo posts),
Threads, Facebook (videos only), X/Twitter, Pinterest, Douyin.
The answer has data.media[]: each item has "type" (image, video or audio)
and "url" (a direct CDN link). Rules:
- Download every url right away; links expire within hours.
- Skip "audio" items unless asked for sound.
- TikTok, Douyin, Facebook and Pinterest list the same video in several
qualities: take only the first video whose quality contains "HD", else the
first video.
- Instagram, Threads and X carousels list different files: take all of them.
- An item without "url" has "formats": take its first video, else first image.
- Save files with the extension from the url (.jpg, .mp4 ...).
Errors: 404 MEDIA_UNAVAILABLE (private/deleted, do not retry), 424
PROVIDER_UNAVAILABLE or 503 (retry once after 60 s), 429 (wait Retry-After
seconds; QUOTA_EXCEEDED means no downloads left this month).
Downloads left: GET https://omnimediaapi.com/v1/me (same headers, free to call).
Never print the API key.
Same key, other platforms