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

# Instagram Posts & Reels API

> Instagram posts and reels: captions, engagement, media, music and authors. By profile (posts, reels, tagged), post URL, hashtag or keyword.

`POST /v1/data/instagram/posts/run`

**Pricing:** $0.002 per post ($2.00 per 1,000).

Pull a profile's posts, reels, or tagged tab; look up specific post URLs; pull recent posts under a hashtag; or search Reels by keyword.

## Ways to call it

* **Handle**: set `handles` (optional: `tab`, `maxResults`, `onlyPostsNewerThan`)
* **Post URL**: set `postUrls`
* **Hashtag**: set `hashtags` (optional: `maxResults`, `onlyPostsNewerThan`)
* **Keyword (Reels)**: set `query` (optional: `maxPages`)

## Request

Send the inputs under `params`. Only the keys below are accepted; any other key returns `422 invalid_params`.

**handles** `string`

Instagram username (e.g. natgeo) or profile URL to pull posts from.

Format e.g. `https://www.instagram.com/natgeo/`.

**tab** `string` (default: posts)

Which profile tab to pull: the posts grid (photos + videos), the Reels tab, or posts the profile is tagged in.

Allowed values: `posts` (Posts tab), `reels` (Reels tab), `tagged` (Tagged tab).

**postUrls** `string[]`

Instagram post or reel URLs, one per line. Returns the full record for each.

**hashtags** `string`

Hashtag to pull recent posts from, without the # (e.g. travel).

**query** `string`

Search keyword. Returns matching Reels from Instagram search.

**maxPages** `integer` (default: 3)

Keyword-search result pages to fetch (\~10-12 reels per page, capped at 8).

**maxResults** `integer`

Number of posts to return in total. Use 0 for all.

**onlyPostsNewerThan** `date`

Only get posts newer than this date (YYYY-MM-DD). Pinned posts may appear even if older.

## Example

```bash cURL theme={null}
curl -X POST "https://api.mindcase.co/v1/data/instagram/posts/run?wait=true" \
  -H "Authorization: Bearer $MINDCASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "params": {
    "handles": "natgeo",
    "tab": "posts",
    "maxResults": 10
  }
}'
```

```python Python theme={null}
import os, requests

r = requests.post(
    "https://api.mindcase.co/v1/data/instagram/posts/run",
    params={"wait": "true"},
    headers={"Authorization": f"Bearer {os.environ['MINDCASE_API_KEY']}"},
    json={"params": {
    "handles": "natgeo",
    "tab": "posts",
    "maxResults": 10
}},
)
job = r.json()
rows = job.get("data", [])  # if job["status"] == "running", poll /v1/jobs/{job_id}/results
```

```javascript Node.js theme={null}
const r = await fetch("https://api.mindcase.co/v1/data/instagram/posts/run?wait=true", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MINDCASE_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ params: {
  "handles": "natgeo",
  "tab": "posts",
  "maxResults": 10
} }),
});
const job = await r.json();
const rows = job.data ?? []; // if job.status === "running", poll /v1/jobs/{job_id}/results
```

## Response fields

Each row in `data` is one post, keyed by these fields.

| Field | Name | Type |
| - | - | - |
| `postUrl` | Post URL | url |
| `caption` | Caption | text |
| `type` | Type | text |
| `contentFormat` | Content Format | text |
| `posted` | Posted | text |
| `source` | Source | text |
| `authorUsername` | Author Username | text |
| `authorName` | Author Name | text |
| `authorProfileUrl` | Author Profile URL | url |
| `authorVerified` | Author Verified | boolean |
| `authorId` | Author ID | text |
| `likes` | Likes | number |
| `likesHidden` | Likes Hidden | boolean |
| `comments` | Comments | number |
| `plays` | Plays | number |
| `views` | Views | number |
| `shares` | Shares | number |
| `image` | Image | url |
| `videoUrl` | Video URL | url |
| `carouselImages` | Carousel Images | array |
| `carouselSlideMediaUrls` | Carousel Slide Media/URLs | object\_array |
| `durationS` | Duration (s) | number |
| `hashtags` | Hashtags | array |
| `mentions` | Mentions | array |
| `firstComment` | First Comment | text |
| `recentComments` | Recent Comments | object\_array |
| `captionLanguage` | Caption Language | text |
| `locationName` | Location Name | text |
| `paidPartnership` | Paid Partnership | boolean |
| `pinned` | Pinned | boolean |
| `song` | Song | text |
| `artist` | Artist | text |
| `originalAudio` | Original Audio | boolean |
| `taggedUsers` | Tagged Users | object\_array |
| `coauthors` | Coauthors | object\_array |

## Example response

Abridged: long text and lists are shortened.

```json theme={null}
{
  "job_id": "7f3a1c2e-0b9d-4c55-9a51-3f2e8d1b6a40",
  "agent": "instagram/posts",
  "status": "completed",
  "row_count": 1,
  "truncated": false,
  "data": [
    {
      "authorUsername": "natgeo",
      "videoUrl": "https://scontent-fra5-1.cdninstagram.com/o1/v/t2/f2/m86/AQMqlev1rFDcjM-Dce7TgI1wgHdM-qn6wBSH5ROfZhC3TW4h0X90qBFAexFupClWAQ4kbtRpYDxFwvBm-VKnbjYobXhZEriML993d...",
      "pinned": null,
      "paidPartnership": false,
      "source": "https://www.instagram.com/natgeo/",
      "coauthors": [],
      "carouselImages": [],
      "durationS": 135.531,
      "song": "Original audio",
      "authorId": "787132",
      "posted": "2026-08-13T19:28:11.000Z",
      "captionLanguage": null,
      "authorName": "National Geographic",
      "authorVerified": null,
      "authorProfileUrl": "https://www.instagram.com/natgeo/",
      "shares": null,
      "postUrl": "https://www.instagram.com/p/Db_fKDmgLqb/",
      "carouselSlideMediaUrls": [],
      "plays": 1028550,
      "recentComments": [
        {
          "text": "Let’s use science to extend the lives of worthwhile beings: dogs!",
          "username": "simonefmspinner",
          "authorId": "63711054554",
          "likes": 0,
          "timestamp": "2026-08-17T03:48:18.000Z"
        },
        {
          "text": "Suge o clawn",
          "username": "marius_ciprian.2025",
          "authorId": "72805791101",
          "likes": 0,
          "timestamp": "2026-08-17T03:44:31.000Z"
        }
      ],
      "likes": 16024,
      "contentFormat": "Reel",
      "views": 228447,
      "firstComment": "Let’s use science to extend the lives of worthwhile beings: dogs!",
      "locationName": null
    }
  ]
}
```

## Related APIs

For account-level data (bio, follower count, business info) use [`instagram/profiles`](https://docs.mindcase.co/apis/instagram/profiles); for the comments on a post use [`instagram/comments`](https://docs.mindcase.co/apis/instagram/comments).


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