Instagram Link Resolver API
Normalize messy Instagram URLs, /share/ links, instagr.am short links and @handles into a clean resource type (profile, post, reel, story, highlight, audio, location, hashtag), canonical URL, shortcode and numeric id. Free, at 0 credits.
Request
GET /v1/resolve ·
0 credit per successful call
curl "https://api.igramapi.com/v1/resolve?url=https%3A%2F%2Fwww.instagram.com%2Freel%2FCx1AbCdEfGh%2F" \
-H "Authorization: Bearer YOUR_API_KEY" import requests
response = requests.get(
"https://api.igramapi.com/v1/resolve?url=https%3A%2F%2Fwww.instagram.com%2Freel%2FCx1AbCdEfGh%2F",
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=30,
)
response.raise_for_status()
print(response.json()) const response = await fetch("https://api.igramapi.com/v1/resolve?url=https%3A%2F%2Fwww.instagram.com%2Freel%2FCx1AbCdEfGh%2F", {
method: "GET",
headers: {
Authorization: "Bearer YOUR_API_KEY",
},
});
if (!response.ok) throw new Error((await response.json()).error.message);
console.log(await response.json()); <?php
$ch = curl_init("https://api.igramapi.com/v1/resolve?url=https%3A%2F%2Fwww.instagram.com%2Freel%2FCx1AbCdEfGh%2F");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer YOUR_API_KEY",
],
]);
$data = json_decode(curl_exec($ch), true);
print_r($data); Response
{
"type": "reel",
"url": "https://www.instagram.com/reel/Cx1AbCdEfGh/",
"canonical_url": "https://www.instagram.com/reel/Cx1AbCdEfGh/",
"shortcode": "Cx1AbCdEfGh",
"id": "3012345678901234567",
"username": null,
"hashtag": null,
"resolved_url": null,
"cached": false
} All values above are made-up examples. Media links are temporary Instagram CDN addresses.
Parameters
| Name | In | Description |
|---|---|---|
urlrequired | query | Any Instagram URL, share link, or @username. |
follow_redirects | query | Follow /share/ and instagr.am redirects (default true). |
Response fields
| Field | Type | Description |
|---|---|---|
type | string | profile, post, reel, story, highlight, audio, hashtag, location, or share. |
canonical_url | string | Normalized Instagram URL. |
shortcode / id / username / hashtag | string | null | Extracted identifiers for the target type. |
resolved_url | string | null | Final URL after following a share redirect, when applicable. |
0 credits (free)
Route user-submitted links to the right IGramAPI endpoint without spending credits.
Share links resolved
Automatically unwraps /share/reel/... and instagr.am links when follow_redirects=true.
Shortcode to media id
Converts post and reel shortcodes into numeric Instagram media IDs locally.
Route any user-pasted link cleanly
When users paste links into your app, they can be reels, carousels, profiles, stories, highlights, audio pages or mobile /share/ links. Call /v1/resolve first to see type and dispatch to /v1/media, /v1/profiles/{username}, /v1/highlights or /v1/audio.
Frequently asked questions
Does /v1/resolve really cost 0 credits?
Yes. It costs 0 credits on every plan, including Free.
What happens if I pass a non-Instagram URL?
The API returns HTTP 400 with invalid_target.
Our errors cost nothing. Failures on our side (status 500 or above) and invalid requests (400, 422) are refunded, and every error has the same shape. See error handling and credits and rate limits.
Try the Link Resolver API free
Create a key and make your first request in minutes. 100 free credits every month.