Instagram URL Parser API — Resolve Any Link (Free)
Documentation menu
FetchLayer FetchLayer API

Parse an Instagram URL (free)

What an Instagram link points to, as structured input for the other routes: whether it names a post, a reel, an account, a hashtag, a place, a story or an explore page, plus the short code, numeric post id, username, hashtag name or place id it encodes, and its canonical form. Makes no request to Instagram, so it costs no credit and reports pagesFetched 0. A link naming something Instagram does not publish to a signed-out reader — a hashtag page, a place, a story — is still identified, with a note saying it cannot be read, which is the cheapest way to find that out. Billing: free.

POST /resolve-url Utilities
https://api.fetchlayer.dev/instagram/resolve-url
OpenAPI JSON

Headers

Authorization string required

Bearer token — your FetchLayer API key.

Parameters

url string required

Any Instagram link: a post, a reel, an account, a hashtag or a place.

format string optional

json or markdown. Markdown returns a rendered summary instead of the structured record. (default: json)

timeoutMs integer optional

Time limit for each individual page read, in milliseconds (max 60000). It bounds one page, not the whole request.

Response Fields

resolve-url

Parse an Instagram URL (free)

transport string

The upstream source. Always "instagram".

notes string[]

Caveats you can act on — a ceiling Instagram imposes, a counter it withholds, a list that stopped early. Several real limits are reported only here, so read them. An empty result always comes with a note explaining it, never as an unexplained empty array.

pagesFetched number

Pages of results read, which is what the request costs: one credit per page. resolve-url reports 0 and is not billed.

kind string

One of post, reel, profile, hashtag, location, story, explore or unknown.

canonicalUrl string

The link in its canonical form, or null.

username string

The account handle, when the link carries one.

shortcode string

The post or reel short code, when the link points at one.

postId string

The numeric media id, when it can be decoded from the short code.

hashtagName string

The tag, when the link points at a hashtag. Posts under a hashtag cannot be read — the note says so.

locationId string

The place id, when the link points at a location. Posts at a place cannot be read either.

Request

curl -X POST "https://api.fetchlayer.dev/instagram/resolve-url" \
  -H "Authorization: Bearer ss-your-key" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://www.instagram.com/p/DcOX3hWFiey/"}'

Response

{
  "transport": "instagram",
  "notes": [],
  "pagesFetched": 0,
  "kind": "post",
  "canonicalUrl": "https://www.instagram.com/p/DcOX3hWFiey/",
  "username": null,
  "shortcode": "DcOX3hWFiey",
  "postId": "3489413250744250799",
  "hashtagName": null,
  "locationId": null
}