# 🔥Instagram Profile Posts Scraper (`instagram-scraper/instagram-profile-posts-scraper`) Actor

Instagram Profile Post Scraper. Post data: hashtags, comment_count, like_count, view_count, shortcode and etc.
Scrape Instagram Posts with Ease and Speed

- **URL**: https://apify.com/instagram-scraper/instagram-profile-posts-scraper.md
- **Developed by:** [Instagram Scraper](https://apify.com/instagram-scraper) (community)
- **Categories:** Lead generation, Social media, Developer tools
- **Features:** Limited permissions
- **Stats:** 3,252 total users, 354 monthly users, 100.0% runs succeeded, 3 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $0.55 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Profile Posts Scraper

<img src="https://apify-stats.seadfeng-7bd.workers.dev/instagram-scraper/instagram-profile-posts-scraper" height="20" alt="Actor Stats">

### How to run it in the Apify Console

1. Open the Actor page and click **Try for free / Run**.
2. In **Input**, paste one or more Instagram profiles (usernames or profile URLs).
3. Set how many profile posts to scrape per profile (`postsPerProfile`).
4. After the run finishes, open the **Dataset** to view results and export to JSON / CSV / Excel.

### Input parameters

#### `instagramUsernames` (required)

Accepts either a plain username:

```text
username
```

Notes:

- Empty lines are ignored and inputs are de‑duplicated
- Invalid URLs are reported in logs (they do not automatically fail the whole run)

#### `postsPerProfile`

Maximum number of profile posts to scrape per profile.

- Minimum: `5`
- Default: `12`
- If a profile has fewer public posts (or Instagram limits access), the actual output will be lower
- Repeated posts are counted once per profile within a run, including posts repeated across pages. Pagination stops when a page contains no new posts or its cursor loops back to an earlier page.

#### `recent`

Only returns posts on or after an absolute date or within a relative time range,
such as `2026-10-01` or `2 weeks`. Items excluded by this filter incur the
`filtered-out` processing fee.

#### `onlyVideo`

Only returns videos when set to `true`. The default is `false`. Non-video items
excluded by this filter incur the `filtered-out` processing fee.

#### input json example

```json
{
  "instagramUsernames": ["youtube", "google"],
  "postsPerProfile": 10,
  "onlyVideo": false
}
```

### What you get

Each profile post is stored as one item in the Dataset.

That means:

- Most non-blacklisted Instagram fields are preserved as-is, including nested objects such as `user`, `image_versions2`, `carousel_media`, `location`, and other timeline metadata.
- A small set of fields is normalized for downstream stability.
- The same cleanup rules apply to top-level items and `carousel_media[*]`.

Key normalized fields:

| Field                  | Type                        | Description                                                                 |
| ---------------------- | --------------------------- | --------------------------------------------------------------------------- |
| `shortcode`            | `string` (optional)         | Normalized from `code`; `code` is removed from output.                      |
| `url`                  | `string \| null`            | Public Instagram media URL derived from `shortcode`.                        |
| `is_video`             | `boolean`                   | Media type flag derived from the timeline item.                             |
| `image`                | `string \| null`            | Cover image URL |
| `caption`              | `string`                    |  caption text (best effort; can be empty). |
| `taken_at`             | `string \| null`            | UTC ISO-8601 timestamp such as `2026-08-12T14:15:04Z`.                      |
| `taken_at_timestamp`   | `number \| null`            | Unix timestamp in seconds.                                                  |
| `hashtags`             | `string[]`                  | Extracted from caption text.                                                |
| `mentions`             | `string[]`                  | Extracted from caption text plus user tags.                                 |
| `tagged_user`          | `array<object>`             | Legacy-compatible tagged-user list derived from `usertags`.                 |
| `video_url`            | `string \| null`            | First `video_versions[*].url` when available.                               |
| `dimensions`           | `object \| null`            | Derived from `original_width` and `original_height` as `{width, height}`.   |
| `location`             | `object \| string \| null`  | Preserved from the timeline item, with nested blacklist cleanup applied.    |
| `carousel_media[*]`    | `array<object>` (optional)  | Child media items cleaned with the same normalization rules.                |

### Output (Dataset)

Results are stored in the default Dataset (`default`). Example item (fields may vary slightly depending on Instagram responses):

```json
{
  "id": "3962139457675353360_1067259270",
  "is_unseen_by_viewer": false,
  "lw_carousel_count": null,
  "lw_carousel": null,
  "content_views_count": null,
  "enable_waist": false,
  "image_versions2": {
    "additional_candidates": {
      "first_frame": {
        "height": 1136,
        "scans_profile": null,
        "url": "...",
        "width": 640
      },
      "igtv_first_frame": {
        "height": 1136,
        "scans_profile": null,
        "url": "...",
        "width": 640
      },
      "smart_frame": null
    },
    "candidates": [
      {
        "estimated_scans_sizes": [],
        "height": 960,
        "scans_profile": null,
        "url": "...",
        "width": 540
      } 
    ],
    "scrubber_spritesheet_info_candidates": {
      "default": {
        "file_size_kb": 569,
        "max_thumbnails_per_sprite": 105,
        "rendered_width": 96,
        "sprite_height": 1232,
        "sprite_width": 1500,
        "thumbnail_duration": 0.592047619047619,
        "thumbnail_height": 176,
        "thumbnail_width": 100,
        "thumbnails_per_row": 15,
        "total_thumbnail_num_per_sprite": 105,
        "video_length": 62.165
      }
    },
    "smart_thumbnail_enabled": null
  },
  "media_cropping_info": null,
  "media_type": 2,
  "original_height": 1280,
  "original_width": 720,
  "profile_grid_thumbnail_fitting_style": "UNSET",
  "product_type": "clips",
  "timeline_pinned_user_ids": [
    "1067259270"
  ],
  "open_carousel_submission_state": null,
  "all_previous_submitters": null,
  "user": {
    "id": "1067259270",
    "account_type": 2,
    "all_media_count": null,
    "allowed_commenter_type": null,
    "can_boost_post": null,
    "can_see_organic_insights": null,
    "fan_club_info": {
      "autosave_to_exclusive_highlight": null,
      "connected_member_count": null,
      "fan_club_id": null,
      "fan_club_name": null,
      "fan_consideration_page_revamp_eligiblity": null,
      "has_enough_subscribers_for_ssc": null,
      "is_fan_club_referral_eligible": null,
      "is_fan_club_gifting_eligible": null,
      "subscriber_count": null
    },
    "fbid_v2": "17841401778116675",
    "feed_post_reshare_disabled": false,
    "friendship_status": null,
    "full_name": "Google",
    "has_anonymous_profile_picture": false,
    "has_onboarded_to_text_post_app": null,
    "interop_messaging_user_fbid": "101735994563732",
    "is_active_on_text_post_app": true,
    "is_favorite": null,
    "is_private": false,
    "is_unpublished": false,
    "is_verified": true,
    "liked_clips_count": null,
    "profile_pic_id": "3872563248835985700_1067259270",
    "profile_pic_url": "...",
    "reel_auto_archive": null,
    "show_account_transparency_details": true,
    "show_insights_terms": null,
    "third_party_downloads_enabled": 2,
    "transparency_product_enabled": false,
    "username": "google",
    "user_activation_info": null
  },
  "taken_at": "2026-08-12T14:15:04Z",
  "linked_media_data": null,
  "is_eligible_for_shoppable_everything": null,
  "related_ads_pivots_media_info": "USER_NOT_IN_TEST_GROUP",
  "injected": null,
  "brs_severity": 80,
  "channel_tag_data": null,
  "organic_cta_type": null,
  "organic_cta_info": null,
  "story_prompts": null,
  "carousel_media_pending_post_count": null,
  "main_feed_carousel_starting_media_id": null,
  "tallest_media_aspect_ratio": null,
  "open_to_public_submission_description_text": null,
  "is_dismiss_pending_media_banner": null,
  "is_early_access_reel": false,
  "save_count": null,
  "gen_ai_detection_method": {
    "detection_method": "NONE"
  }, 
  "wearable_attribution_info": null,
  "accessibility_caption": null,
  "are_remixes_crosspostable": true,
  "crosspost": null,
  "crosspost_metadata": null,
  "cta_rendering_config": null,
  "attribution_content_url": null,
  "audience": null,
  "boost_unavailable_identifier": null,
  "boost_unavailable_reason": null,
  "boosted_post_id": null,
  "boosted_status": null,
  "has_non_bim_ads": false,
  "original_media_has_visual_reply_media": null,
  "like_and_view_counts_disabled": false,
  "share_count_disabled": false,
  "coauthor_producer_can_see_organic_insights": false,
  "coauthor_producers": [
    {
      "id": "4512854723",
      "full_name": "Made by Google",
      "is_private": false,
      "is_verified": true,
      "profile_pic_id": "3735536379162089827_4512854723",
      "profile_pic_url": "...",
      "username": "madebygoogle",
      "user_activation_info": null
    } 
  ],
  "invited_coauthor_producers": [],
  "caption": "Get your first look at the Pixel 11 family. Refined hardware, made to last. Fresh colors. New cameras. And designed for Gemini Intelligence. #MadeByGoogle",
  "caption_add_on": null,
  "caption_is_edited": false,
  "carousel_last_edited_at": null,
  "creator_viewer_insights": null,
  "community_notes_info": null,
  "can_modify_carousel": null,
  "can_viewer_save": true,
  "can_viewer_reshare": true,
  "eligible_insights_entrypoints": "NONE",
  "has_liked": false,
  "top_likers": null,
  "facepile_top_likers": null,
  "floating_context_items": null,
  "social_context": null,
  "is_comments_gif_composer_enabled": false,
  "is_photo_comments_composer_enabled_for_author": false,
  "is_currently_promoting_by_sponsor": null,
  "is_auto_created": null,
  "is_cutout_sticker_allowed": false,
  "is_eligible_for_media_note_recs_nux": null,
  "is_reuse_allowed": false,
  "is_post_live_clips_media": false,
  "is_quiet_post": false,
  "is_shared_from_basel": null,
  "media_attributions_data": [],
  "igbio_product": null,
  "location": null,
  "play_count": 679251,
  "like_count": 23368,
  "is_tagged_media_shared_to_viewer_profile_grid": false,
  "subscribe_cta_visible": false,
  "video_subtitles_locale": null,
  "translated_video_subtitles": null,
  "byoa_langs": null,
  "video_sticker_locales": [],
  "sticker_translations_enabled": null,
  "original_lang_for_translations": "en",
  "is_eligible_for_autodub": false,
  "is_eligible_for_autodub_upsell": false,
  "clips_captions": null,
  "snippets_overlays": null,
  "clips_captions_translations_urls": null,
  "clips_text": null,
  "should_request_ads": false,
  "is_paid_partnership": false,
  "sponsor_tags": null,
  "is_visual_reply_commenter_notice_enabled": true,
  "clips_tab_pinned_user_ids": [],
  "is_in_profile_grid": false,
  "profile_grid_control_enabled": false,
  "owner": {
    "id": "1067259270",
    "can_see_quiet_post_attribution": true,
    "fbid_v2": "17841401778116675",
    "feed_post_reshare_disabled": false,
    "friendship_status": null,
    "full_name": "Google",
    "has_anonymous_profile_picture": false,
    "is_favorite": null,
    "is_private": false,
    "is_unpublished": false,
    "is_verified": true,
    "profile_pic_id": "3872563248835985700_1067259270",
    "profile_pic_url": "...",
    "show_account_transparency_details": true,
    "transparency_product_enabled": false,
    "username": "google"
  },
  "fundraiser_tag": null,
  "comment_likes_enabled": true,
  "comments_disabled": null,
  "comment_threading_enabled": true,
  "clips_metadata": {
    "originality_info": null,
    "achievements_info": {
      "num_earned_achievements": null,
      "show_achievements": false
    },
    "additional_audio_info": {
      "additional_audio_username": null,
      "audio_reattribution_info": {
        "should_allow_restore": false
      }
    },
    "asset_recommendation_info": null,
    "audio_ranking_info": {
      "best_audio_cluster_id": null
    },
    "audio_type": "original_sounds",
    "branded_content_tag_info": {
      "can_add_tag": false
    },
    "clips_creation_entry_point": "feed",
    "content_appreciation_info": {
      "enabled": false,
      "entry_point_container": null
    },
    "contextual_highlight_info": null,
    "disable_use_in_clips_client_cache": false,
    "is_fan_club_promo_video": null,
    "is_public_chat_welcome_video": false,
    "is_shared_to_fb": false,
    "mashup_info": {
      "can_toggle_mashups_allowed": false,
      "has_been_mashed_up": false,
      "has_nonmimicable_additional_audio": false,
      "is_creator_requesting_mashup": false,
      "is_light_weight_check": true,
      "is_pivot_page_available": false,
      "mashup_type": null,
      "mashups_allowed": false,
      "non_privacy_filtered_mashups_media_count": 0,
      "original_media": null
    },
    "merchandising_pill_info": null,
    "music_canonical_id": "18613498354010879",
    "music_info": null,
    "original_sound_info": {
      "allow_creator_to_rename": true,
      "audio_asset_id": "37652862487694766",
      "audio_filter_infos": [],
      "audio_parts": [],
      "audio_parts_by_filter": [],
      "can_remix_be_shared_to_fb": false,
      "can_remix_be_shared_to_fb_expansion": false,
      "consumption_info": {
        "is_bookmarked": false,
        "is_trending_in_clips": false,
        "should_mute_audio_reason": ""
      },
      "dash_manifest": "...",
      "duration_in_ms": 62000,
      "hide_remixing": true,
      "ig_artist": {
        "id": "1067259270",
        "full_name": "Google",
        "is_private": false,
        "is_verified": true,
        "profile_pic_id": "3872563248835985700_1067259270",
        "profile_pic_url": "..",
        "username": "google"
      },
      "is_audio_automatically_attributed": false,
      "is_eligible_for_audio_effects": true,
      "is_explicit": false,
      "is_original_audio_download_eligible": false,
      "oa_owner_is_music_artist": false,
      "is_reuse_disabled": false,
      "is_xpost_from_fb": false,
      "original_audio_subtype": "default",
      "original_audio_title": "Original audio",
      "original_media_id": "3962139457675353360",
      "progressive_download_url": "..",
      "should_mute_audio": false,
      "time_created": 1786544042,
      "fb_downstream_use_xpost_metadata": {
        "downstream_use_xpost_deny_reason": "NONE"
      }
    },
    "professional_clips_upsell_type": 0,
    "show_achievements": false
  },
  "creative_config": null,
  "max_num_visible_preview_comments": 2,
  "has_more_comments": true,
  "has_tagged_users": true,
  "fb_user_tags": {
    "in": []
  },
  "has_reshares": null,
  "preview": null,
  "product_collection_tag": null,
  "product_suggestions": null,
  "product_tags": null,
  "photo_of_you": false,
  "is_organic_product_tagging_eligible": false,
  "media_notice": null,
  "media_overlay_info": null,
  "boost_upsell_banner_payload": null,
  "is_fb_only": null,
  "is_artist_pick": null,
  "can_see_insights_as_brand": false,
  "comment_count": 554,
  "comment_inform_treatment": {
    "action_type": null,
    "should_have_inform_treatment": false,
    "text": "",
    "url": null
  },
  "can_view_more_preview_comments": false,
  "hide_view_all_comment_entrypoint": false,
  "inline_composer_display_condition": null,
  "inline_composer_imp_trigger_time": null,
  "is_third_party_downloads_eligible": false,
  "ig_media_sharing_disabled": false,
  "has_viewer_saved": null,
  "carousel_media_count": null,
  "carousel_media": null,
  "number_of_qualities": 2,
  "is_dash_eligible": 1,
  "upcoming_event": null,
  "video_codec": null,
  "video_versions": [
    {
      "url": "...",
      "type": 101,
      "width": 720,
      "height": 1280
    },
    {
      "url": "...",
      "type": 102,
      "width": 720,
      "height": 1280
    },
    {
      "url": "...",
      "type": 103,
      "width": 720,
      "height": 1280
    }
  ],
  "video_duration": 62.16600036621094,
  "video_subtitles_confidence": null,
  "video_subtitles_enabled": null,
  "video_subtitles_status": null,
  "video_subtitles_uri": null,
  "visibility": null,
  "visual_comment_reply_sticker_info": null,
  "visual_replies_info": null,
  "xpost_deny_reason": null,
  "xpost_deny_reason_enum": null,
  "threads_xpost_deny_reason": null,
  "has_audio": true,
  "has_delayed_metadata": false,
  "has_hidden_comments": null,
  "reshare_count": null,
  "is_reshare_of_text_post_app_media_in_ig": false,
  "is_post_live": null,
  "deleted_reason": 0,
  "has_shared_to_fb": 0,
  "dominant_color": null,
  "music_metadata": null,
  "fb_comment_count": null,
  "fb_like_count": null,
  "fb_play_count": null,
  "ig_play_count": 679251,
  "autodub_status": null,
  "snippets_attribution_info": null,
  "mashup_info": null,
  "enable_media_notes_production": false,
  "media_repost_count": null,
  "media_reposter_bottomsheet_enabled": false,
  "media_notes": null,
  "creator_product_links": null,
  "creator_product_link_infos": null,
  "voice_translations_consumption_data": null,
  "clips_attribution_info": null,
  "mv_link": null,
  "shimmed_mv_link": null,
  "shortcode": "Db8WNgtTF0Q",
  "taken_at_timestamp": 1786544104,
  "tagged_user": [
    {
      "id": "4512854723",
      "pk": "4512854723",
      "username": "madebygoogle",
      "full_name": "Made by Google",
      "is_private": false,
      "profile_pic_id": "3735536379162089827_4512854723",
      "profile_pic_url": "...",
      "is_verified": true
    },
    {
      "id": "8482988871",
      "pk": "8482988871",
      "username": "googlepixel",
      "full_name": "Google Pixel",
      "is_private": false,
      "profile_pic_id": "3962451059109278847_8482988871",
      "profile_pic_url": "...",
      "is_verified": true
    },
    {
      "id": "72777479369",
      "pk": "72777479369",
      "username": "newsfromgoogle",
      "full_name": "News from Google",
      "is_private": false,
      "profile_pic_id": "3734762180941152713_72777479369",
      "profile_pic_url": "...",
      "is_verified": true
    }
  ],
  "hashtags": [
    "#MadeByGoogle"
  ],
  "mentions": [
    "@madebygoogle",
    "@googlepixel",
    "@newsfromgoogle"
  ],
  "video_url": "...",
  "dimensions": {
    "width": 720,
    "height": 1280
  },
  "crawled_at": "2026-08-18T07:20:07.822974Z"
}
```

### FAQ

#### 1) Why is the Dataset empty / much smaller than expected?

The profile has no public posts, not enough posts, or Instagram is limiting access

#### 2) What does `Restricted profile` mean?

A profile can be public but still limited for anonymous (no-login) access.
Instagram may gate some profile endpoints unless a logged-in session is used.
When this happens, the Actor logs the restriction and skips/stops that profile.

#### 3) How does billing work for unavailable profiles?

The Actor uses one unified charge event: `restricted_profile`.
This event is emitted when a profile cannot return posts due to:

- restricted/no-login access limits,
- profile not found (dead link / non-existent profile),
- no posts found for that profile.

### Limitations & recommendations

- **Data scope**: this Actor is optimized for Reel/post-level data from profile pages. It is not a full profile-metadata scraper.
- **No-login access limits**: this Actor runs without an Instagram login by default. Some profile-level fields or endpoints may be unavailable in no-login mode, even for public profiles.
- **Compliance**: make sure your usage complies with Instagram’s terms and your local laws, and only collect data you have the right to use.

### Need other Instagram data?

This actor is optimized for **profile post feeds**. If you need a different
Instagram surface, use the dedicated Actor that matches that data type.

Related actors from the
[instagram-scraper](https://apify.com/instagram-scraper):

<table width="100%">
  <colgroup>
    <col width="28%">
    <col width="48%">
    <col width="24%">
  </colgroup>
  <thead>
    <tr>
      <th align="left">Actor</th>
      <th align="left">Description</th>
      <th align="left">Stats</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a href="https://apify.com/instagram-scraper/instagram-profile-scraper">Instagram Profile Scraper</a></td>
      <td>Scrape public Instagram profile data, profile statistics, and account flags</td>
      <td><img src="https://apify-stats.seadfeng-7bd.workers.dev/instagram-scraper/instagram-profile-scraper" height="20" alt="Instagram Profile Scraper Actor Stats"></td>
    </tr>
    <tr>
      <td><a href="https://apify.com/instagram-scraper/instagram-profile-finder">Instagram Profile Finder</a></td>
      <td>Find Instagram profiles</td>
      <td><img src="https://apify-stats.seadfeng-7bd.workers.dev/instagram-scraper/instagram-profile-finder" height="20" alt="Instagram Profile Finder Actor Stats"></td>
    </tr>
    <tr>
      <td><a href="https://apify.com/instagram-scraper/fast-instagram-post-scraper">Fast Instagram Profile Posts Scraper</a></td>
      <td>Fast scraper for public Instagram profile posts with a simpler post payload</td>
      <td><img src="https://apify-stats.seadfeng-7bd.workers.dev/instagram-scraper/fast-instagram-post-scraper" height="20" alt="Fast Instagram Profile Posts Scraper Actor Stats"></td>
    </tr>
    <tr>
      <td><a href="https://apify.com/instagram-scraper/instagram-profile-reels-scraper">Fast Instagram Profile Reels Scraper</a></td>
      <td>Scrape public Instagram Reels from profile pages</td>
      <td><img src="https://apify-stats.seadfeng-7bd.workers.dev/instagram-scraper/instagram-profile-reels-scraper" height="20" alt="Fast Instagram Profile Reels Scraper Actor Stats"></td>
    </tr>
    <tr>
      <td><a href="https://apify.com/instagram-scraper/instagram-posts-reels-scraper">Instagram Posts and Reels Scraper</a></td>
      <td>Scrape public Instagram posts and Reels</td>
      <td><img src="https://apify-stats.seadfeng-7bd.workers.dev/instagram-scraper/instagram-posts-reels-scraper" height="20" alt="Instagram Posts and Reels Scraper Actor Stats"></td>
    </tr>
    <tr>
      <td><a href="https://apify.com/instagram-scraper/instagram-hashtags-scraper">Instagram Hashtags Posts Scraper</a></td>
      <td>Scrape public Instagram hashtag pages</td>
      <td><img src="https://apify-stats.seadfeng-7bd.workers.dev/instagram-scraper/instagram-hashtags-scraper" height="20" alt="Instagram Hashtags Posts Scraper Actor Stats"></td>
    </tr>
    <tr>
      <td><a href="https://apify.com/instagram-scraper/instagram-related-profiles">Instagram Related Profiles Scraper</a></td>
      <td>Discover related accounts and recursively expand profile networks</td>
      <td><img src="https://apify-stats.seadfeng-7bd.workers.dev/instagram-scraper/instagram-related-profiles" height="20" alt="Instagram Related Profiles Scraper Actor Stats"></td>
    </tr>
  </tbody>
</table>

# Changelog

This Actor's version history is a separate document: https://apify.com/instagram-scraper/instagram-profile-posts-scraper/changelog.md

# Actor input Schema

## `instagramUsernames` (type: `array`):

Insert Instagram usernames of any profile you want to get posts from.

## `postsPerProfile` (type: `integer`):

Hard limit for how many profile posts to output per profile.

## `recent` (type: `string`):

Recent posts. Items filtered out by this date will incur a processing fee.

## `onlyVideo` (type: `boolean`):

Only return videos. Non-video items filtered out by this option will incur a processing fee.

## Actor input object example

```json
{
  "instagramUsernames": [
    "google"
  ],
  "postsPerProfile": 12,
  "onlyVideo": false
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# 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 = {
    "instagramUsernames": [
        "google"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("instagram-scraper/instagram-profile-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 = { "instagramUsernames": ["google"] }

# Run the Actor and wait for it to finish
run = client.actor("instagram-scraper/instagram-profile-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 '{
  "instagramUsernames": [
    "google"
  ]
}' |
apify call instagram-scraper/instagram-profile-posts-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,instagram-scraper/instagram-profile-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/pmQcv69sB1UwguQUY/builds/iz1YRLNXIJo1J8ieE/openapi.json
