Instagram Link recognition API

Convert a post link, a shortcode or a numeric media_id into the other two. Give any one of the three, for $0.56 per 1,000 calls.

  • Input is one of three: link, shortcode or media_id
  • It only converts and does not check that the post still exists
  • The response has shortcode, media_id and url

API health

24h health
Normal
  • Healthy / normal
  • Available
  • Limited
  • Mostly down
Normal

Last 24 hours

Last 30 days

  1. 1Request

    POST /api/v1/social
    {
      "platform": "instagram",
      "action": "resolve_links",
      "params": {
        "text": "https://www.instagram.com/p/DbYmqpplO_N/"
      }
    }
  2. 2JSON response

    {
      "results": {
        "shortcode": "DbYmqpplO_N",
        "media_id": "3952078729724096461",
        …
      }
    }
  3. 3Fields

    shortcodemedia_id
    DbYmqpplO_N3952078729724096461
  4. 4CSV

    instagram-resolve_links-sample.csv shortcode,media_id,url,platform

A request with text holding a post link, a shortcode or a numeric ID returns one JSON object with shortcode, media_id and url, ready as a field table or a CSV.

What data you get

The table shows a real call for instagram.com/p/DbYmqpplO_N, captured November 21, 2026 at 07:18 (UTC), that returned one object. Your own calls return the fields listed in the field reference.

shortcodemedia_idurlplatform
DbYmqpplO_N3952078729724096461https://www.instagram.com/p/DbYmqpplO_N/instagram

Use cases

  • Write posts one way

    One post has three forms: a link, a shortcode and a numeric ID. Convert them, then dedupe on shortcode or media_id.

  • Turn a shortcode into a link

    If you only hold a shortcode, pass it in and get the full url back.

  • Check that a link and an ID match

    Pass in the link and compare the returned media_id to confirm that two records describe the same post.

  • Clean a collected list

    When the posts in a list are written in different forms, convert them one by one into one form before the next step.

Instagram Graph API vs EveryInfra

Instagram's Graph API and EveryInfra resolve_links, compared on access.

ComparedInstagram Graph APIEveryInfra
Access you needAccess token: "Required. App user’s User access token."One EveryInfra API key in the Authorization: Bearer header. No Instagram login or Instagram access token is needed.

Quote is from Meta's developer documentation (the IG User page), checked 2026-11-22. This row compares access only. Official sources: IG User (updated 2026-04-22)

Limits and gotchas

  • text is required: a post link, a shortcode or a post's numeric ID. Give one of the three.
  • It only converts. It does not check that the post still exists.
  • The response has three items: shortcode, media_id and url.
  • One call converts one post and returns one object.

Pricing

Each call costs $0.000556 and converts one post. Failed calls and empty results are not charged.

CallsCost
10,000$5.56
100,000$55.56
1,000,000$555.56

Totals use the list price per call.

Code samples

#
bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "instagram",
  "action": "resolve_links",
  "params": {
    "text": "https://www.instagram.com/p/DbYmqpplO_N/"
  }
}'

OpenAPI definition (JSON)Samples read the key from the EVERYINFRA_API_KEY environment variable; copied code never contains your key.

API reference

See the parameters, response fields, errors and billing for resolve_links, and copy the page or open it as Markdown for an AI assistant.

POST

AI prompt

#
Please help me write a data collection script with the EveryInfra Instagram Link recognition endpoint (instagram/resolve_links).

How the endpoint works:
- Request: POST https://api.everyinfra.com/api/v1/social with the header Authorization: Bearer <API key>. Read the key from the EVERYINFRA_API_KEY environment variable and never hard-code it.
- In the request body, set platform to instagram and action to resolve_links, and put the parameters inside params.
- Required parameters:
  - text: One post link, shortcode or numeric post ID, such as https://www.instagram.com/p/<shortcode>/.
- Returns one object. Main fields: shortcode (The post shortcode: the part of the pos…), media_id (The numeric post ID), url.
- Example request body:
{
  "platform": "instagram",
  "action": "resolve_links",
  "params": {
    "text": "https://www.instagram.com/p/DbYmqpplO_N/"
  }
}
- Price: $0.56 per 1,000 requests; failed and empty results are not charged.
- For dozens or hundreds of targets, add "mode": "async" to the body: you get a job_id at once and poll GET https://api.everyinfra.com/api/v1/jobs/{job_id} for the result.
- On 422, fix the request using the suggested parameter names and allowed values in the error; on 429 or 503, wait for Retry-After and try again.

Before writing code, ask me which targets I need, how many, which fields, and what output format I want; then confirm the plan and the rough cost with me.

Request parameters

#
NameInTypeRequiredDefaultDescription
AuthorizationheaderstringYes-Bearer followed by your API key. Create it in the console; never put it in a URL or a code repository.
platformbodystringYesinstagramPlatform identifier, fixed value.
actionbodystringYesresolve_linksCapability identifier, fixed value.
textbody.paramsstringYes-One post link, shortcode or numeric post ID, such as https://www.instagram.com/p/<shortcode>/.

Response example

#
Captured November 21, 2026 at 07:18 (UTC) by calling this API with the parameters in the code sample above. results and count are that call's real response with personal information (names, handles, avatars, profile links, contact details) removed. id, billing and quota differ on every call, so only their shape is shown.
json
{  "id": "req_…",  "platform": "instagram",  "action": "resolve_links",  "results": {    "shortcode": "DbYmqpplO_N",    "media_id": "3952078729724096461",    "url": "https://www.instagram.com/p/DbYmqpplO_N/",    "platform": "instagram"  },  "billing": {    "charged": …,    "charged_usd": …,    "balance_after_usd": …,    …  },  "quota": { … }}

Response fields

#

Business data is in results. The table lists the fields a record can contain; values the platform does not show are never made up.

FieldMeaning
shortcodeThe post shortcode: the part of the post link after /p/ or /reel/.
media_idThe numeric post ID. oembed gives it as postID_authorID.
urlLink to the record on the platform.
platformSource platform identifier, the same as platform in the request (for example xiaohongshu, tiktok).

Errors and billing

#
401
Missing or invalid key.
402
Insufficient balance. Top up first.
422
Invalid parameter name or value. Fix it using the suggestions in the error. No charge.
429
Per-minute request limit reached. Wait for Retry-After, then try again.
503
Could not complete. The held charge is returned to your balance. If the outcome is unknown, verify it before you retry.
200 empty
No data. No charge.

Errors

FAQ

How do I convert between an Instagram post link and its ID?

Put the post link, shortcode or numeric ID in text. The response has shortcode, media_id and url.

Does the conversion check that the post still exists?

No. It only converts and does not check whether the post still exists.

How much does link resolving cost?

Billing is per call: $0.000556 each, or $0.56 per 1,000 calls. Failed calls and empty results are not charged.

Do I need to log in to Instagram to convert a post ID?

No. Put your EveryInfra API key in the Authorization: Bearer header. You need no Instagram login and no Instagram access token.

How do shortcode and media_id differ?

shortcode is the part of a post link after /p/ or /reel/. media_id is the post's numeric ID.

The same EveryInfra API key also calls Instagram's other endpoints, such as post, which reads a post from its link.

Google Analytics needs consent. Privacy