# Crawlnest Instagram Posts (`complimentary_rho/crawlnest-instagram-posts`) Actor

Run a packaged Scrapy spider and export complete records to an Apify dataset.

- **URL**: https://apify.com/complimentary_rho/crawlnest-instagram-posts.md
- **Developed by:** [samir pathak](https://apify.com/complimentary_rho) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.95 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## CrawlNest Instagram Posts

Collect public Instagram posts for a username and export the records as JSON or CSV from the run's dataset.

### Input

```json
{
  "params": {"username": "m.olise"},
  "maxItems": 12,
  "timeoutSeconds": 120,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

- `params.username`: Instagram username without `@` or a profile URL.
- `maxItems`: Maximum number of records saved. Defaults to 12; 0 removes the output cap.
- `timeoutSeconds`: Run timeout in seconds, from 30 to 86400. The input form defaults to 120 for a small test run; increase it deliberately for larger collections.
- `proxyConfiguration`: The input form defaults to Apify residential proxies. These were needed for the successful cloud test; they do not guarantee access on every run. Residential proxy access and traffic charges depend on your account.

### Output

Failure screenshots are disabled by default. Set `saveDebugScreenshots` to true only for troubleshooting; small navigation and failure metadata records are still saved. The Actor defaults to 1024 MB memory. Existing task/run options can retain an older setting; increase memory if a run exhausts it.

Each dataset row is one post. The crawler preserves the fields returned by Instagram. Depending on the response, these can include `pk`, `id`, `code`, `caption`, `display_uri`, `media_type`, `product_type`, `user`, accessibility text and carousel information. Fields can vary or be absent; media URLs can expire.

Open the run's dataset to inspect records or export JSON or CSV. `RUN_SUMMARY` in the default key-value store contains record counts and the finish reason.

### Example output

The following sample is an actual dataset export. Each array element is one post; its original fields and values are preserved. Fields vary between posts, captions can be null, and temporary Instagram media URLs may expire.

```json
[
  {
    "__typename": "XIGPolarisCarouselMedia",
    "__isXIGPolarisMedia": "XIGPolarisCarouselMedia",
    "pk": "4002161414801336432",
    "code": "DeKiJo3Aihw",
    "accessibility_caption": "Photo by MichaelOlise on October 06, 2026. May be an image of text.",
    "caption": null,
    "seo_canonical_url": null,
    "display_uri": "https://scontent.cdninstagram.com/v/t51.82787-15/837225034_18630510400057038_1697971500706607102_n.jpg?stp=dst-jpg_e35_s640x640_tt6&_nc_cat=1&ccb=7-5&_nc_sid=18de74&efg=eyJlZmdfdGFnIjoiQ0FST1VTRUxfSVRFTS5iZXN0X2ltYWdlX3VybGdlbi5DMyJ9&_nc_ohc=MJCxHlsFy3kQ7kNvwEEdIbL&_nc_oc=AdoFnrs_cfGvzkMYaewQ1LjxwuYplacC3J5OqY2_t95PVpLretOYJl7jDgbr25vM9LKAlcllcKrbF7RdK2bcDNIY&_nc_zt=23&_nc_ht=scontent.cdninstagram.com&_nc_gid=JVQRsoRAEA6ckjpBH3MIPQ&_nc_ss=7f689&oh=00_AQMf4cobQg5Jc6d6t2-4yEt14dlF5DTMQxRRRSA-C6ycaA&oe=6AD25404",
    "media_type": 8,
    "product_type": "carousel_container",
    "user": {
      "pk": "641785037",
      "username": "m.olise",
      "id": "17841401711120027"
    },
    "carousel_media_count": 6,
    "id": "POLARIS_4002161414801336432"
  },
  {
    "__typename": "XIGPolarisCarouselMedia",
    "__isXIGPolarisMedia": "XIGPolarisCarouselMedia",
    "pk": "3989703492976701835",
    "code": "DdeRjBCAvGL",
    "accessibility_caption": "Photo by MichaelOlise on September 19, 2026. May be an image of text.",
    "caption": null,
    "seo_canonical_url": null,
    "display_uri": "https://scontent.cdninstagram.com/v/t51.82787-15/808414780_18624652618057038_6145592245213913553_n.jpg?stp=dst-jpg_e35_s640x640_tt6&_nc_cat=106&ccb=7-5&_nc_sid=18de74&efg=eyJlZmdfdGFnIjoiQ0FST1VTRUxfSVRFTS5iZXN0X2ltYWdlX3VybGdlbi5DMyJ9&_nc_ohc=KzTKcW0AjN4Q7kNvwHNtCAU&_nc_oc=AdrdYvlw9j8f2hDr0mn3yKM9eZS0YAHsXX4ShVjj1O19gFhI-ItvzivV7iTgrEmPn9P7BYWYz9wV0lygrhNMyIzU&_nc_zt=23&_nc_ht=scontent.cdninstagram.com&_nc_gid=JVQRsoRAEA6ckjpBH3MIPQ&_nc_ss=7f689&oh=00_AQOu8NFrlodbxy3rCf3gN2gnb3uNBQyjSf45Q5PWLx2mNw&oe=6AD26110",
    "media_type": 8,
    "product_type": "carousel_container",
    "user": {
      "pk": "641785037",
      "username": "m.olise",
      "id": "17841401711120027"
    },
    "carousel_media_count": 7,
    "id": "POLARIS_3989703492976701835"
  },
  {
    "__typename": "XIGPolarisVideoMedia",
    "__isXIGPolarisMedia": "XIGPolarisVideoMedia",
    "pk": "3967122750946613219",
    "code": "DcODR-Oixfj",
    "accessibility_caption": "Video by MichaelOlise on August 19, 2026. May be a cartoon of bear, toy and text.",
    "caption": null,
    "seo_canonical_url": null,
    "display_uri": "https://scontent.cdninstagram.com/v/t51.71878-15/775213700_1723436438948844_2239339472716659451_n.jpg?stp=dst-jpg_e35_s640x640_tt6&_nc_cat=110&ccb=7-5&_nc_sid=18de74&efg=eyJlZmdfdGFnIjoiQ0xJUFMuYmVzdF9pbWFnZV91cmxnZW4uQzMifQ%3D%3D&_nc_ohc=wM_WaZdSliUQ7kNvwHkKf5y&_nc_oc=Adr0GmrblLQs2Uiole0dl08oMljIUFXtcUeTH6MsJJ62FfeKrh15WXzAYCQmvm2uRttWyk1EyCYUyJ8CoWDbgzau&_nc_zt=23&_nc_ht=scontent.cdninstagram.com&_nc_gid=JVQRsoRAEA6ckjpBH3MIPQ&_nc_ss=7f689&oh=00_AQPRKP3aesbUI3RQ52Of7U9geYK1wuxXjUxijpXhomqgCg&oe=6AD2566F",
    "media_type": 2,
    "product_type": "clips",
    "user": {
      "pk": "641785037",
      "username": "m.olise",
      "id": "17841401711120027"
    },
    "id": "POLARIS_3967122750946613219"
  },
  {
    "__typename": "XIGPolarisCarouselMedia",
    "__isXIGPolarisMedia": "XIGPolarisCarouselMedia",
    "pk": "3952223061511698441",
    "code": "DbZHe9GgvgJ",
    "accessibility_caption": "Photo by MichaelOlise on July 29, 2026.",
    "caption": {
      "text": "Ne pas avoir réussi à ramener le trophée est une immense déception. Ce n’est pas ainsi que nous imaginions conclure cette Coupe du monde lorsque le tournoi a commencé.\n\nPorter le maillot de l’équipe de France lors d’une Coupe du monde a toujours été, et restera toujours, un rêve pour moi. Même si nous n’avons pas réussi à soulever le trophée, je suis fier d’avoir établi le record du plus grand nombre de passes décisives dans l’histoire d’une Coupe du monde. Mais, par-dessus tout, j’aurais préféré être ici pour dire que nous avons remporté la Coupe du monde, tous ensemble, avec mes coéquipiers, le staff, les entraîneurs et tous les supporters de l’équipe de France.\n\nC’est cet objectif qui continuera de nous animer, et nous espérons pouvoir, à l’avenir, vous offrir de nouveaux moments de joie et des souvenirs inoubliables à vivre à nos côtés.\n\nJe tiens également à remercier le sélectionneur de m’avoir offert ma première sélection en équipe nationale et d’avoir cru en moi, même dans les moments les plus difficiles. Je vous en serai toujours reconnaissant et je vous souhaite le meilleur pour la suite, quelle que soit la voie que vous choisirez.\n\nMerci, la France"
    },
    "seo_canonical_url": null,
    "display_uri": "https://scontent.cdninstagram.com/v/t51.82787-15/757798122_18606940417057038_6806084922448036638_n.jpg?stp=dst-jpg_e35_s640x640_tt6&_nc_cat=108&ccb=7-5&_nc_sid=18de74&efg=eyJlZmdfdGFnIjoiQ0FST1VTRUxfSVRFTS5iZXN0X2ltYWdlX3VybGdlbi5DMyJ9&_nc_ohc=vD6UBXdufz4Q7kNvwH_-MxL&_nc_oc=Adqq1PDPkRhU3wG9Iksnh3rnlFqIYJ5xRflbeWCjkqPcr_EkwvGCVbxewNSWgUNVU9D-teBmFFOtQE8RAym3K_Ke&_nc_zt=23&_nc_ht=scontent.cdninstagram.com&_nc_gid=JVQRsoRAEA6ckjpBH3MIPQ&_nc_ss=7f689&oh=00_AQN61xgEuw7gw4FEEPw1ROG8ndSx6wFerBkVsC14HAWbQg&oe=6AD25101",
    "media_type": 8,
    "product_type": "carousel_container",
    "user": {
      "pk": "641785037",
      "username": "m.olise",
      "id": "17841401711120027"
    },
    "carousel_media_count": 2,
    "id": "POLARIS_3952223061511698441"
  },
  {
    "__typename": "XIGPolarisCarouselMedia",
    "__isXIGPolarisMedia": "XIGPolarisCarouselMedia",
    "pk": "3938290283930588205",
    "code": "DanniW0DhQt",
    "accessibility_caption": "Photo by MichaelOlise on July 10, 2026.",
    "caption": null,
    "seo_canonical_url": null,
    "display_uri": "https://scontent.cdninstagram.com/v/t51.82787-15/742130632_18600980527057038_7112824008568747250_n.jpg?stp=dst-jpg_e35_s640x640_tt6&_nc_cat=107&ccb=7-5&_nc_sid=18de74&efg=eyJlZmdfdGFnIjoiQ0FST1VTRUxfSVRFTS5iZXN0X2ltYWdlX3VybGdlbi5DMyJ9&_nc_ohc=_Ccbezumvr4Q7kNvwGoFEHw&_nc_oc=Adqg7ScdHcSHre9Sa77NKjWBrs1YHL8FRsCZKxo6s6nBazr9603W7uflHsZ7CA0mvEJ3k71GJzi0URXxJzwP8rRF&_nc_zt=23&_nc_ht=scontent.cdninstagram.com&_nc_gid=JVQRsoRAEA6ckjpBH3MIPQ&_nc_ss=7f689&oh=00_AQM91ygbIvdU6DrmBIvIqO1ssFeSYvqNYAiJWMiVu3HPBw&oe=6AD25978",
    "media_type": 8,
    "product_type": "carousel_container",
    "user": {
      "pk": "641785037",
      "username": "m.olise",
      "id": "17841401711120027"
    },
    "carousel_media_count": 8,
    "id": "POLARIS_3938290283930588205"
  },
  {
    "__typename": "XIGPolarisCarouselMedia",
    "__isXIGPolarisMedia": "XIGPolarisCarouselMedia",
    "pk": "3934619415454343162",
    "code": "Daak4MIgt_6",
    "accessibility_caption": "Photo by MichaelOlise on July 05, 2026.",
    "caption": null,
    "seo_canonical_url": null,
    "display_uri": "https://scontent.cdninstagram.com/v/t51.82787-15/733095575_18599493259057038_1817264230277523498_n.jpg?stp=dst-jpg_e35_s640x640_tt6&_nc_cat=103&ccb=7-5&_nc_sid=18de74&efg=eyJlZmdfdGFnIjoiQ0FST1VTRUxfSVRFTS5iZXN0X2ltYWdlX3VybGdlbi5DMyJ9&_nc_ohc=_U2QvCBsGwQQ7kNvwGsW892&_nc_oc=AdqLl12c-MUoillY5rcgWdp5RATgpikCU4Gv2ViFHJe0eJlU0qi_UEY8ATtSEgG-UCgcn1bSJAkL59VTxytudIft&_nc_zt=23&_nc_ht=scontent.cdninstagram.com&_nc_gid=JVQRsoRAEA6ckjpBH3MIPQ&_nc_ss=7f689&oh=00_AQPmkRiSUa_bvZgfrt6vfiNeSzDEoSizQhHIkZ346jVOJQ&oe=6AD27833",
    "media_type": 8,
    "product_type": "carousel_container",
    "user": {
      "pk": "641785037",
      "username": "m.olise",
      "id": "17841401711120027"
    },
    "carousel_media_count": 7,
    "id": "POLARIS_3934619415454343162"
  },
  {
    "__typename": "XIGPolarisCarouselMedia",
    "__isXIGPolarisMedia": "XIGPolarisCarouselMedia",
    "pk": "3931715302366130562",
    "code": "DaQQjyDgDGC",
    "accessibility_caption": "Photo by MichaelOlise on July 01, 2026.",
    "caption": null,
    "seo_canonical_url": null,
    "display_uri": "https://scontent.cdninstagram.com/v/t51.82787-15/731580317_18598294015057038_1566746199046999465_n.jpg?stp=dst-jpg_e35_s640x640_tt6&_nc_cat=100&ccb=7-5&_nc_sid=18de74&efg=eyJlZmdfdGFnIjoiQ0FST1VTRUxfSVRFTS5iZXN0X2ltYWdlX3VybGdlbi5DMyJ9&_nc_ohc=5TB-AIcx1m4Q7kNvwG6s7tu&_nc_oc=AdoNCZgVKl4itZFX-Sdd82MCnuZPjhPcxIATpA0wbskPJrdk2aYgFI08zxgUuowabojqJmoMX7UkW8Pp1dpm3nzh&_nc_zt=23&_nc_ht=scontent.cdninstagram.com&_nc_gid=JVQRsoRAEA6ckjpBH3MIPQ&_nc_ss=7f689&oh=00_AQOGTVbU1i11MiaWb7h8nfN9eionh7xk_X9AR2vx13DTlQ&oe=6AD25C9A",
    "media_type": 8,
    "product_type": "carousel_container",
    "user": {
      "pk": "641785037",
      "username": "m.olise",
      "id": "17841401711120027"
    },
    "carousel_media_count": 9,
    "id": "POLARIS_3931715302366130562"
  },
  {
    "__typename": "XIGPolarisCarouselMedia",
    "__isXIGPolarisMedia": "XIGPolarisCarouselMedia",
    "pk": "3928883123042943398",
    "code": "DaGMmJhAIGm",
    "accessibility_caption": "Photo by MichaelOlise on June 27, 2026.",
    "caption": null,
    "seo_canonical_url": null,
    "display_uri": "https://scontent.cdninstagram.com/v/t51.82787-15/730891074_18596978692057038_1262247405557155644_n.jpg?stp=dst-jpg_e35_s640x640_tt6&_nc_cat=104&ccb=7-5&_nc_sid=18de74&efg=eyJlZmdfdGFnIjoiQ0FST1VTRUxfSVRFTS5iZXN0X2ltYWdlX3VybGdlbi5DMyJ9&_nc_ohc=DyiyWHq7vZIQ7kNvwHISdbP&_nc_oc=AdqQQa-GZ5xXF5fMnhhPUyT9vUlYbzw4SHbFlUukLMRZBQlJIKKzz-UGZplnfQ55mM4EhaRGIw79Azof2pGbr7VN&_nc_zt=23&_nc_ht=scontent.cdninstagram.com&_nc_gid=JVQRsoRAEA6ckjpBH3MIPQ&_nc_ss=7f689&oh=00_AQNAqL_wIwGRGlkALaje6BzHSdIjjAh7sV_IPr0agLuyJA&oe=6AD259C6",
    "media_type": 8,
    "product_type": "carousel_container",
    "user": {
      "pk": "641785037",
      "username": "m.olise",
      "id": "17841401711120027"
    },
    "carousel_media_count": 7,
    "id": "POLARIS_3928883123042943398"
  },
  {
    "__typename": "XIGPolarisCarouselMedia",
    "__isXIGPolarisMedia": "XIGPolarisCarouselMedia",
    "pk": "3925953300784007736",
    "code": "DZ7ybn6AMo4",
    "accessibility_caption": "Photo by MichaelOlise on June 23, 2026.",
    "caption": null,
    "seo_canonical_url": null,
    "display_uri": "https://scontent.cdninstagram.com/v/t51.82787-15/729669918_18595683700057038_1892802150137276364_n.jpg?stp=dst-jpg_e35_s640x640_tt6&_nc_cat=104&ccb=7-5&_nc_sid=18de74&efg=eyJlZmdfdGFnIjoiQ0FST1VTRUxfSVRFTS5iZXN0X2ltYWdlX3VybGdlbi5DMyJ9&_nc_ohc=NfWVG8Jca6QQ7kNvwGkXMKa&_nc_oc=Adr6Lw8-_sT7PykGAJe6lNrz3eeF2LOecpgu1P9s1ygf2a8gqyRHKcQjhO0kwLdxu6ujdsmtJW2xCYVtY66MmOWk&_nc_zt=23&_nc_ht=scontent.cdninstagram.com&_nc_gid=JVQRsoRAEA6ckjpBH3MIPQ&_nc_ss=7f689&oh=00_AQNNmovWAcj-RzylNr0EGnFgGV8eXZhcwkSZau70q8Eesg&oe=6AD25CB9",
    "media_type": 8,
    "product_type": "carousel_container",
    "user": {
      "pk": "641785037",
      "username": "m.olise",
      "id": "17841401711120027"
    },
    "carousel_media_count": 8,
    "id": "POLARIS_3925953300784007736"
  },
  {
    "__typename": "XIGPolarisCarouselMedia",
    "__isXIGPolarisMedia": "XIGPolarisCarouselMedia",
    "pk": "3921569800580556806",
    "code": "DZsNvTNgOgG",
    "accessibility_caption": "Photo by MichaelOlise on June 17, 2026.",
    "caption": null,
    "seo_canonical_url": null,
    "display_uri": "https://scontent.cdninstagram.com/v/t51.82787-15/726606391_18593744197057038_1316802190344944015_n.jpg?stp=dst-jpg_e35_s640x640_tt6&_nc_cat=104&ccb=7-5&_nc_sid=18de74&efg=eyJlZmdfdGFnIjoiQ0FST1VTRUxfSVRFTS5iZXN0X2ltYWdlX3VybGdlbi5DMyJ9&_nc_ohc=97ocSifIS2AQ7kNvwFIxYIo&_nc_oc=Adpj5KdkuFKk0rIE-rzyIsMy4kvDbLszsgiZusHxjqcYUPsSnOo_1UULl3VuRsDT2Yyg9DqxnpGv6pfLxBlWJ8bx&_nc_zt=23&_nc_ht=scontent.cdninstagram.com&_nc_gid=JVQRsoRAEA6ckjpBH3MIPQ&_nc_ss=7f689&oh=00_AQMrz2nDXAYVta_7T9Y-laFweK2_PYomH2P8lelsDfSRdQ&oe=6AD25728",
    "media_type": 8,
    "product_type": "carousel_container",
    "user": {
      "pk": "641785037",
      "username": "m.olise",
      "id": "17841401711120027"
    },
    "carousel_media_count": 8,
    "id": "POLARIS_3921569800580556806"
  },
  {
    "__typename": "XIGPolarisCarouselMedia",
    "__isXIGPolarisMedia": "XIGPolarisCarouselMedia",
    "pk": "3895338753656362129",
    "code": "DYPBfVDgBSR",
    "accessibility_caption": "Photo by MichaelOlise on May 12, 2026.",
    "caption": null,
    "seo_canonical_url": null,
    "display_uri": "https://scontent.cdninstagram.com/v/t51.82787-15/695182588_18583262530057038_2288127105715643723_n.jpg?stp=dst-jpg_e35_s640x640_tt6&_nc_cat=106&ccb=7-5&_nc_sid=18de74&efg=eyJlZmdfdGFnIjoiQ0FST1VTRUxfSVRFTS5iZXN0X2ltYWdlX3VybGdlbi5DMyJ9&_nc_ohc=i8G_dgR9uY0Q7kNvwFzwjh3&_nc_oc=AdqaCn1F4Q_17z5ikPt2F3H6PteteWsUrRf2jXmu-hpoQAyauxMvshzN9OhBz51bDlHySIluhKS9clzMnqdoKVQR&_nc_zt=23&_nc_ht=scontent.cdninstagram.com&_nc_gid=JVQRsoRAEA6ckjpBH3MIPQ&_nc_ss=7f689&oh=00_AQPvPf6Pzx1TO0Y24PlLZdRL3-CXUAT0mfYBU9yiEzqLnw&oe=6AD26339",
    "media_type": 8,
    "product_type": "carousel_container",
    "user": {
      "pk": "641785037",
      "username": "m.olise",
      "id": "17841401711120027"
    },
    "carousel_media_count": 4,
    "id": "POLARIS_3895338753656362129"
  }
]
```

### Limits and troubleshooting

Only publicly accessible content is supported. Private accounts, login requirements, request restrictions and changes to Instagram can prevent collection or return fewer records than requested. A zero record cap does not guarantee all posts: source pagination and the run timeout still apply.

Playwright requests are queued in memory. Interrupted runs cannot resume their pending browser requests; records already saved remain in the dataset. If a run fails, inspect its logs and `RUN_SUMMARY` before retrying.

### Pricing

See this Actor's Pricing tab for the current event prices and any additional charges. This README does not override the published pricing.

# Actor input Schema

## `saveDebugScreenshots` (type: `boolean`):

Opt in to failure screenshots. Basic navigation and failure metadata remain available.

## `params` (type: `object`):

Keyword arguments passed to the packaged spider constructor.

## `maxItems` (type: `integer`):

0 disables the record-count cap. Runtime and Apify spending limits still apply.

## `timeoutSeconds` (type: `integer`):

Stop crawling after this many seconds; the platform run timeout can stop it sooner.

## `proxyConfiguration` (type: `object`):

Optional Apify proxy or your own proxy URLs. Proxy use may incur extra charges.

## Actor input object example

```json
{
  "saveDebugScreenshots": false,
  "params": {
    "username": "m.olise"
  },
  "maxItems": 12,
  "timeoutSeconds": 120,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `results` (type: `string`):

Complete records returned by the crawler, stored in the default dataset.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("complimentary_rho/crawlnest-instagram-posts").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("complimentary_rho/crawlnest-instagram-posts").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 '{}' |
apify call complimentary_rho/crawlnest-instagram-posts --silent --output-dataset

```

## MCP server setup

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

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/4imDnng8PMYsOxamM/builds/idc1PpehargcgWFlM/openapi.json
