# Instagram

Measured Instagram data, one operation per call. Usernames come from evidence (a search result, a pasted URL, a prior answer) — never typed from a person's name. ops: profiles (subjects = usernames; add include.posts to get each account's recent posts IN THE SAME CALL — profiles with posts of each, one answer), posts (one account, deep — includes the author's profile card), similar (related accounts), hashtag (posts tagged #x, sort top/newest), search (find accounts by keyword), comments (top comments on posts by URL), followers (the followers OR following list of accounts), history (stored time series, free). Ops are independent — issue several as PARALLEL tool calls for faster answers. Fresh fetches cost credits; anything already held is free.

`POST https://api.zomler.com/api/v1/platforms/instagram`

-   [profiles](#profiles)
-   [posts](#posts)
-   [similar](#similar)
-   [hashtag](#hashtag)
-   [search](#search)
-   [comments](#comments)
-   [followers](#followers)
-   [history](#history)

## profiles

from 20 credits · fresh for 7 days

Profile cards for up to ten accounts. Profile-only by default — a call that also wants each account's recent posts says `include.posts` and gets profiles AND posts in one call, one answer.

### Request fields

| Field | Type | Default | Values / limits |
| --- | --- | --- | --- |
| `subjects` (required) | list of string | — | 1-10 items |
| `fields` | list of enum | `—` | `profile`, `contact` |
| `include` | object | `—` | — |
| `include.posts` | object | `—` | — |
| `include.posts.limit` | integer | `12` | 1-48 |
| `include.posts.tab` | enum | `posts` | `posts`, `reels` |
| `include.posts.since` | string | `—` | YYYY-MM-DD |

### Example

```bash
curl -X POST https://api.zomler.com/api/v1/platforms/instagram \
  -H "X-API-Key: zk_live_…" \
  -H "Content-Type: application/json" \
  -d '{
  "request": {
    "op": "profiles",
    "subjects": [
      "example"
    ]
  },
  "estimateOnly": false
}'
```

```js
const res = await fetch("https://api.zomler.com/api/v1/platforms/instagram", {
  method: "POST",
  headers: {
    "X-API-Key": process.env.ZOMLER_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "request": {
      "op": "profiles",
      "subjects": [
        "example"
      ]
    },
    "estimateOnly": false
  }),
});
const envelope = await res.json();
console.log(envelope.data, envelope.cost.creditsCharged);
```

```python
import os, httpx

res = httpx.post(
    "https://api.zomler.com/api/v1/platforms/instagram",
    headers={"X-API-Key": os.environ["ZOMLER_API_KEY"]},
    json={
      "request": {
        "op": "profiles",
        "subjects": [
          "example"
        ]
      },
      "estimateOnly": False
    },
    timeout=120,
)
envelope = res.json()
print(envelope["data"], envelope["cost"]["creditsCharged"])
```

## posts

from 20 credits for 12 · fresh for 1 day

### Request fields

| Field | Type | Default | Values / limits |
| --- | --- | --- | --- |
| `subject` (required) | string | — | ≤400 chars |
| `limit` | integer | `12` | 1-48 |
| `tab`◆ | enum | `posts` | `posts`, `reels` |
| `since` | string | `—` | YYYY-MM-DD |

### Example

```bash
curl -X POST https://api.zomler.com/api/v1/platforms/instagram \
  -H "X-API-Key: zk_live_…" \
  -H "Content-Type: application/json" \
  -d '{
  "request": {
    "op": "posts",
    "subject": "example"
  },
  "estimateOnly": false
}'
```

```js
const res = await fetch("https://api.zomler.com/api/v1/platforms/instagram", {
  method: "POST",
  headers: {
    "X-API-Key": process.env.ZOMLER_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "request": {
      "op": "posts",
      "subject": "example"
    },
    "estimateOnly": false
  }),
});
const envelope = await res.json();
console.log(envelope.data, envelope.cost.creditsCharged);
```

```python
import os, httpx

res = httpx.post(
    "https://api.zomler.com/api/v1/platforms/instagram",
    headers={"X-API-Key": os.environ["ZOMLER_API_KEY"]},
    json={
      "request": {
        "op": "posts",
        "subject": "example"
      },
      "estimateOnly": False
    },
    timeout=120,
)
envelope = res.json()
print(envelope["data"], envelope["cost"]["creditsCharged"])
```

## similar

from 20 credits for 25 · fresh for 30 days

### Request fields

| Field | Type | Default | Values / limits |
| --- | --- | --- | --- |
| `subject` (required) | string | — | ≤400 chars |
| `limit` | integer | `25` | 1-50 |

### Example

```bash
curl -X POST https://api.zomler.com/api/v1/platforms/instagram \
  -H "X-API-Key: zk_live_…" \
  -H "Content-Type: application/json" \
  -d '{
  "request": {
    "op": "similar",
    "subject": "example"
  },
  "estimateOnly": false
}'
```

```js
const res = await fetch("https://api.zomler.com/api/v1/platforms/instagram", {
  method: "POST",
  headers: {
    "X-API-Key": process.env.ZOMLER_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "request": {
      "op": "similar",
      "subject": "example"
    },
    "estimateOnly": false
  }),
});
const envelope = await res.json();
console.log(envelope.data, envelope.cost.creditsCharged);
```

```python
import os, httpx

res = httpx.post(
    "https://api.zomler.com/api/v1/platforms/instagram",
    headers={"X-API-Key": os.environ["ZOMLER_API_KEY"]},
    json={
      "request": {
        "op": "similar",
        "subject": "example"
      },
      "estimateOnly": False
    },
    timeout=120,
)
envelope = res.json()
print(envelope["data"], envelope["cost"]["creditsCharged"])
```

## hashtag

from 20 credits for 25

Posts TAGGED with a hashtag — Instagram's public listening surface. 'top' is the ranked timeline; 'newest' is chronological.

### Request fields

| Field | Type | Default | Values / limits |
| --- | --- | --- | --- |
| `hashtag` (required) | string | — | ≤150 chars |
| `sort` | enum | `top` | `top`, `newest` |
| `limit` | integer | `25` | 1-50 |

### Example

```bash
curl -X POST https://api.zomler.com/api/v1/platforms/instagram \
  -H "X-API-Key: zk_live_…" \
  -H "Content-Type: application/json" \
  -d '{
  "request": {
    "op": "hashtag",
    "hashtag": "example"
  },
  "estimateOnly": false
}'
```

```js
const res = await fetch("https://api.zomler.com/api/v1/platforms/instagram", {
  method: "POST",
  headers: {
    "X-API-Key": process.env.ZOMLER_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "request": {
      "op": "hashtag",
      "hashtag": "example"
    },
    "estimateOnly": false
  }),
});
const envelope = await res.json();
console.log(envelope.data, envelope.cost.creditsCharged);
```

```python
import os, httpx

res = httpx.post(
    "https://api.zomler.com/api/v1/platforms/instagram",
    headers={"X-API-Key": os.environ["ZOMLER_API_KEY"]},
    json={
      "request": {
        "op": "hashtag",
        "hashtag": "example"
      },
      "estimateOnly": False
    },
    timeout=120,
)
envelope = res.json()
print(envelope["data"], envelope["cost"]["creditsCharged"])
```

## search

from 20 credits for 10

Instagram's own account search — find handles by name or keyword.

### Request fields

| Field | Type | Default | Values / limits |
| --- | --- | --- | --- |
| `query` (required) | string | — | ≤300 chars |
| `limit` | integer | `10` | 1-25 |

### Example

```bash
curl -X POST https://api.zomler.com/api/v1/platforms/instagram \
  -H "X-API-Key: zk_live_…" \
  -H "Content-Type: application/json" \
  -d '{
  "request": {
    "op": "search",
    "query": "example"
  },
  "estimateOnly": false
}'
```

```js
const res = await fetch("https://api.zomler.com/api/v1/platforms/instagram", {
  method: "POST",
  headers: {
    "X-API-Key": process.env.ZOMLER_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "request": {
      "op": "search",
      "query": "example"
    },
    "estimateOnly": false
  }),
});
const envelope = await res.json();
console.log(envelope.data, envelope.cost.creditsCharged);
```

```python
import os, httpx

res = httpx.post(
    "https://api.zomler.com/api/v1/platforms/instagram",
    headers={"X-API-Key": os.environ["ZOMLER_API_KEY"]},
    json={
      "request": {
        "op": "search",
        "query": "example"
      },
      "estimateOnly": False
    },
    timeout=120,
)
envelope = res.json()
print(envelope["data"], envelope["cost"]["creditsCharged"])
```

## comments

from 13 credits for 25 · fresh for 1 day

Top comments on up to ten Instagram POSTS, by /p/ or /reel/ URL (or a bare shortcode). Author is free text — commenters are not corpus members.

### Request fields

| Field | Type | Default | Values / limits |
| --- | --- | --- | --- |
| `subjects` (required) | list of string | — | 1-10 items |
| `limit` | integer | `25` | 1-100 |

### Example

```bash
curl -X POST https://api.zomler.com/api/v1/platforms/instagram \
  -H "X-API-Key: zk_live_…" \
  -H "Content-Type: application/json" \
  -d '{
  "request": {
    "op": "comments",
    "subjects": [
      "example"
    ]
  },
  "estimateOnly": false
}'
```

```js
const res = await fetch("https://api.zomler.com/api/v1/platforms/instagram", {
  method: "POST",
  headers: {
    "X-API-Key": process.env.ZOMLER_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "request": {
      "op": "comments",
      "subjects": [
        "example"
      ]
    },
    "estimateOnly": false
  }),
});
const envelope = await res.json();
console.log(envelope.data, envelope.cost.creditsCharged);
```

```python
import os, httpx

res = httpx.post(
    "https://api.zomler.com/api/v1/platforms/instagram",
    headers={"X-API-Key": os.environ["ZOMLER_API_KEY"]},
    json={
      "request": {
        "op": "comments",
        "subjects": [
          "example"
        ]
      },
      "estimateOnly": False
    },
    timeout=120,
)
envelope = res.json()
print(envelope["data"], envelope["cost"]["creditsCharged"])
```

## followers

from 19 credits for 25 · fresh for 7 days

The followers OR the following list of up to ten public accounts. The discovered accounts become thin corpus rows and a directed follow edge.

### Request fields

| Field | Type | Default | Values / limits |
| --- | --- | --- | --- |
| `subjects` (required) | list of string | — | 1-10 items |
| `direction` | enum | `followers` | `followers`, `following` |
| `limit` | integer | `25` | 1-100 |

### Example

```bash
curl -X POST https://api.zomler.com/api/v1/platforms/instagram \
  -H "X-API-Key: zk_live_…" \
  -H "Content-Type: application/json" \
  -d '{
  "request": {
    "op": "followers",
    "subjects": [
      "example"
    ]
  },
  "estimateOnly": false
}'
```

```js
const res = await fetch("https://api.zomler.com/api/v1/platforms/instagram", {
  method: "POST",
  headers: {
    "X-API-Key": process.env.ZOMLER_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "request": {
      "op": "followers",
      "subjects": [
        "example"
      ]
    },
    "estimateOnly": false
  }),
});
const envelope = await res.json();
console.log(envelope.data, envelope.cost.creditsCharged);
```

```python
import os, httpx

res = httpx.post(
    "https://api.zomler.com/api/v1/platforms/instagram",
    headers={"X-API-Key": os.environ["ZOMLER_API_KEY"]},
    json={
      "request": {
        "op": "followers",
        "subjects": [
          "example"
        ]
      },
      "estimateOnly": False
    },
    timeout=120,
)
envelope = res.json()
print(envelope["data"], envelope["cost"]["creditsCharged"])
```

## history

free · reads what is held

The stored time series — free, reads only what captures already wrote.

### Request fields

| Field | Type | Default | Values / limits |
| --- | --- | --- | --- |
| `subjects` (required) | list of string | — | 1-10 items |
| `metric` | enum | `followers` | `followers`, `following`, `media_count`, `engagement_rate` |
| `days` | integer | `90` | 1-730 |

### Example

```bash
curl -X POST https://api.zomler.com/api/v1/platforms/instagram \
  -H "X-API-Key: zk_live_…" \
  -H "Content-Type: application/json" \
  -d '{
  "request": {
    "op": "history",
    "subjects": [
      "example"
    ]
  },
  "estimateOnly": false
}'
```

```js
const res = await fetch("https://api.zomler.com/api/v1/platforms/instagram", {
  method: "POST",
  headers: {
    "X-API-Key": process.env.ZOMLER_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "request": {
      "op": "history",
      "subjects": [
        "example"
      ]
    },
    "estimateOnly": false
  }),
});
const envelope = await res.json();
console.log(envelope.data, envelope.cost.creditsCharged);
```

```python
import os, httpx

res = httpx.post(
    "https://api.zomler.com/api/v1/platforms/instagram",
    headers={"X-API-Key": os.environ["ZOMLER_API_KEY"]},
    json={
      "request": {
        "op": "history",
        "subjects": [
          "example"
        ]
      },
      "estimateOnly": False
    },
    timeout=120,
)
envelope = res.json()
print(envelope["data"], envelope["cost"]["creditsCharged"])
```

---

Source: https://zomler.com/docs/api/platforms/instagram
