> ## Documentation Index
> Fetch the complete documentation index at: https://clair.im/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Instagram API reference

> Instagram API: one public post or reel with its likes, comments, and media, or one account with its followers and latest posts, by link or username.

Two endpoints, one key. Post reads one public photo, video, reel, or carousel.
Profile reads one public account, personal, creator, or business. Both read
the page Instagram serves a signed-out visitor.

See the [Instagram API: overview, pricing, and free tier](https://clair.im/apis/instagram).

## Post

`GET /v1/instagram/post` · **1 request**

```sh theme={null}
curl -G https://api.clair.im/v1/instagram/post \
  -H "Authorization: Bearer YOUR_KEY" \
  --data-urlencode "shortcode=DeTUk4sDSp-"
```

| Parameter | Required | Contract |
| - | - | - |
| `shortcode` | yes | The post's shortcode, such as `DeTUk4sDSp-`, or an instagram.com /p/, /reel/, or /tv/ link. |

`/p/`, `/reel/`, and `/tv/` links all work, with or without the username in
them. `query.shortcode` is the shortcode, even when you sent a link.

```json theme={null}
{
  "engine": "instagram",
  "family": "social",
  "query": {
    "shortcode": "DeTUk4sDSp-"
  },
  "post": {
    "shortcode": "DeTUk4sDSp-",
    "post_id": "4004634989362489982",
    "url": "https://www.instagram.com/reel/DeTUk4sDSp-/",
    "type": "reel",
    "caption": "POV: you're watching the Earth set\n\nWe just released hundreds of new images and hours of new audio from our Artemis II mission around the Moon this spring. Check out our link in bio for the Artemis II Preliminary Lunar Science Report.\n\n#NASA #ArtemisII #Artemis",
    "caption_edited": false,
    "alt_text": "Video by NASA on October 10, 2026. May be an image of planet, eclipse and text.",
    "hashtags": [
      "NASA",
      "ArtemisII",
      "Artemis"
    ],
    "mentions": [],
    "published_at": "2026-10-10T15:15:02.000Z",
    "duration_ms": 43767,
    "cover": "https://scontent-iad3-2.cdninstagram.com/...",
    "media": [
      {
        "type": "video",
        "image": "https://scontent-iad3-2.cdninstagram.com/...",
        "video_url": "https://scontent-iad3-2.cdninstagram.com/o1/...",
        "width": 1074,
        "height": 1908,
        "duration_ms": 43767
      }
    ],
    "likes_count": 752840,
    "comments_count": 7577,
    "author": {
      "user_id": "528817151",
      "username": "nasa",
      "full_name": "NASA",
      "verified": true,
      "url": "https://www.instagram.com/nasa/",
      "private": false,
      "avatar": "https://scontent-iad6-1.cdninstagram.com/..."
    },
    "coauthors": [
      {
        "user_id": "1611722079",
        "username": "nasasolarsystem",
        "full_name": "NASA Solar System Exploration",
        "verified": true,
        "url": "https://www.instagram.com/nasasolarsystem/"
      },
      {
        "user_id": "1104426670",
        "username": "nasaartemis",
        "full_name": "NASA Artemis",
        "verified": true,
        "url": "https://www.instagram.com/nasaartemis/"
      }
    ],
    "tagged_users": [
      {
        "user_id": "1104426670",
        "username": "nasaartemis",
        "full_name": "NASA Artemis",
        "verified": true,
        "url": "https://www.instagram.com/nasaartemis/"
      },
      {
        "user_id": "1611722079",
        "username": "nasasolarsystem",
        "full_name": "NASA Solar System Exploration",
        "verified": true,
        "url": "https://www.instagram.com/nasasolarsystem/"
      }
    ],
    "audio": {
      "audio_id": "28589819277311219",
      "title": "Original audio",
      "artist": "nasa"
    },
    "latest_comments": [
      {
        "comment_id": "18060775346647906",
        "text": "🎬🎬🎬🤹‍♀️🤹‍♀️🤹‍♀️",
        "published_at": "2026-10-28T14:20:46.000Z",
        "likes_count": 0,
        "author": {
          "user_id": "268681544",
          "username": "doctorkarin",
          "full_name": null,
          "verified": true,
          "url": "https://www.instagram.com/doctorkarin/"
        }
      }
    ]
  }
}
```

| Field | Contents |
| - | - |
| `type` | `photo`, `video`, `reel`, or `carousel` (several photos or videos in one post). |
| `media` | Each photo or video in order, one entry per carousel slide: `type`, `image`, `video_url`, `width`, `height`, `duration_ms`. |
| `likes_count`, `comments_count` | Exact. `likes_count` is `null` when the author hides likes. |
| `hashtags`, `mentions` | Hashtags (without `#`) and usernames in the caption. |
| `coauthors`, `tagged_users` | Accounts that co-posted it, and accounts tagged in it or any of its slides. |
| `audio` | A reel's original sound. `null` for a licensed song, whose details are not read. |
| `latest_comments` | The newest comments the page shows, usually 12 to 15. Older ones are not on the page. |
| `cover`, `image`, `video_url`, `avatar` | Instagram signs media links with an expiry; they stop working after a few days. |

## Profile

`GET /v1/instagram/profile` · **1 request**

```sh theme={null}
curl -G https://api.clair.im/v1/instagram/profile \
  -H "Authorization: Bearer YOUR_KEY" \
  --data-urlencode "username=nasa"
```

| Parameter | Required | Contract |
| - | - | - |
| `username` | yes | The username, such as `nasa` or `@nasa`, or an instagram.com profile link. |

The body is `profile`: `user_id`, `username`, `full_name`, `url`, `bio`,
`links`, `avatar`, `verified`, `private`, exact `followers_count` and
`following_count`, `posts_count`, `highlights`, and `latest_posts`.

```json theme={null}
{
  "engine": "instagram",
  "family": "social",
  "query": {
    "username": "nasa"
  },
  "profile": {
    "user_id": "528817151",
    "username": "nasa",
    "full_name": "NASA",
    "url": "https://www.instagram.com/nasa/",
    "bio": "Making the seemingly impossible, possible. ✨",
    "links": [
      {
        "title": "NASA.gov Homepage",
        "url": "https://www.nasa.gov"
      }
    ],
    "avatar": "https://scontent-lax3-2.cdninstagram.com/...",
    "verified": true,
    "private": false,
    "followers_count": 104368412,
    "following_count": 90,
    "posts_count": 4982,
    "highlights": [
      {
        "highlight_id": "18195781759377100",
        "title": "Roman",
        "cover": "https://scontent-lax3-1.cdninstagram.com/..."
      }
    ],
    "latest_posts": [
      {
        "shortcode": "DeTUk4sDSp-",
        "url": "https://www.instagram.com/reel/DeTUk4sDSp-/",
        "type": "reel",
        "caption": "POV: you're watching the Earth set\n\nWe just released hundred…",
        "alt_text": "Video by NASA on October 10, 2026. May be an image of planet, eclipse and text.",
        "cover": "https://scontent-lax3-2.cdninstagram.com/...",
        "author_username": "nasa"
      },
      {
        "shortcode": "DeJ28eTxo4s",
        "url": "https://www.instagram.com/p/DeJ28eTxo4s/",
        "type": "photo",
        "caption": "Brewing up new stars 🪄\n \n@NASAWebb’s unique view of the stel…",
        "alt_text": "Photo by NASA Webb Telescope on October 06, 2026. May be an image of text.",
        "cover": "https://scontent-lax3-1.cdninstagram.com/...",
        "author_username": "nasawebb"
      }
    ]
  }
}
```

| Field | Contents |
| - | - |
| `posts_count` | As Instagram shows it: exact below 10,000, rounded above (`32K` is `32000`). |
| `latest_posts` | The first twelve posts on the grid, pinned posts first. Each has `shortcode`, `url`, `type`, `caption`, `alt_text`, `cover`, and `author_username`, which differs on a collaboration. Likes and dates are not on the profile page; read the post for them. |

## Errors

A post or account that is gone or never existed returns `404` `not_found`, as
does a post Instagram shows only to signed-in viewers. Instagram serves a
missing page and a refused request the same error page, so Clair returns
`404` only after two scraping vendors both got it; a single refusal moves on
to the next vendor. A malformed `shortcode` or `username` is `400`.

## What this API does not do

* It does not return view counts, which are not on the signed-out page.
* It does not search hashtags or read a hashtag page, which needs a login.
* It does not return a licensed song's details or a post's location yet.
* It does not read stories, or anything that needs a signed-in account.

Auth, plans, rate limits, and error codes: [Authentication](https://clair.im/docs/authentication.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.