# Instagram User Posts Scraper (`powerai/instagram-user-posts-scraper`) Actor

Extract Instagram user posts with detailed media metadata, supporting automatic pagination and custom max results.

- **URL**: https://apify.com/powerai/instagram-user-posts-scraper.md
- **Developed by:** [PowerAI](https://apify.com/powerai) (community)
- **Categories:** Social media, Videos
- **Stats:** 57 total users, 0 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.99 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## 📸 Instagram User Posts Scraper

This actor allows you to fetch posts from a specific Instagram user by their user ID. It supports automatic pagination and lets you specify the maximum number of posts to retrieve.

### Features

- Fetches posts for any public Instagram user by user ID.
- Supports automatic pagination to collect up to your specified `maxResults`.
- Returns detailed media metadata, including images, videos, and captions.
- Handles API rate limits and errors gracefully.

### Input Parameters

| Field      | Type    | Required | Description                                      |
|------------|---------|----------|--------------------------------------------------|
| id         | integer | Yes      | Instagram user ID to fetch posts for.            |
| maxResults | integer | No       | Maximum number of posts to fetch (default: 12).  |

### Output

The output is an array of Instagram media objects, each containing:

- `id`: Media ID
- `__typename`: Media type
- `display_url`: Main media URL
- `display_resources`: Array of resource objects (src, width, height)
- `is_video`: Boolean indicating if the media is a video
- `media_preview`: Preview string or null
- `tracking_token`: Tracking token
- `has_upcoming_event`: Boolean
- `accessibility_caption`: Accessibility caption or null

### Example Input

```json
{
  "id": 18527,
  "maxResults": 12
}
```

### Example Output

```json
[
  {
    "__typename": "GraphSidecar",
    "id": "3643164212857365960",
    "gating_info": null,
    "fact_check_overall_rating": null,
    "fact_check_information": null,
    "media_overlay_info": null,
    "sensitivity_friction_info": null,
    "sharing_friction_info": {
      "should_have_sharing_friction": false,
      "bloks_app_url": null
    },
    "dimensions": {
      "height": 1346,
      "width": 1080
    },
    "display_url": "https://instagram.fqpa2-1.fna.fbcdn.net/v/t51.2885-15/501657423_18501285874018528_5909921503236186447_n.jpg?stp=dst-jpg_e35_p1080x1080_sh0.08_tt6&_nc_ad=z-m&_nc_ht=instagram.fqpa2-1.fna.fbcdn.net&_nc_cat=104&_nc_oc=Q6cZ2QFS9DXpdcHuGyDOc2ik1FDkF9UhjEinB_awal3fdrQKqO-9xS-qI11ibdhsScYDGy8&_nc_ohc=ti7h8L3PZAYQ7kNvwFs1p7g&_nc_gid=pWkeD2tTAhCe_JL8AjHF5g&edm=APU89FABAAAA&ccb=7-5&ig_cache_key=MzY0MzE2NDIwNTM4MzAyOTUzOQ%3D%3D.3-ccb7-5&oh=00_AfIMXCsst67nfPzH14tsvZ6R0CjlWqmQTdWMRX0xM66AiA&oe=683F45EB&_nc_sid=bc0c2c",
    "display_resources": [
      {
        "src": "https://instagram.fqpa2-1.fna.fbcdn.net/v/t51.2885-15/501657423_18501285874018528_5909921503236186447_n.jpg?stp=dst-jpg_e35_p640x640_sh0.08_tt6&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4xNDQweDE3OTUuc2RyLmY3NTc2MS5kZWZhdWx0X2ltYWdlIn0&_nc_ad=z-m&_nc_ht=instagram.fqpa2-1.fna.fbcdn.net&_nc_cat=104&_nc_oc=Q6cZ2QFS9DXpdcHuGyDOc2ik1FDkF9UhjEinB_awal3fdrQKqO-9xS-qI11ibdhsScYDGy8&_nc_ohc=ti7h8L3PZAYQ7kNvwFs1p7g&_nc_gid=pWkeD2tTAhCe_JL8AjHF5g&edm=APU89FABAAAA&ccb=7-5&oh=00_AfKbzD4EltmYhjOltlss5A8fuJPL9NGIcfLllWVahwsY1w&oe=683F45EB&_nc_sid=bc0c2c",
        "config_width": 640,
        "config_height": 797
      },
      {
        "src": "https://instagram.fqpa2-1.fna.fbcdn.net/v/t51.2885-15/501657423_18501285874018528_5909921503236186447_n.jpg?stp=dst-jpg_e35_p750x750_sh0.08_tt6&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4xNDQweDE3OTUuc2RyLmY3NTc2MS5kZWZhdWx0X2ltYWdlIn0&_nc_ad=z-m&_nc_ht=instagram.fqpa2-1.fna.fbcdn.net&_nc_cat=104&_nc_oc=Q6cZ2QFS9DXpdcHuGyDOc2ik1FDkF9UhjEinB_awal3fdrQKqO-9xS-qI11ibdhsScYDGy8&_nc_ohc=ti7h8L3PZAYQ7kNvwFs1p7g&_nc_gid=pWkeD2tTAhCe_JL8AjHF5g&edm=APU89FABAAAA&ccb=7-5&oh=00_AfKnvTtnE_d5DsDv4B5XRQoix-kzAfnki0AUZt-57abluQ&oe=683F45EB&_nc_sid=bc0c2c",
        "config_width": 750,
        "config_height": 934
      },
      {
        "src": "https://instagram.fqpa2-1.fna.fbcdn.net/v/t51.2885-15/501657423_18501285874018528_5909921503236186447_n.jpg?stp=dst-jpg_e35_p1080x1080_tt6&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4xNDQweDE3OTUuc2RyLmY3NTc2MS5kZWZhdWx0X2ltYWdlIn0&_nc_ad=z-m&_nc_ht=instagram.fqpa2-1.fna.fbcdn.net&_nc_cat=104&_nc_oc=Q6cZ2QFS9DXpdcHuGyDOc2ik1FDkF9UhjEinB_awal3fdrQKqO-9xS-qI11ibdhsScYDGy8&_nc_ohc=ti7h8L3PZAYQ7kNvwFs1p7g&_nc_gid=pWkeD2tTAhCe_JL8AjHF5g&edm=APU89FABAAAA&ccb=7-5&oh=00_AfKKKQTVd1287Tm1mJXh1jV_xu6Hesh6gbIimDm-g6Ancg&oe=683F45EB&_nc_sid=bc0c2c",
        "config_width": 1080,
        "config_height": 1346
      }
    ],
    "is_video": false,
    "media_preview": null,
    "tracking_token": "eyJ2ZXJzaW9uIjo1LCJwYXlsb2FkIjp7ImlzX2FuYWx5dGljc190cmFja2VkIjp0cnVlLCJ1dWlkIjoiMzIyNDc0MzE4MmJlNDI2YjkyODU5ZDIxODYyNzc2YmYzNjQzMTY0MjEyODU3MzY1OTYwIn0sInNpZ25hdHVyZSI6IiJ9",
    "has_upcoming_event": false,
    "edge_media_to_tagged_user": {
      "edges": [
        {
          "node": {
            "user": {
              "full_name": "BBQ Box 串烧工坊",
              "followed_by_viewer": false,
              "id": "8635134347",
              "is_verified": true,
              "profile_pic_url": "https://instagram.fqpa2-1.fna.fbcdn.net/v/t51.2885-19/430678779_362739459969196_7668945801601983914_n.jpg?stp=dst-jpg_e0_s150x150_tt6&_nc_ad=z-m&_nc_ht=instagram.fqpa2-1.fna.fbcdn.net&_nc_cat=104&_nc_oc=Q6cZ2QFS9DXpdcHuGyDOc2ik1FDkF9UhjEinB_awal3fdrQKqO-9xS-qI11ibdhsScYDGy8&_nc_ohc=-ZOtZ5oiO74Q7kNvwEolDBm&_nc_gid=pWkeD2tTAhCe_JL8AjHF5g&edm=APU89FABAAAA&ccb=7-5&oh=00_AfKpEzmfdJw6pSEwb7hLCV2TSynUQxqU43HnxUbWM6ANSA&oe=683F152F&_nc_sid=bc0c2c",
              "username": "bbqboxsg"
            },
            "x": 0.7581395349000001,
            "y": 0.4364340967
          }
        }
      ]
    },
    "accessibility_caption": null,
    "edge_media_to_caption": {
      "edges": [
        {
          "node": {
            "text": "Rain-soaked streets and neon lights. A little rain never stopped the vibe. Chinatown is always alive with energy, no matter the weather. \n\n*scroll & hold to see full image*\n\n#chinatownsingapore #singapore #rainynight #thisissg #cityvibes #nightphotography #citybynight #streetsofsingapore #streetsatnight #raw_nightshots #urbanaisle #urbanromantix"
          }
        }
      ]
    },
    "shortcode": "DKPHoydx2XI",
    "edge_media_to_comment": {
      "count": 33,
      "page_info": {
        "has_next_page": true,
        "end_cursor": ""
      }
    },
    "edge_media_to_sponsor_user": {
      "edges": []
    },
    "is_affiliate": false,
    "is_paid_partnership": false,
    "comments_disabled": false,
    "taken_at_timestamp": 1748519039,
    "edge_media_preview_like": {
      "count": -1,
      "edges": [
        {
          "node": {
            "id": "211233695",
            "profile_pic_url": "https://instagram.fqpa2-1.fna.fbcdn.net/v/t51.2885-19/293331782_3174356176214934_4741901950907590589_n.jpg?stp=dst-jpg_e0_s150x150_tt6&_nc_ad=z-m&_nc_ht=instagram.fqpa2-1.fna.fbcdn.net&_nc_cat=106&_nc_oc=Q6cZ2QFS9DXpdcHuGyDOc2ik1FDkF9UhjEinB_awal3fdrQKqO-9xS-qI11ibdhsScYDGy8&_nc_ohc=VE0OTROIcWoQ7kNvwEekcM1&_nc_gid=pWkeD2tTAhCe_JL8AjHF5g&edm=APU89FABAAAA&ccb=7-5&oh=00_AfJRUeQDXH3BTjOvN8hjxT2_CTZASeFpwri1Kw4CC0ghGg&oe=683F31C2&_nc_sid=bc0c2c",
            "username": "tommy_marino1"
          }
        },
        {
          "node": {
            "id": "656057783",
            "profile_pic_url": "https://instagram.fqpa2-1.fna.fbcdn.net/v/t51.2885-19/152463519_2864709513788085_842425852358698073_n.jpg?stp=dst-jpg_e0_s150x150_tt6&_nc_ad=z-m&_nc_ht=instagram.fqpa2-1.fna.fbcdn.net&_nc_cat=1&_nc_oc=Q6cZ2QFS9DXpdcHuGyDOc2ik1FDkF9UhjEinB_awal3fdrQKqO-9xS-qI11ibdhsScYDGy8&_nc_ohc=bhHieN3R210Q7kNvwFaairU&_nc_gid=pWkeD2tTAhCe_JL8AjHF5g&edm=APU89FABAAAA&ccb=7-5&oh=00_AfKPsy_54NfeKPhWVTxI0AeYr1HZVIdC7RVHkGBUYfkKMQ&oe=683F13BA&_nc_sid=bc0c2c",
            "username": "nyclovesnyc"
          }
        }
      ]
    },
    "owner": {
      "id": "18527",
      "username": "javan"
    },
    "location": {
      "id": "108696550922980",
      "has_public_page": true,
      "name": "Singapore 新加坡",
      "slug": "singapore"
    },
    "nft_asset_info": null,
    "viewer_has_liked": false,
    "viewer_has_saved": false,
    "viewer_has_saved_to_collection": false,
    "viewer_in_photo_of_you": false,
    "viewer_can_reshare": true,
    "thumbnail_src": "https://instagram.fqpa2-1.fna.fbcdn.net/v/t51.2885-15/501657423_18501285874018528_5909921503236186447_n.jpg?stp=c0.177.1440.1440a_dst-jpg_e35_s640x640_sh0.08_tt6&_nc_ad=z-m&_nc_ht=instagram.fqpa2-1.fna.fbcdn.net&_nc_cat=104&_nc_oc=Q6cZ2QFS9DXpdcHuGyDOc2ik1FDkF9UhjEinB_awal3fdrQKqO-9xS-qI11ibdhsScYDGy8&_nc_ohc=ti7h8L3PZAYQ7kNvwFs1p7g&_nc_gid=pWkeD2tTAhCe_JL8AjHF5g&edm=APU89FABAAAA&ccb=7-5&ig_cache_key=MzY0MzE2NDIwNTM4MzAyOTUzOQ%3D%3D.3.c-ccb7-5&oh=00_AfJ7Doqwh6Yy9bKVfE4QmVVtrBZvdXAoILxusfBgj_p6tw&oe=683F45EB&_nc_sid=bc0c2c",
    "thumbnail_resources": [
      {
        "src": "https://instagram.fqpa2-1.fna.fbcdn.net/v/t51.2885-15/501657423_18501285874018528_5909921503236186447_n.jpg?stp=c0.177.1440.1440a_dst-jpg_e35_s150x150_tt6&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4xNDQweDE3OTUuc2RyLmY3NTc2MS5kZWZhdWx0X2ltYWdlIn0&_nc_ad=z-m&_nc_ht=instagram.fqpa2-1.fna.fbcdn.net&_nc_cat=104&_nc_oc=Q6cZ2QFS9DXpdcHuGyDOc2ik1FDkF9UhjEinB_awal3fdrQKqO-9xS-qI11ibdhsScYDGy8&_nc_ohc=ti7h8L3PZAYQ7kNvwFs1p7g&_nc_gid=pWkeD2tTAhCe_JL8AjHF5g&edm=APU89FABAAAA&ccb=7-5&oh=00_AfLoW6UsqFqRORatqi8rinEAdHDpKsNdctVGoJ9p9rKMpQ&oe=683F45EB&_nc_sid=bc0c2c",
        "config_width": 150,
        "config_height": 150
      },
      {
        "src": "https://instagram.fqpa2-1.fna.fbcdn.net/v/t51.2885-15/501657423_18501285874018528_5909921503236186447_n.jpg?stp=c0.177.1440.1440a_dst-jpg_e35_s240x240_tt6&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4xNDQweDE3OTUuc2RyLmY3NTc2MS5kZWZhdWx0X2ltYWdlIn0&_nc_ad=z-m&_nc_ht=instagram.fqpa2-1.fna.fbcdn.net&_nc_cat=104&_nc_oc=Q6cZ2QFS9DXpdcHuGyDOc2ik1FDkF9UhjEinB_awal3fdrQKqO-9xS-qI11ibdhsScYDGy8&_nc_ohc=ti7h8L3PZAYQ7kNvwFs1p7g&_nc_gid=pWkeD2tTAhCe_JL8AjHF5g&edm=APU89FABAAAA&ccb=7-5&oh=00_AfIo5xuIOYHVmP01tmdWH2qcIYAs6dcw2rBrwJVFDl01Aw&oe=683F45EB&_nc_sid=bc0c2c",
        "config_width": 240,
        "config_height": 240
      },
      {
        "src": "https://instagram.fqpa2-1.fna.fbcdn.net/v/t51.2885-15/501657423_18501285874018528_5909921503236186447_n.jpg?stp=c0.177.1440.1440a_dst-jpg_e35_s320x320_tt6&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4xNDQweDE3OTUuc2RyLmY3NTc2MS5kZWZhdWx0X2ltYWdlIn0&_nc_ad=z-m&_nc_ht=instagram.fqpa2-1.fna.fbcdn.net&_nc_cat=104&_nc_oc=Q6cZ2QFS9DXpdcHuGyDOc2ik1FDkF9UhjEinB_awal3fdrQKqO-9xS-qI11ibdhsScYDGy8&_nc_ohc=ti7h8L3PZAYQ7kNvwFs1p7g&_nc_gid=pWkeD2tTAhCe_JL8AjHF5g&edm=APU89FABAAAA&ccb=7-5&oh=00_AfLdX9hapMbvdJ-e_BuuIzndfFAzGKPwCpDNGSVWCWitgg&oe=683F45EB&_nc_sid=bc0c2c",
        "config_width": 320,
        "config_height": 320
      },
      {
        "src": "https://instagram.fqpa2-1.fna.fbcdn.net/v/t51.2885-15/501657423_18501285874018528_5909921503236186447_n.jpg?stp=c0.177.1440.1440a_dst-jpg_e35_s480x480_tt6&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4xNDQweDE3OTUuc2RyLmY3NTc2MS5kZWZhdWx0X2ltYWdlIn0&_nc_ad=z-m&_nc_ht=instagram.fqpa2-1.fna.fbcdn.net&_nc_cat=104&_nc_oc=Q6cZ2QFS9DXpdcHuGyDOc2ik1FDkF9UhjEinB_awal3fdrQKqO-9xS-qI11ibdhsScYDGy8&_nc_ohc=ti7h8L3PZAYQ7kNvwFs1p7g&_nc_gid=pWkeD2tTAhCe_JL8AjHF5g&edm=APU89FABAAAA&ccb=7-5&oh=00_AfJ471xoeR-gGEQC3FwsMpQA02VZa7KuR6TzM7DKBKuIgQ&oe=683F45EB&_nc_sid=bc0c2c",
        "config_width": 480,
        "config_height": 480
      },
      {
        "src": "https://instagram.fqpa2-1.fna.fbcdn.net/v/t51.2885-15/501657423_18501285874018528_5909921503236186447_n.jpg?stp=c0.177.1440.1440a_dst-jpg_e35_s640x640_sh0.08_tt6&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4xNDQweDE3OTUuc2RyLmY3NTc2MS5kZWZhdWx0X2ltYWdlIn0&_nc_ad=z-m&_nc_ht=instagram.fqpa2-1.fna.fbcdn.net&_nc_cat=104&_nc_oc=Q6cZ2QFS9DXpdcHuGyDOc2ik1FDkF9UhjEinB_awal3fdrQKqO-9xS-qI11ibdhsScYDGy8&_nc_ohc=ti7h8L3PZAYQ7kNvwFs1p7g&_nc_gid=pWkeD2tTAhCe_JL8AjHF5g&edm=APU89FABAAAA&ccb=7-5&oh=00_AfJ7Doqwh6Yy9bKVfE4QmVVtrBZvdXAoILxusfBgj_p6tw&oe=683F45EB&_nc_sid=bc0c2c",
        "config_width": 640,
        "config_height": 640
      }
    ],
    "coauthor_producers": [],
    "pinned_for_users": [],
    "like_and_view_counts_disabled": true,
    "edge_sidecar_to_children": {
      "edges": [
        {
          "node": {
            "__typename": "GraphImage",
            "id": "3643164205383029539",
            "gating_info": null,
            "fact_check_overall_rating": null,
            "fact_check_information": null,
            "media_overlay_info": null,
            "sensitivity_friction_info": null,
            "sharing_friction_info": {
              "should_have_sharing_friction": false,
              "bloks_app_url": null
            },
            "dimensions": {
              "height": 1346,
              "width": 1080
            },
            "display_url": "https://instagram.fqpa2-1.fna.fbcdn.net/v/t51.2885-15/501657423_18501285874018528_5909921503236186447_n.jpg?stp=dst-jpg_e35_p1080x1080_sh0.08_tt6&_nc_ad=z-m&_nc_ht=instagram.fqpa2-1.fna.fbcdn.net&_nc_cat=104&_nc_oc=Q6cZ2QFS9DXpdcHuGyDOc2ik1FDkF9UhjEinB_awal3fdrQKqO-9xS-qI11ibdhsScYDGy8&_nc_ohc=ti7h8L3PZAYQ7kNvwFs1p7g&_nc_gid=pWkeD2tTAhCe_JL8AjHF5g&edm=APU89FABAAAA&ccb=7-5&ig_cache_key=MzY0MzE2NDIwNTM4MzAyOTUzOQ%3D%3D.3-ccb7-5&oh=00_AfIMXCsst67nfPzH14tsvZ6R0CjlWqmQTdWMRX0xM66AiA&oe=683F45EB&_nc_sid=bc0c2c",
            "display_resources": [
              {
                "src": "https://instagram.fqpa2-1.fna.fbcdn.net/v/t51.2885-15/501657423_18501285874018528_5909921503236186447_n.jpg?stp=dst-jpg_e35_p640x640_sh0.08_tt6&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4xNDQweDE3OTUuc2RyLmY3NTc2MS5kZWZhdWx0X2ltYWdlIn0&_nc_ad=z-m&_nc_ht=instagram.fqpa2-1.fna.fbcdn.net&_nc_cat=104&_nc_oc=Q6cZ2QFS9DXpdcHuGyDOc2ik1FDkF9UhjEinB_awal3fdrQKqO-9xS-qI11ibdhsScYDGy8&_nc_ohc=ti7h8L3PZAYQ7kNvwFs1p7g&_nc_gid=pWkeD2tTAhCe_JL8AjHF5g&edm=APU89FABAAAA&ccb=7-5&oh=00_AfKbzD4EltmYhjOltlss5A8fuJPL9NGIcfLllWVahwsY1w&oe=683F45EB&_nc_sid=bc0c2c",
                "config_width": 640,
                "config_height": 797
              },
              {
                "src": "https://instagram.fqpa2-1.fna.fbcdn.net/v/t51.2885-15/501657423_18501285874018528_5909921503236186447_n.jpg?stp=dst-jpg_e35_p750x750_sh0.08_tt6&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4xNDQweDE3OTUuc2RyLmY3NTc2MS5kZWZhdWx0X2ltYWdlIn0&_nc_ad=z-m&_nc_ht=instagram.fqpa2-1.fna.fbcdn.net&_nc_cat=104&_nc_oc=Q6cZ2QFS9DXpdcHuGyDOc2ik1FDkF9UhjEinB_awal3fdrQKqO-9xS-qI11ibdhsScYDGy8&_nc_ohc=ti7h8L3PZAYQ7kNvwFs1p7g&_nc_gid=pWkeD2tTAhCe_JL8AjHF5g&edm=APU89FABAAAA&ccb=7-5&oh=00_AfKnvTtnE_d5DsDv4B5XRQoix-kzAfnki0AUZt-57abluQ&oe=683F45EB&_nc_sid=bc0c2c",
                "config_width": 750,
                "config_height": 934
              },
              {
                "src": "https://instagram.fqpa2-1.fna.fbcdn.net/v/t51.2885-15/501657423_18501285874018528_5909921503236186447_n.jpg?stp=dst-jpg_e35_p1080x1080_tt6&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4xNDQweDE3OTUuc2RyLmY3NTc2MS5kZWZhdWx0X2ltYWdlIn0&_nc_ad=z-m&_nc_ht=instagram.fqpa2-1.fna.fbcdn.net&_nc_cat=104&_nc_oc=Q6cZ2QFS9DXpdcHuGyDOc2ik1FDkF9UhjEinB_awal3fdrQKqO-9xS-qI11ibdhsScYDGy8&_nc_ohc=ti7h8L3PZAYQ7kNvwFs1p7g&_nc_gid=pWkeD2tTAhCe_JL8AjHF5g&edm=APU89FABAAAA&ccb=7-5&oh=00_AfKKKQTVd1287Tm1mJXh1jV_xu6Hesh6gbIimDm-g6Ancg&oe=683F45EB&_nc_sid=bc0c2c",
                "config_width": 1080,
                "config_height": 1346
              }
            ],
            "is_video": false,
            "media_preview": "ACIqxAxxjtTgtRbM9xUqDaKTLRFtG7BpqqCeamjILgkbh3HTt7VYDbj84OMduORwO3p2/GobsWo3KBHNFa2yL/nmf1/xopc6/qw/Zsq2yK2SRn68iknRAcjjkcdqbblgDj+dMkJOd3HP17VfUz6eZPboPvbgp56jP+c1Y3YcLnqPQfzPHvVFAce31FTSKSwGOo9etQ0m9TRNpaX/ABLmff8A8fX/AAoqr9mb+7+ooosuy/AfNL+Z/iV4G2HkcUkrFmyBxTEpTVW1uc9tbk8BZsIBzV5kc7cDkD096owdfwq3k1hPc76a900sj0orKJoqNe/4F8qP/9k=",
            "tracking_token": "eyJ2ZXJzaW9uIjo1LCJwYXlsb2FkIjp7ImlzX2FuYWx5dGljc190cmFja2VkIjp0cnVlLCJ1dWlkIjoiMzIyNDc0MzE4MmJlNDI2YjkyODU5ZDIxODYyNzc2YmYzNjQzMTY0MjA1MzgzMDI5NTM5In0sInNpZ25hdHVyZSI6IiJ9",
            "has_upcoming_event": false,
            "edge_media_to_tagged_user": {
              "edges": [
                {
                  "node": {
                    "user": {
                      "full_name": "BBQ Box 串烧工坊",
                      "followed_by_viewer": false,
                      "id": "8635134347",
                      "is_verified": true,
                      "profile_pic_url": "https://instagram.fqpa2-1.fna.fbcdn.net/v/t51.2885-19/430678779_362739459969196_7668945801601983914_n.jpg?stp=dst-jpg_e0_s150x150_tt6&_nc_ad=z-m&_nc_ht=instagram.fqpa2-1.fna.fbcdn.net&_nc_cat=104&_nc_oc=Q6cZ2QFS9DXpdcHuGyDOc2ik1FDkF9UhjEinB_awal3fdrQKqO-9xS-qI11ibdhsScYDGy8&_nc_ohc=-ZOtZ5oiO74Q7kNvwEolDBm&_nc_gid=pWkeD2tTAhCe_JL8AjHF5g&edm=APU89FABAAAA&ccb=7-5&oh=00_AfKpEzmfdJw6pSEwb7hLCV2TSynUQxqU43HnxUbWM6ANSA&oe=683F152F&_nc_sid=bc0c2c",
                      "username": "bbqboxsg"
                    },
                    "x": 0.7581395349000001,
                    "y": 0.4364340967
                  }
                }
              ]
            },
            "accessibility_caption": null
          }
        },
        {
          "node": {
            "__typename": "GraphImage",
            "id": "3643164205341147123",
            "gating_info": null,
            "fact_check_overall_rating": null,
            "fact_check_information": null,
            "media_overlay_info": null,
            "sensitivity_friction_info": null,
            "sharing_friction_info": {
              "should_have_sharing_friction": false,
              "bloks_app_url": null
            },
            "dimensions": {
              "height": 1346,
              "width": 1080
            },
            "display_url": "https://instagram.fqpa2-1.fna.fbcdn.net/v/t51.2885-15/501331505_18501285883018528_338344890616338567_n.jpg?stp=dst-jpg_e35_p1080x1080_sh0.08_tt6&_nc_ad=z-m&_nc_ht=instagram.fqpa2-1.fna.fbcdn.net&_nc_cat=104&_nc_oc=Q6cZ2QFS9DXpdcHuGyDOc2ik1FDkF9UhjEinB_awal3fdrQKqO-9xS-qI11ibdhsScYDGy8&_nc_ohc=qzxRGhtQifMQ7kNvwEaF65h&_nc_gid=pWkeD2tTAhCe_JL8AjHF5g&edm=APU89FABAAAA&ccb=7-5&ig_cache_key=MzY0MzE2NDIwNTM0MTE0NzEyMw%3D%3D.3-ccb7-5&oh=00_AfLBrlmSM9yCt9AGHOKCMAzzgVdJusrdz5HDUB4YlTkIXw&oe=683F15CB&_nc_sid=bc0c2c",
            "display_resources": [
              {
                "src": "https://instagram.fqpa2-1.fna.fbcdn.net/v/t51.2885-15/501331505_18501285883018528_338344890616338567_n.jpg?stp=dst-jpg_e35_p640x640_sh0.08_tt6&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4xNDQweDE3OTUuc2RyLmY3NTc2MS5kZWZhdWx0X2ltYWdlIn0&_nc_ad=z-m&_nc_ht=instagram.fqpa2-1.fna.fbcdn.net&_nc_cat=104&_nc_oc=Q6cZ2QFS9DXpdcHuGyDOc2ik1FDkF9UhjEinB_awal3fdrQKqO-9xS-qI11ibdhsScYDGy8&_nc_ohc=qzxRGhtQifMQ7kNvwEaF65h&_nc_gid=pWkeD2tTAhCe_JL8AjHF5g&edm=APU89FABAAAA&ccb=7-5&oh=00_AfIdraXnKEmAltaj8FKiBcTjtG_vt4qgIVmWs9FoxYBlAw&oe=683F15CB&_nc_sid=bc0c2c",
                "config_width": 640,
                "config_height": 797
              },
              {
                "src": "https://instagram.fqpa2-1.fna.fbcdn.net/v/t51.2885-15/501331505_18501285883018528_338344890616338567_n.jpg?stp=dst-jpg_e35_p750x750_sh0.08_tt6&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4xNDQweDE3OTUuc2RyLmY3NTc2MS5kZWZhdWx0X2ltYWdlIn0&_nc_ad=z-m&_nc_ht=instagram.fqpa2-1.fna.fbcdn.net&_nc_cat=104&_nc_oc=Q6cZ2QFS9DXpdcHuGyDOc2ik1FDkF9UhjEinB_awal3fdrQKqO-9xS-qI11ibdhsScYDGy8&_nc_ohc=qzxRGhtQifMQ7kNvwEaF65h&_nc_gid=pWkeD2tTAhCe_JL8AjHF5g&edm=APU89FABAAAA&ccb=7-5&oh=00_AfL2QFxIpIBv_08H4K_uBkvMJCCQjmj4KBQ_bb3afI2dUw&oe=683F15CB&_nc_sid=bc0c2c",
                "config_width": 750,
                "config_height": 934
              },
              {
                "src": "https://instagram.fqpa2-1.fna.fbcdn.net/v/t51.2885-15/501331505_18501285883018528_338344890616338567_n.jpg?stp=dst-jpg_e35_p1080x1080_tt6&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4xNDQweDE3OTUuc2RyLmY3NTc2MS5kZWZhdWx0X2ltYWdlIn0&_nc_ad=z-m&_nc_ht=instagram.fqpa2-1.fna.fbcdn.net&_nc_cat=104&_nc_oc=Q6cZ2QFS9DXpdcHuGyDOc2ik1FDkF9UhjEinB_awal3fdrQKqO-9xS-qI11ibdhsScYDGy8&_nc_ohc=qzxRGhtQifMQ7kNvwEaF65h&_nc_gid=pWkeD2tTAhCe_JL8AjHF5g&edm=APU89FABAAAA&ccb=7-5&oh=00_AfKGM6aX3BcFFpqLCTdbIZLVz-VoLns9aDZtViyxB9r9_w&oe=683F15CB&_nc_sid=bc0c2c",
                "config_width": 1080,
                "config_height": 1346
              }
            ],
            "is_video": false,
            "media_preview": "ACIqx4omxvHbBqT7RMPTj2X/AA9qtxSoAY+5wAO/fioHVVJyGAHX29KSZo0VZXaUl2xn2AH8qjSVo8hejdehz+dSuyEEKaieNkxuBGRkZ7j1pkCeYaKZiii7FYsliHJXqDx+B4qU3DyAhjwev4VW6E0hX0qLJmt2IRzU4CyKMk7hnPfjtVfipkQkZAz1702SM8setFP59BRRqGhK4bzDkYGfSnS7fmC56jHH501qQ9KUVezNJaNorfNnp+laEjBEUDBPJOPccfrVOlq2jJOwzLe9FOooEf/Z",
            "tracking_token": "eyJ2ZXJzaW9uIjo1LCJwYXlsb2FkIjp7ImlzX2FuYWx5dGljc190cmFja2VkIjp0cnVlLCJ1dWlkIjoiMzIyNDc0MzE4MmJlNDI2YjkyODU5ZDIxODYyNzc2YmYzNjQzMTY0MjA1MzQxMTQ3MTIzIn0sInNpZ25hdHVyZSI6IiJ9",
            "has_upcoming_event": false,
            "edge_media_to_tagged_user": {
              "edges": []
            },
            "accessibility_caption": null
          }
        }
      ]
    },
    "scrapedAt": "2025-05-30T07:17:43.493Z"
  },
  ...
]
```

### Notes

- The actor requires a valid Instagram user ID.
- Only public posts are accessible.

# Actor input Schema

## `id` (type: `string`):

Instagram user ID to fetch posts for.

## `maxResults` (type: `integer`):

Maximum number of posts to fetch.

## Actor input object example

```json
{
  "id": "18527",
  "maxResults": 12
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "id": "18527"
};

// Run the Actor and wait for it to finish
const run = await client.actor("powerai/instagram-user-posts-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "id": "18527" }

# Run the Actor and wait for it to finish
run = client.actor("powerai/instagram-user-posts-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "id": "18527"
}' |
apify call powerai/instagram-user-posts-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,powerai/instagram-user-posts-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/pxDWjAlrVtwfkKpdo/builds/yqcO1xEgFYx4jGQak/openapi.json
