# Instagram Link recognition API (instagram.resolve_links)

- Canonical page: [https://everyinfra.com/en/instagram-api/resolve_links](https://everyinfra.com/en/instagram-api/resolve_links?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "instagram", "action": "resolve_links", "params": {...}}
- Price: $0.000556 per call ($0.56 per 1,000 requests); failed calls and empty results are not charged
- Returns: single object
- Mode: sync; add "mode": "async" for slow tasks

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=instagram&action=resolve_links

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| text | not declared | yes | not declared | One post link, shortcode or numeric post ID, such as https://www.instagram.com/p/<shortcode>/. |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| shortcode | The post shortcode: the part of the post link after /p/ or /reel/. |
| media_id | The numeric post ID. oembed gives it as postID_authorID. |
| url | Link to the record on the platform. |
| platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |

## Example

```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/"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "instagram",
        "action": "resolve_links",
        "params": {
            "text": "https://www.instagram.com/p/DbYmqpplO_N/",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-11-21T07:18:47Z. `results` and `count` are real 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.

```text
{
  "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": { … }
}
```

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=instagram
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
