# Instagram API (ScrapeIO)

23 endpoints for public Instagram data. Same response format and field names as every other platform.

## Basics

- Base URL: `https://scrapeio.com`
- Auth: send your key in the `x-api-key` header. Get a key at https://scrapeio.com/login (100 free credits, no card).
- Every endpoint is a GET with query parameters and returns JSON:
  `{ "success": true, "cached": false, "credits_used": 1, "credits_remaining": 99, "data": { ... } }`
- Field names are the same on every platform (`handle`, `followers`, `plays`, `likes`, `comments`, `created_at`).
- Lists return `data.items`, `data.cursor` and `data.has_more`. Pass `cursor` back to get the next page.
- Each endpoint has one listed price. Cached repeats, failed calls, private and not-found answers cost 0.
- Limit: 300 requests a minute per key.

## Errors

| Status | Meaning | Charged |
| --- | --- | --- |
| 200 | Success | Yes, unless cached |
| 400 | A parameter is missing or wrong | No |
| 401 | The key is missing or invalid | No |
| 402 | Not enough credits | No |
| 403 | The account or post is private | No |
| 404 | Not found on the platform | No |
| 429 | More than 300 requests a minute | No |
| 502 | Every source is down; retry shortly | No |

### GET /v1/instagram/profile

Instagram profile: bio, avatar, followers, following, post count, category. Price: 1 credit. MCP tool: `instagram_profile`.

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `handle` | string | yes | Instagram username, with or without @. |

```bash
curl "https://scrapeio.com/v1/instagram/profile?handle=nike" -H "x-api-key: $SCRAPEIO_API_KEY"
```

### GET /v2/instagram/user/posts

A profile's posts of every type (reels, photos, carousels), newest first, with real play counts. Price: 5 credits. MCP tool: `instagram_user_posts`.

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `handle` | string | yes | Instagram username, with or without @. |
| `cursor` | string | no | Cursor from the previous page's data.cursor. |

```bash
curl "https://scrapeio.com/v2/instagram/user/posts?handle=nike" -H "x-api-key: $SCRAPEIO_API_KEY"
```

### GET /v1/instagram/user/reels

A profile's reels with real play counts. Price: 1 credit. MCP tool: `instagram_user_reels`.

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `handle` | string | yes | Instagram username, with or without @. |
| `cursor` | string | no | Cursor from the previous page's data.cursor. |

```bash
curl "https://scrapeio.com/v1/instagram/user/reels?handle=nike" -H "x-api-key: $SCRAPEIO_API_KEY"
```

### GET /v1/instagram/post

One post or reel by URL: plays, likes, comments, caption, media URLs. Price: 5 credits. MCP tool: `instagram_post`.

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string | yes | Instagram post or reel URL. |

```bash
curl "https://scrapeio.com/v1/instagram/post?url=..." -H "x-api-key: $SCRAPEIO_API_KEY"
```

### GET /v2/instagram/post/comments

Comments on a post or reel. Price: 1 credit. MCP tool: `instagram_comments`.

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string | yes | Instagram post or reel URL. |
| `sort` | string (recent, popular) | no | recent pages with likes; popular returns the top 15. |
| `cursor` | string | no | Cursor from the previous page's data.cursor. |

```bash
curl "https://scrapeio.com/v2/instagram/post/comments?url=..." -H "x-api-key: $SCRAPEIO_API_KEY"
```

### GET /v1/instagram/post/comment/replies

Replies to one Instagram comment. Price: 1 credit. MCP tool: `instagram_comment_replies`.

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string | yes | Instagram post or reel URL. |
| `comment_id` | string | yes | Comment id from the comments endpoint. |
| `cursor` | string | no | Cursor from the previous page's data.cursor. |

```bash
curl "https://scrapeio.com/v1/instagram/post/comment/replies?url=...&comment_id=..." -H "x-api-key: $SCRAPEIO_API_KEY"
```

### GET /v2/instagram/media/transcript

Transcript of a reel (videos under 2 minutes). Price: 5 credits. MCP tool: `instagram_transcript`.

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string | yes | Instagram reel URL. |

```bash
curl "https://scrapeio.com/v2/instagram/media/transcript?url=..." -H "x-api-key: $SCRAPEIO_API_KEY"
```

### GET /v1/instagram/search

Search Instagram accounts and hashtags. Price: 1 credit. MCP tool: `instagram_search`.

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | string | yes | Search text. |

```bash
curl "https://scrapeio.com/v1/instagram/search?query=coffee" -H "x-api-key: $SCRAPEIO_API_KEY"
```

### GET /v1/instagram/search/posts

Search Instagram posts and reels by keyword. Price: 1 credit. MCP tool: `instagram_search_posts`.

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | string | yes | Search text. |
| `cursor` | string | no | Cursor from the previous page's data.cursor. |

```bash
curl "https://scrapeio.com/v1/instagram/search/posts?query=coffee" -H "x-api-key: $SCRAPEIO_API_KEY"
```

### GET /v1/instagram/hashtag

Recent posts under a hashtag. Price: 1 credit. MCP tool: `instagram_hashtag`.

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `hashtag` | string | yes | Hashtag, with or without #. |
| `cursor` | string | no | Cursor from the previous page's data.cursor. |

```bash
curl "https://scrapeio.com/v1/instagram/hashtag?hashtag=travel" -H "x-api-key: $SCRAPEIO_API_KEY"
```

### GET /v1/instagram/user/similar

Accounts Instagram suggests as similar to a profile. Price: 1 credit. MCP tool: `instagram_similar_accounts`.

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `handle` | string | yes | Instagram username, with or without @. |

```bash
curl "https://scrapeio.com/v1/instagram/user/similar?handle=nike" -H "x-api-key: $SCRAPEIO_API_KEY"
```

### GET /v2/instagram/reels/search

Search Instagram reels by keyword, with plays, likes and comments. Price: 5 credits. MCP tool: `instagram_reels_search`.

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | string | yes | Search text. |
| `date_posted` | string (last-week, last-month, last-year) | no | Only reels from this window. |
| `cursor` | string | no | Cursor from the previous page's data.cursor. |

```bash
curl "https://scrapeio.com/v2/instagram/reels/search?query=coffee" -H "x-api-key: $SCRAPEIO_API_KEY"
```

### GET /v1/instagram/user/highlights

A profile's story highlights: id, title, cover. Price: 1 credit. MCP tool: `instagram_highlights`.

Send one of: `handle`, `user_id`.

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `handle` | string | no | Instagram username. |
| `user_id` | string | no | Instagram user id. Send this or handle. |

```bash
curl "https://scrapeio.com/v1/instagram/user/highlights?handle=nike" -H "x-api-key: $SCRAPEIO_API_KEY"
```

### GET /v1/instagram/user/highlight/detail

The stories inside one highlight, with image and video links. Price: 1 credit. MCP tool: `instagram_highlight_detail`.

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes | Highlight id from the highlights endpoint. |

```bash
curl "https://scrapeio.com/v1/instagram/user/highlight/detail?id=..." -H "x-api-key: $SCRAPEIO_API_KEY"
```

### GET /v1/instagram/profile/post-count

How many posts a profile has. Price: 1 credit. MCP tool: `instagram_post_count`.

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `handle` | string | yes | Instagram username. |

```bash
curl "https://scrapeio.com/v1/instagram/profile/post-count?handle=nike" -H "x-api-key: $SCRAPEIO_API_KEY"
```

### GET /v1/instagram/search/profiles

Search Instagram accounts by keyword. Price: 1 credit. MCP tool: `instagram_search_profiles`.

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | string | yes | Search text. |

```bash
curl "https://scrapeio.com/v1/instagram/search/profiles?query=coffee" -H "x-api-key: $SCRAPEIO_API_KEY"
```

### GET /v1/instagram/user/tagged-posts

Posts other accounts tagged a profile in. Price: 1 credit. MCP tool: `instagram_tagged_posts`.

Send one of: `user_id`, `handle`.

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `user_id` | string | no | Instagram user id. |
| `handle` | string | no | Instagram username. Send this or user_id. |
| `cursor` | string | no | Cursor from the previous page's data.cursor. |

```bash
curl "https://scrapeio.com/v1/instagram/user/tagged-posts?user_id=..." -H "x-api-key: $SCRAPEIO_API_KEY"
```

### GET /v1/instagram/search/hashtag

Recent posts under an Instagram hashtag. Price: 1 credit. MCP tool: `instagram_search_hashtag`.

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `hashtag` | string | yes | Hashtag, with or without #. |
| `cursor` | string | no | Cursor from the previous page's data.cursor. |

```bash
curl "https://scrapeio.com/v1/instagram/search/hashtag?hashtag=travel" -H "x-api-key: $SCRAPEIO_API_KEY"
```

### GET /v1/instagram/audio/reels

Get Reels By Audio Id Price: 5 credits. MCP tool: `instagram_audio_reels`.

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `audio_id` | string | yes | The audio id from the Instagram audio page URL. |
| `cursor` | string | no | Pagination cursor returned by Instagram from the previous response. |

```bash
curl "https://scrapeio.com/v1/instagram/audio/reels?audio_id=..." -H "x-api-key: $SCRAPEIO_API_KEY"
```

### GET /v1/instagram/basic-profile

Basic Profile Price: 5 credits. MCP tool: `instagram_basic_profile`.

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `userId` | string | no | Instagram user id |
| `cache_max_age` | string (1d, 3d, 7d, 14d, 30d) | no | If we have a response in the cache that is this many days old or newer, return the cached response (0 credits, with "cached": true and a "ca |

```bash
curl "https://scrapeio.com/v1/instagram/basic-profile" -H "x-api-key: $SCRAPEIO_API_KEY"
```

### GET /v1/instagram/reels/trending

Trending Reels Price: 5 credits. MCP tool: `instagram_reels_trending`.

```bash
curl "https://scrapeio.com/v1/instagram/reels/trending" -H "x-api-key: $SCRAPEIO_API_KEY"
```

### GET /v1/instagram/search/popular

Popular Search Price: 5 credits. MCP tool: `instagram_search_popular`.

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | string | yes | The Popular topic to search for. |
| `cursor` | string | no | The opaque cursor returned by the previous response. |

```bash
curl "https://scrapeio.com/v1/instagram/search/popular?query=coffee" -H "x-api-key: $SCRAPEIO_API_KEY"
```

### GET /v1/instagram/user/embed

Embed HTML Price: 5 credits. MCP tool: `instagram_user_embed`.

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `handle` | string | yes | Instagram handle |

```bash
curl "https://scrapeio.com/v1/instagram/user/embed?handle=nike" -H "x-api-key: $SCRAPEIO_API_KEY"
```
