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

# ScrapeCreators: Instagram User Posts

> Get the recent posts of a public Instagram profile, with captions and engagement. Includes inputs, outputs, SDK V2 examples, and Deepline cost.

Get the recent posts of a public Instagram profile, with captions and engagement.

> [!NOTE]
>
> Tool ID: `scrapecreators_instagram_user_posts`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'scrapecreators_instagram_user_posts',
  {
    "handle": "example"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline run scrapecreators_instagram_user_posts --input '{
  "handle": "example"
}'
```

## Example response

The static output schema lacks the details for a reliable example. Use `deepline describe scrapecreators_instagram_user_posts --json` for the complete live contract.

## Input reference

Returns a paginated feed of a user's public Instagram posts, including reels, photos, videos, and carousels. Each item includes media type, shortcode, caption text, like count, comment count, play count, video URLs, image URLs, tagged users, and the published time in `items[].created_at` as an ISO 8601 UTC date. When supplied by Instagram, the media-level `fbid` is also returned. The original Unix timestamp remains available in `items[].taken_at`. Play counts reflect Instagram-only views and exclude cross-posted Facebook views. Supports cursor-based pagination via next\_max\_id for scrolling through the full timeline. ### Profile access errors These confirmed handle-resolution states on /v1/instagram/user/posts and /v2/instagram/user/posts return success=true even with HTTP 403/404. A confirmed state is a completed lookup, not a scraper failure. This approved boolean correction does not See the live schema below for the complete notes.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.handle` | `string` | Yes | — | Instagram handle |
| `payload.require_play_counts` | `boolean` | No | `false` | Only the literal query value 'true' enables this check. It requires play\_count on each returned video post. A real 0 is valid. It does not require ig\_play\_count or view counts, or counts on photos. If a required play\_count is missing or null, the request returns an error without charging credits instead of a paid partial success. With the default false, counts remain best-effort: usable posts are still billable even with missing play counts. Retrying does not guarantee that Instagram will return See the live schema for the complete constraint. |
| `payload.trim` | `boolean` | No | — | Set to true to get a trimmed response |
| `payload.next_max_id` | `string` | No | — | Cursor to get next page of results. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ````json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Returns a paginated feed of a user's public Instagram posts, including reels, photos, videos, and carousels. Each item includes media type, shortcode, caption text, like count, comment count, play count, video URLs, image URLs, tagged users, and the published time in `items[].created_at` as an ISO 8601 UTC date. When supplied by Instagram, the media-level `fbid` is also returned. The original Unix timestamp remains available in `items[].taken_at`. Play counts reflect Instagram-only views and exclude cross-posted Facebook views. Supports cursor-based pagination via next_max_id for scrolling through the full timeline. ### Profile access errors These confirmed handle-resolution states on /v1/instagram/user/posts and /v2/instagram/user/posts return success=true even with HTTP 403/404. A confirmed state is a completed lookup, not a scraper failure. This approved boolean correction does not change status codes, messages, fields, or zero-credit billing. Actual retrieval failures remain success=false. Preserve each endpoint's response contract; see the [response-contract changelog](/#response-contract-changelog). A confirmed age gate returns HTTP 403 and zero credits. Unlike /v1/instagram/profile, these routes do not include age_restricted, handle, or userId in this error response: ```json { \"success\": true, \"credits_remaining\": 100, \"credits_charged\": 0, \"error\": \"forbidden\", \"errorStatus\": 403, \"message\": \"Profile is age restricted\" } ``` An explicit restricted-profile error returns HTTP 404 and zero credits, with the exact message Profile is private: ```json { \"success\": true, \"credits_remaining\": 100, \"credits_charged\": 0, \"error\": \"not_found\", \"errorStatus\": 404, \"message\": \"Profile is private\" } ``` An explicitly confirmed unavailable profile returns HTTP 404 and zero credits: ```json { \"success\": true, \"credits_remaining\": 100, \"credits_charged\": 0, \"error\": \"not_found\", \"errorStatus\": 404, \"message\": \"Profile is unavailable on Instagram\" } ``` These are the explicit handle-resolution error branches, not a blanket description of every historical 404 fallback. The v2 route also retains legacy success=true HTTP-404 bodies (Posts not found, Account doesn't exist, or Profile is restricted). They differ in fields and legacy behavior from the explicit confirmed-state responses above; success=true alone does not distinguish them. No age-vs-region reason field is exposed. A generic login prompt does not establish age gating, and unavailability does not prove deletion. /v1/instagram/post and /v1/tiktok/profile have separate error contracts. Play counts can sometimes be inaccurate. Access-response examples distinguish confirmed age gates, restrictions, and unavailable profiles; existing legacy responses are retained.",
    "properties": {
      "handle": {
        "type": "string",
        "description": "Instagram handle"
      },
      "require_play_counts": {
        "type": "boolean",
        "description": "Only the literal query value 'true' enables this check. It requires play_count on each returned video post; a real 0 is valid. It does not require ig_play_count or view counts, or counts on photos. If a required play_count is missing or null, the request returns an error without charging credits instead of a paid partial success. With the default false, counts remain best-effort: usable posts are still billable even with missing play counts. Retrying does not guarantee that Instagram will return the missing counts. [Why counts can be missing](https://scrapecreators.com/blog/instagram-play-counts-missing).",
        "default": false
      },
      "trim": {
        "type": "boolean",
        "description": "Set to true to get a trimmed response"
      },
      "next_max_id": {
        "type": "string",
        "description": "Cursor to get next page of results."
      }
    },
    "required": [
      "handle"
    ],
    "additionalProperties": false
  }
  ````
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `unknown` | Yes | — | Provider response payload. |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "description": "Provider response payload."
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0.02` per pricing unit.

## Related documentation

* [Connect integrations](https://deepline.com/docs/integrations.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


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