Instagram Downloader API
Photos, carousels, reels and stories, resolved into direct links. One call gives you every file in a post, and the links point at Instagram's own CDN, so whoever you hand them to fetches from Instagram rather than from us.
Media
Send any public post, reel or IGTV link. A single photo comes back as one file, a carousel as all of them, a reel as the video with its audio already in it.
https://api.gapi.dev/v2/instagram/mediaParameters
urlrequiredstringPublic Instagram post, reel or IGTV link. /p/, /reel/, /reels/ and /tv/ all work, with or without the username in the path.
e.g. https://www.instagram.com/p/DbYaLffE2DD/Responses
{
"platform": "instagram",
"type": "album",
"title": "Suit up!\n\nThese photos show NASA astronaut candidates…",
"author": null,
"thumbnail": null,
"duration": null,
"media": [
{ "type": "image", "url": "https://…", "quality": null, "ext": null },
{ "type": "image", "url": "https://…", "quality": null, "ext": null },
{ "type": "image", "url": "https://…", "quality": null, "ext": null }
]
}Stories
What an account has up right now.
https://api.gapi.dev/v2/instagram/storiesParameters
usernamerequiredstringUsername, @handle or profile URL — nasa, @nasa and instagram.com/nasa all work.
e.g. nasaResponses
{
"platform": "instagram",
"type": "album",
"title": null,
"author": null,
"thumbnail": null,
"duration": null,
"media": [
{ "type": "image", "url": "https://…", "quality": null, "ext": null },
{ "type": "video", "url": "https://…", "quality": null, "ext": null },
{ "type": "image", "url": "https://…", "quality": null, "ext": null }
]
}Try it
https://api.gapi.dev/v2/instagram/mediacurl -G 'https://api.gapi.dev/v2/instagram/media' \
--data-urlencode 'url=https://www.instagram.com/p/DbYaLffE2DD/' \
-H 'X-API-Key: YOUR_KEY'What each link gives you
| You send | type | media contains |
|---|---|---|
instagram.com/p/… with one photo | image | the single image at full resolution |
instagram.com/p/… with several | album | every item in the carousel, photos and videos alike |
instagram.com/reel/… | video | the video with its audio already muxed in |
instagram.com/tv/… | video | the same as a reel; IGTV is a reel now |
a username, to /stories | album | every story live at that moment |
What it does not do
Private accounts, and anything you would have to follow someone to see. Instagram shows those to a signed-in follower and nobody else, and this API does not pretend otherwise. Highlights, tagged posts and a user's post history are not here yet.
Field-by-field detail is on the response shape page.
Code examples
The same request in four languages. Swap in the key from your dashboard and it runs as it is.
curl -G 'https://api.gapi.dev/v2/instagram/media' \
--data-urlencode 'url=https://www.instagram.com/p/DbYaLffE2DD/' \
-H 'X-API-Key: gapi_live_your_key_here'One call, one request
A carousel with ten slides costs the same as a single photo: one charge against your balance. You pay for calls, not for files.