Content API
Get Instagram Media URLs
Extract direct media URLs from Instagram posts, reels, and carousels. Provide a post URL or shortcode to get downloadable image and video URLs with thumbnails.
POST
/api/mediaAuth: X-Api-Key header or Bearer JWTRate limits: Free: 25/day, Starter: 500/day, Growth: 5K/day, Scale: 50K/day. Burst: 60/min.
Request Body
json
{
"url": "https://www.instagram.com/p/ABC123/"
}Response
json
{
"media": [
{
"type": "image",
"url": "https://cdninstagram.com/...",
"thumbnail": "https://cdninstagram.com/..."
},
{
"type": "video",
"url": "https://cdninstagram.com/...",
"thumbnail": "https://cdninstagram.com/..."
}
]
}Code Examples
cURL
curl -X POST https://storiesfly.com/api/media \
-H "X-Api-Key: sf_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"url": "https://www.instagram.com/p/ABC123/"}'JavaScript
const res = await fetch("https://storiesfly.com/api/media", {
method: "POST",
headers: {
"X-Api-Key": "sf_live_your_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({ url: "https://www.instagram.com/p/ABC123/" }),
});
const { media } = await res.json();
media.forEach(m => console.log(`${m.type}: ${m.url}`));Python
import requests
response = requests.post(
"https://storiesfly.com/api/media",
headers={"X-Api-Key": "sf_live_your_key_here"},
json={"url": "https://www.instagram.com/p/ABC123/"}
)
for item in response.json()["media"]:
print(f"{item['type']}: {item['url']}")FAQ
Can I use a shortcode instead of a URL?
Yes, provide either { "url": "..." } or { "shortcode": "ABC123" }. The shortcode is the alphanumeric part of the Instagram post URL.
Does this work with carousels?
Yes, carousel posts return multiple media items in the array — one for each slide.
Does this work with Reels?
Yes, Reels are treated as video posts. Provide the Reel URL and you'll get the video URL and thumbnail.
Related Endpoints
Last updated: March 4, 2026
