# Instagram

OpenAPI spec: [https://api.payweave.app/app/app_jbkxeii43v85abm3x12j9wj2/openapi.json](https://api.payweave.app/app/app_jbkxeii43v85abm3x12j9wj2/openapi.json)

## Networks

| Name | CAIP-2 | Chain ID / Cluster | Protocols |
|---|---|---|---|
| Tempo Mainnet | `eip155:4217` | 4217 | mpp |
| Solana Mainnet | `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp` | mainnet-beta | mpp, x402 |
| Base | `eip155:8453` | 8453 | x402 |

## Accepted Currencies

| Symbol | Name | Decimals | Network | Address | Protocols |
|---|---|---|---|---|---|
| USDC.e | Bridged USDC (Stargate) | 6 | `eip155:4217` | `0x20c000000000000000000000b9537d11c60e8b50` | mpp |
| USDC | USD Coin (Solana) | 6 | `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp` | `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v` | mpp, x402 |
| USDC | USD Coin | 6 | `eip155:8453` | `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` | x402 |

## Endpoints (3)

### Instagram: Post Comments

Get comments on an Instagram post. Body: { "postUrl": "https://www.instagram.com/p/XXXXXXX/", "limit": 20 }. Price scales with `limit` (max 50 — Apify's own cap for comments).

- Method: POST
- Path: `/comments`
- Price: $0.00405000

**Input Schema**

```json
{
  "type": "object",
  "properties": {
    "postUrl": {
      "type": "string",
      "description": "Instagram post or reel URL, e.g. https://www.instagram.com/p/XXXXXXX/"
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 50,
      "description": "Number of comments to return (default 20, max 50). Price scales with this value."
    }
  },
  "required": [
    "postUrl"
  ]
}
```

**Output Schema**

```json
{
  "type": "array",
  "description": "Instagram comment objects forwarded verbatim from Apify."
}
```

## How to invoke

Payment is handled automatically — the client signs the 402 challenge and retries.

### TypeScript — Tempo (mppx + fetch) ([docs](https://mpp.dev/sdk/typescript/client))

```ts
import { privateKeyToAccount } from 'viem/accounts'
import { Mppx, tempo } from 'mppx/client'

Mppx.create({
  methods: [tempo({ account: privateKeyToAccount('0x...') })],
})

const res = await fetch('http://instagram.payweave.services/comments', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "postUrl": "",
    "limit": 1
  }),
})
const data = await res.json()
```

### TypeScript — Solana (@solana/mpp + fetch) ([docs](https://github.com/solana-foundation/mpp-sdk))

```ts
import { createKeyPairSignerFromBytes } from '@solana/kit'
import { Mppx } from 'mppx/client'
import { solana } from '@solana/mpp/client'

const signer = await createKeyPairSignerFromBytes(/* 64-byte secret key */)
Mppx.create({ methods: [solana({ signer })] })

const res = await fetch('http://instagram.payweave.services/comments', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "postUrl": "",
    "limit": 1
  }),
})
const data = await res.json()
```

### mppx CLI ([docs](https://mpp.dev/sdk/typescript/cli))

```sh
npx mppx "http://instagram.payweave.services/comments" -X POST -H 'Content-Type: application/json' -d '{"postUrl":"","limit":1}'
```

### Tempo Wallet ([docs](https://docs.tempo.xyz/cli/wallet))

```sh
tempo request "http://instagram.payweave.services/comments" -X POST --json '{"postUrl":"","limit":1}'
```

### pay.sh — Solana Foundation ([docs](https://pay.sh))

```sh
pay --mainnet curl "http://instagram.payweave.services/comments" -X POST -H 'Content-Type: application/json' -d '{"postUrl":"","limit":1}'
```

### agentcash CLI ([docs](https://www.npmjs.com/package/agentcash))

```sh
npx agentcash fetch "http://instagram.payweave.services/comments" -m POST -b '{"postUrl":"","limit":1}' -p mpp
```

### x402 — Base / Solana USDC (x402-fetch) ([docs](https://x402.org))

```ts
import { wrapFetchWithPayment } from 'x402-fetch'
import { privateKeyToAccount } from 'viem/accounts'

const account = privateKeyToAccount('0x...') // Base USDC wallet
const fetchWithPay = wrapFetchWithPayment(fetch, account)

const res = await fetchWithPay('http://instagram.payweave.services/comments', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "postUrl": "",
    "limit": 1
  }),
})
const data = await res.json()
```

### x402 — agentcash CLI

```sh
npx agentcash fetch "http://instagram.payweave.services/comments" -m POST -b '{"postUrl":"","limit":1}' -p x402
```

### Instagram: Profile Posts

Get recent posts from an Instagram profile. Body: { "profileUrl": "https://www.instagram.com/username/", "limit": 20 }. Price scales with `limit` (max 100).

- Method: POST
- Path: `/posts`
- Price: $0.00405000

**Input Schema**

```json
{
  "type": "object",
  "properties": {
    "profileUrl": {
      "type": "string",
      "description": "Instagram profile URL, e.g. https://www.instagram.com/username/"
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100,
      "description": "Number of posts to return (default 20, max 100). Price scales with this value."
    }
  },
  "required": [
    "profileUrl"
  ]
}
```

**Output Schema**

```json
{
  "type": "array",
  "description": "Instagram post objects forwarded verbatim from Apify."
}
```

## How to invoke

Payment is handled automatically — the client signs the 402 challenge and retries.

### TypeScript — Tempo (mppx + fetch) ([docs](https://mpp.dev/sdk/typescript/client))

```ts
import { privateKeyToAccount } from 'viem/accounts'
import { Mppx, tempo } from 'mppx/client'

Mppx.create({
  methods: [tempo({ account: privateKeyToAccount('0x...') })],
})

const res = await fetch('http://instagram.payweave.services/posts', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "profileUrl": "",
    "limit": 1
  }),
})
const data = await res.json()
```

### TypeScript — Solana (@solana/mpp + fetch) ([docs](https://github.com/solana-foundation/mpp-sdk))

```ts
import { createKeyPairSignerFromBytes } from '@solana/kit'
import { Mppx } from 'mppx/client'
import { solana } from '@solana/mpp/client'

const signer = await createKeyPairSignerFromBytes(/* 64-byte secret key */)
Mppx.create({ methods: [solana({ signer })] })

const res = await fetch('http://instagram.payweave.services/posts', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "profileUrl": "",
    "limit": 1
  }),
})
const data = await res.json()
```

### mppx CLI ([docs](https://mpp.dev/sdk/typescript/cli))

```sh
npx mppx "http://instagram.payweave.services/posts" -X POST -H 'Content-Type: application/json' -d '{"profileUrl":"","limit":1}'
```

### Tempo Wallet ([docs](https://docs.tempo.xyz/cli/wallet))

```sh
tempo request "http://instagram.payweave.services/posts" -X POST --json '{"profileUrl":"","limit":1}'
```

### pay.sh — Solana Foundation ([docs](https://pay.sh))

```sh
pay --mainnet curl "http://instagram.payweave.services/posts" -X POST -H 'Content-Type: application/json' -d '{"profileUrl":"","limit":1}'
```

### agentcash CLI ([docs](https://www.npmjs.com/package/agentcash))

```sh
npx agentcash fetch "http://instagram.payweave.services/posts" -m POST -b '{"profileUrl":"","limit":1}' -p mpp
```

### x402 — Base / Solana USDC (x402-fetch) ([docs](https://x402.org))

```ts
import { wrapFetchWithPayment } from 'x402-fetch'
import { privateKeyToAccount } from 'viem/accounts'

const account = privateKeyToAccount('0x...') // Base USDC wallet
const fetchWithPay = wrapFetchWithPayment(fetch, account)

const res = await fetchWithPay('http://instagram.payweave.services/posts', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "profileUrl": "",
    "limit": 1
  }),
})
const data = await res.json()
```

### x402 — agentcash CLI

```sh
npx agentcash fetch "http://instagram.payweave.services/posts" -m POST -b '{"profileUrl":"","limit":1}' -p x402
```

### Instagram: Profile Details

Get an Instagram profile's details (bio, follower count, post count). Body: { "profileUrl": "https://www.instagram.com/username/" }.

- Method: POST
- Path: `/profile`
- Price: $0.00405000

**Input Schema**

```json
{
  "type": "object",
  "properties": {
    "profileUrl": {
      "type": "string",
      "description": "Instagram profile URL, e.g. https://www.instagram.com/username/"
    }
  },
  "required": [
    "profileUrl"
  ]
}
```

**Output Schema**

```json
{
  "type": "array",
  "description": "Instagram profile-details object forwarded verbatim from Apify."
}
```

## How to invoke

Payment is handled automatically — the client signs the 402 challenge and retries.

### TypeScript — Tempo (mppx + fetch) ([docs](https://mpp.dev/sdk/typescript/client))

```ts
import { privateKeyToAccount } from 'viem/accounts'
import { Mppx, tempo } from 'mppx/client'

Mppx.create({
  methods: [tempo({ account: privateKeyToAccount('0x...') })],
})

const res = await fetch('http://instagram.payweave.services/profile', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "profileUrl": ""
  }),
})
const data = await res.json()
```

### TypeScript — Solana (@solana/mpp + fetch) ([docs](https://github.com/solana-foundation/mpp-sdk))

```ts
import { createKeyPairSignerFromBytes } from '@solana/kit'
import { Mppx } from 'mppx/client'
import { solana } from '@solana/mpp/client'

const signer = await createKeyPairSignerFromBytes(/* 64-byte secret key */)
Mppx.create({ methods: [solana({ signer })] })

const res = await fetch('http://instagram.payweave.services/profile', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "profileUrl": ""
  }),
})
const data = await res.json()
```

### mppx CLI ([docs](https://mpp.dev/sdk/typescript/cli))

```sh
npx mppx "http://instagram.payweave.services/profile" -X POST -H 'Content-Type: application/json' -d '{"profileUrl":""}'
```

### Tempo Wallet ([docs](https://docs.tempo.xyz/cli/wallet))

```sh
tempo request "http://instagram.payweave.services/profile" -X POST --json '{"profileUrl":""}'
```

### pay.sh — Solana Foundation ([docs](https://pay.sh))

```sh
pay --mainnet curl "http://instagram.payweave.services/profile" -X POST -H 'Content-Type: application/json' -d '{"profileUrl":""}'
```

### agentcash CLI ([docs](https://www.npmjs.com/package/agentcash))

```sh
npx agentcash fetch "http://instagram.payweave.services/profile" -m POST -b '{"profileUrl":""}' -p mpp
```

### x402 — Base / Solana USDC (x402-fetch) ([docs](https://x402.org))

```ts
import { wrapFetchWithPayment } from 'x402-fetch'
import { privateKeyToAccount } from 'viem/accounts'

const account = privateKeyToAccount('0x...') // Base USDC wallet
const fetchWithPay = wrapFetchWithPayment(fetch, account)

const res = await fetchWithPay('http://instagram.payweave.services/profile', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "profileUrl": ""
  }),
})
const data = await res.json()
```

### x402 — agentcash CLI

```sh
npx agentcash fetch "http://instagram.payweave.services/profile" -m POST -b '{"profileUrl":""}' -p x402
```
