# ✅ Instagram User Reposts Scraper (`datamagnet/instagram-user-reposts-scraper`) Actor

Collect the reposted posts from any Instagram account by entering a username, user ID, or profile URL. The actor loads multiple pages automatically, stops at your limit, and returns the raw repost data exactly as provided for easy review or export.

- **URL**: https://apify.com/datamagnet/instagram-user-reposts-scraper.md
- **Developed by:** [Datamagnet](https://apify.com/datamagnet) (community)
- **Categories:** Social media
- **Stats:** 7 total users, 4 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Instagram Reposts Scraper

Instagram Reposts Scraper helps you quickly collect the reposted posts from any Instagram account by entering a username, user ID, or profile URL. It is built for marketers, researchers, creators, and analysts who want to understand what an account has reposted without manually scrolling through Instagram. The actor automatically loads more reposts until it reaches your chosen limit, then returns the raw repost data exactly as provided. If you need Instagram repost data for content research, audience analysis, or competitive monitoring, this actor gives you a fast and reliable way to get it.

### Key Features
- Extract reposted posts from a single Instagram account in one run.
- Collect data using a username, numeric user ID, or profile URL.
- Load multiple pages automatically until your requested limit is reached.
- Return the raw repost data exactly as received, including pagination details.
- Capture rich post details such as captions, media type, owner info, likes, comments, and timestamps.
- Support continuation from a previous run when you want to keep collecting more results.
- Save time by replacing manual Instagram browsing with automated collection.

### Use Cases

#### Content Research
Social media managers and content strategists use this actor to see which posts a target Instagram account has reposted. By reviewing fields like `caption.text`, `owner.username`, `taken_at_date`, and `media_type`, they can identify themes, creators, and content styles that resonate with that account.

#### Competitor Monitoring
Brands and agencies can track repost behavior to understand what a competitor is amplifying. The returned data helps them compare reposted creators, post formats, and engagement signals such as `like_count`, `comment_count`, and `share_count` to spot patterns in content strategy.

#### Influencer Vetting
Influencer marketers can inspect reposted content before partnering with an account. Fields like `caption.user.username`, `owner.is_verified`, `tagged_users`, and `coauthor_producers` help them evaluate whether the account shares relevant, brand-safe, and high-quality content.

#### Audience Insight
Researchers and growth teams can use repost data to infer what an audience cares about. By looking at captions, hashtags, mentions, and media formats, they can better understand the topics and creators that the account chooses to repost.

#### Campaign Tracking
Teams running creator campaigns can monitor whether campaign-related posts are being reposted by target accounts. The actor returns the original post details and timestamps, making it easier to confirm when a repost happened and what content was shared.

#### Reporting and Archiving
Analysts who need a record of repost activity can export the results for reporting or internal documentation. Because the actor returns the raw repost data, it preserves the original structure and pagination information for downstream review.

### Input

| Field | Type | Required | Description | Example |
|---|---|---:|---|---|
| max_results | integer | No | Set the maximum number of reposts to collect. The actor keeps loading more results until it reaches this limit or there are no more reposts. | 100 |
| pagination_token | string | No | Paste the token from a previous run if you want to continue collecting more results. Leave it empty for the first run. | "" |
| username_or_id_or_url | string | Yes | Enter the Instagram account you want to check. You can paste a username, numeric user ID, or profile URL. | mrbeast |

### Output

| Field | Type | Description |
|---|---|---|
| 1$floating_context_items(prepend_media_repost_author_ids:$prepend_media_repost_author_ids) | array | Extra repost-related context items returned with the record. |
| accessibility_caption | string or null | A short accessibility description for the media, if available. |
| all_previous_submitters | array or null | A list of earlier submitters connected to the post, when provided. |
| are_remixes_crosspostable | boolean or null | Whether the post can be reused as a remix or cross-post. |
| attribution_content_url | string or null | A link used for attribution, if the source provides one. |
| audience | object or null | Audience-related information attached to the post, if available. |
| autodub_status | string or null | Status for automatic dubbing, when present. |
| boost_unavailable_identifier | string or null | A label explaining why boosting is unavailable, if provided. |
| boost_unavailable_reason | string or null | A human-readable reason boosting is unavailable. |
| boost_upsell_banner_payload | object or null | Promotional banner details related to boosting, if included. |
| boosted_post_id | string or null | The ID of a boosted version of the post, if any. |
| boosted_status | string or null | Whether the post is boosted or not, if provided. |
| byoa_langs | array or null | Language settings related to the post, when available. |
| can_modify_carousel | boolean or null | Whether the carousel can still be changed. |
| can_reshare | boolean | Whether the post can be reshared. |
| can_save | boolean | Whether the post can be saved. |
| caption | object | Caption details, including text, author, mentions, hashtags, and timing. |
| caption_add_on | object or null | Extra caption content attached to the post, if present. |
| caption_is_edited | boolean | Whether the caption was edited after posting. |
| carousel_last_edited_at | number or null | The last time the carousel was edited, if available. |
| carousel_media | array or null | The items inside a carousel post, if the post has multiple media pieces. |
| carousel_media_count | number or null | How many items are in the carousel. |
| carousel_media_pending_post_count | number or null | How many carousel items are still pending, if any. |
| channel_tag_data | object or null | Channel tag details, when the post includes them. |
| clips_attribution_info | object or null | Attribution details for clip content, if present. |
| clips_captions | object or null | Caption data for clips, if included. |
| clips_captions_translations_urls | array or null | Links to translated clip captions, if available. |
| clips_karaoke_caption | object or null | Karaoke-style caption data for clips, if present. |
| clips_metadata | object or null | Clip-specific metadata such as audio, remix, and creation details. |
| clips_tab_pinned_user_ids | array | User IDs pinned in the clips tab, if any. |
| clips_text | string or null | Text attached to the clip, if present. |
| coauthor_producer_can_see_organic_insights | boolean | Whether coauthors can view organic insights. |
| coauthor_producers | array | Accounts listed as coauthors or producers on the post. |
| code | string | The short post code used by Instagram. |
| comment_count | number | The number of comments on the post. |
| comment_inform_treatment | object | Moderation or reporting-related comment information. |
| comment_likes_enabled | boolean | Whether people can like comments on the post. |
| comment_threading_enabled | boolean | Whether comment replies are threaded. |
| comments_disabled | boolean or null | Whether comments are turned off. |
| community_notes_info | object | Community notes settings and status for the post. |
| content_views_count(caller_id:"IG_PUBLIC_VIEWS_PROFILE_MEDIA_GRID") | number or null | View count shown in the profile grid context, if available. |
| creative_config | object or null | Creative settings attached to the post, if provided. |
| creator_viewer_insights | object or null | Viewer insight data for creators, when available. |
| crosspost | object or null | Cross-posting details, if the post was shared elsewhere. |
| crosspost_metadata | object | Additional cross-posting information. |
| deleted_reason | number | A code showing whether the post was deleted and why. |
| dominant_color | string or null | The main color associated with the media, if available. |
| facepile_top_likers | array or null | A preview of top likers, if provided. |
| fb_comment_count | number or null | Comment count from Facebook, if available. |
| fb_like_count | number or null | Like count from Facebook, if available. |
| fb_play_count | number or null | Play count from Facebook, if available. |
| filter_type | number | The filter type applied to the media. |
| fundraiser_tag | object | Fundraiser-related details attached to the post, if any. |
| gen_ai_detection_method | object | Information about how AI-related detection was handled. |
| has_audio | boolean | Whether the post includes audio. |
| has_hidden_comments | boolean or null | Whether some comments are hidden. |
| has_liked | boolean | Whether the viewer has liked the post. |
| has_more_comments | boolean | Whether more comments exist beyond the preview. |
| has_reshares | boolean or null | Whether the post has reshares, if provided. |
| has_shared_to_fb | number | Whether the post was shared to Facebook. |
| has_tagged_users | boolean or null | Whether the post includes tagged users. |
| id | string | The unique ID of the post. |
| ig_media_sharing_disabled | boolean | Whether sharing is disabled for the post. |
| ig_play_count | number or null | The number of plays for the media, if available. |
| igbio_product | object or null | Product-related data from the bio or post, if present. |
| image_versions | object | Image sizes and preview URLs for the media. |
| inline_composer_display_condition | object or null | Rules for when the inline composer appears. |
| inline_composer_imp_trigger_time | number or null | Timing information for inline composer prompts, if present. |
| invited_coauthor_producers | array | Accounts invited as coauthors, if any. |
| is_artist_pick | boolean or null | Whether the post was marked as an artist pick. |
| is_auto_created | boolean or null | Whether the post was automatically created. |
| is_comments_gif_composer_enabled | boolean | Whether GIF comments are enabled. |
| is_currently_promoting_by_sponsor | boolean or null | Whether the post is currently sponsored or promoted. |
| is_cutout_sticker_allowed | boolean | Whether cutout stickers are allowed. |
| is_dash_eligible | number or null | Whether the media is eligible for DASH playback. |
| is_dismiss_pending_media_banner | boolean or null | Whether a pending media banner was dismissed. |
| is_eligible_for_media_note_recs_nux | boolean or null | Whether the post is eligible for media note recommendations. |
| is_fb_only | boolean or null | Whether the post is only for Facebook. |
| is_in_profile_grid | boolean | Whether the post appears in the profile grid. |
| is_organic_product_tagging_eligible | boolean | Whether product tagging is allowed organically. |
| is_paid_partnership | boolean | Whether the post is marked as a paid partnership. |
| is_pinned | boolean | Whether the post is pinned. |
| is_post_live | boolean or null | Whether the post is a live post. |
| is_post_live_clips_media | boolean or null | Whether the post is live clips media. |
| is_quiet_post | boolean | Whether the post is a quiet post. |
| is_reshare_of_text_post_app_media_in_ig | boolean or null | Whether the post is a reshared text-post-app item. |
| is_reuse_allowed | boolean | Whether reuse is allowed. |
| is_shared_from_basel | boolean or null | Whether the post was shared from Basel, if provided. |
| is_third_party_downloads_eligible | boolean or null | Whether third-party downloads are allowed. |
| is_video | boolean | Whether the post is a video. |
| like_and_view_counts_disabled | boolean | Whether likes and views are hidden. |
| like_count | number | The number of likes on the post. |
| location | object or null | Location attached to the post, if any. |
| main_feed_carousel_starting_media_id | string or null | The starting media ID for a carousel in the main feed. |
| mashup_info | object or null | Mashup-related details, if the post is part of a mashup. |
| max_num_visible_preview_comments | number | How many preview comments are shown. |
| media_attributions_data | array | Attribution data connected to the media. |
| media_cropping_info | object or null | Cropping details for the media, if available. |
| media_format | string | The format of the media, such as image, video, album, or reel. |
| media_name | string | The media name or type label used by Instagram. |
| media_notes | object | Notes attached to the media, if any. |
| media_notice | object or null | Notice information shown with the media, if present. |
| media_overlay_info | object or null | Overlay details for the media, if included. |
| media_reposter_bottomsheet_enabled | boolean | Whether repost-related bottom sheet features are enabled. |
| media_type | number | The numeric media type code. |
| music_metadata | object | Music-related metadata attached to the post. |
| number_of_qualities | number or null | How many quality versions are available for the media. |
| open_carousel_submission_state | string or null | Whether carousel submissions are open or closed. |
| open_to_public_submission_description_text | string or null | Public submission description text, if available. |
| organic_cta_info | object or null | Organic call-to-action details, if present. |
| organic_cta_type | string or null | The type of organic call-to-action, if present. |
| original_height | number | The original height of the media. |
| original_width | number | The original width of the media. |
| owner | object | The account that owns the post. |
| play_count | number or null | The number of plays, if available. |
| product_collection_tag | object or null | Product collection tag details, if present. |
| product_suggestions | object or null | Product suggestions attached to the post, if any. |
| product_tags | object or null | Product tags attached to the post, if any. |
| product_type | string | The product type label for the media. |
| profile_grid_thumbnail_fitting_style | string | How the thumbnail fits in the profile grid. |
| repost_count | number or null | The number of reposts, if available. |
| save_count | number or null | The number of saves, if available. |
| share_count | number or null | The number of shares, if available. |
| share_count_disabled | boolean | Whether share counts are hidden. |
| shimmed_mv_link | string or null | A linked media value, if present. |
| should_show_author_pog_for_tagged_media_shared_to_profile_grid | boolean | Whether the author badge should be shown for tagged media. |
| social_context | array | Social context notes attached to the post. |
| sponsor_tags | array | Sponsor tags attached to the post. |
| sticker_translations_enabled | boolean or null | Whether sticker translations are enabled. |
| story_prompts | object or null | Story prompt data, if present. |
| subscribe_cta_visible | boolean | Whether a subscribe call-to-action is visible. |
| tagged_users | array | Users tagged in the post. |
| taken_at | number | The posting time as a timestamp. |
| taken_at_date | string | The posting time in a readable date format. |
| tallest_media_aspect_ratio | number or null | The tallest aspect ratio for the media, if available. |
| thumbnail_url | string | A preview image or video thumbnail URL. |
| timeline_pinned_user_ids | array | User IDs pinned on the timeline, if any. |
| top_likers | array | A list of top likers, if provided. |
| translated_video_subtitles | object or null | Translated subtitles for video, if available. |
| type | string | The record type returned by the source. |
| upcoming_event | object or null | Event details connected to the post, if any. |
| user | object | The account that posted or shared the content. |
| video_codec | string or null | The video codec used, if available. |
| video_duration | number or null | The length of the video in seconds. |
| video_sticker_locales | array or null | Locales available for video stickers, if present. |
| video_subtitles_confidence | number or null | Confidence score for subtitles, if available. |
| video_subtitles_enabled | boolean or null | Whether subtitles are enabled. |
| video_subtitles_locale | string or null | The subtitle language, if available. |
| video_subtitles_status | string or null | The status of subtitles, if present. |
| video_subtitles_uri | string or null | A link to subtitle data, if available. |
| video_url | string or null | A direct link to the video file, if provided. |
| video_versions | array or null | Available video versions and their URLs. |
| view_count | number or null | The number of views, if available. |
| visibility | string or null | The visibility setting of the post. |
| visual_comment_reply_sticker_info | object or null | Sticker details for visual comment replies. |
| visual_replies_info | object or null | Visual reply details, if present. |
| wearable_attribution_info | object or null | Wearable attribution details, if included. |

### Sample Output

```json
{
  "1$floating_context_items(prepend_media_repost_author_ids:$prepend_media_repost_author_ids)": [],
  "accessibility_caption": null,
  "all_previous_submitters": null,
  "are_remixes_crosspostable": true,
  "attribution_content_url": null,
  "audience": null,
  "autodub_status": null,
  "boost_unavailable_identifier": null,
  "boost_unavailable_reason": null,
  "boost_upsell_banner_payload": null,
  "boosted_post_id": null,
  "boosted_status": null,
  "byoa_langs": null,
  "can_modify_carousel": null,
  "can_reshare": true,
  "can_save": true,
  "caption": {
    "content_type": "comment",
    "created_at": 1783555140,
    "created_at_utc": 1783555140,
    "did_report_as_spam": false,
    "has_translation": null,
    "hashtags": [],
    "id": "3937068091917040349",
    "is_covered": false,
    "is_ranked_comment": false,
    "mentions": [
      "@mrbeast"
    ],
    "private_reply_status": 0,
    "share_enabled": false,
    "status": "Active",
    "text": "Thank you @mrbeast 😭❤️Best day of my life😭",
    "type": 1,
    "user": {
      "fbid_v2": "17841467057520197",
      "follower_count": 2160513,
      "full_name": "ガミックス",
      "id": "67121579250",
      "is_private": false,
      "is_verified": true,
      "profile_pic_url": "https://instagram.frix7-1.fna.fbcdn.net/...",
      "type": "XDTUserDict",
      "username": "gamix.o7"
    }
  },
  "caption_add_on": null,
  "caption_is_edited": false,
  "carousel_last_edited_at": null,
  "carousel_media": null,
  "carousel_media_count": null,
  "carousel_media_pending_post_count": null,
  "channel_tag_data": null,
  "clips_attribution_info": null,
  "clips_captions": null,
  "clips_captions_translations_urls": null,
  "clips_karaoke_caption": null,
  "clips_metadata": {
    "audio_type": "original_sounds",
    "original_sound_info": {
      "original_audio_title": "Original audio",
      "progressive_download_url": "https://instagram.frix7-1.fna.fbcdn.net/..."
    }
  },
  "clips_tab_pinned_user_ids": [],
  "clips_text": null,
  "coauthor_producer_can_see_organic_insights": false,
  "coauthor_producers": [
    {
      "full_name": "MrBeast",
      "id": "2278169415",
      "is_verified": true,
      "type": "XDTUserDict",
      "username": "mrbeast"
    }
  ],
  "code": "DajRpHzPXrd",
  "comment_count": 16572,
  "comment_inform_treatment": {
    "action_type": null,
    "should_have_inform_treatment": false,
    "text": "",
    "url": null
  },
  "comment_likes_enabled": true,
  "comment_threading_enabled": true,
  "comments_disabled": null,
  "community_notes_info": {
    "enable_submission_friction": false,
    "has_viewer_submitted_note": false,
    "note_submission_disabled": false
  },
  "content_views_count(caller_id:\"IG_PUBLIC_VIEWS_PROFILE_MEDIA_GRID\")": null,
  "creative_config": null,
  "creator_viewer_insights": null,
  "crosspost": null,
  "crosspost_metadata": {
    "fb_downstream_use_xpost_metadata": {
      "downstream_use_xpost_deny_reason": "NONE"
    }
  },
  "deleted_reason": 0,
  "dominant_color": null,
  "facepile_top_likers": null,
  "fb_comment_count": null,
  "fb_like_count": null,
  "fb_play_count": null,
  "filter_type": 0,
  "fundraiser_tag": {
    "has_standalone_fundraiser": false
  },
  "gen_ai_detection_method": {
    "detection_method": "NONE"
  },
  "has_audio": true,
  "has_hidden_comments": null,
  "has_liked": false,
  "has_more_comments": true,
  "has_reshares": null,
  "has_shared_to_fb": 0,
  "has_tagged_users": true,
  "id": "3937068091917040349",
  "ig_media_sharing_disabled": false,
  "ig_play_count": 22681948,
  "image_versions": {
    "items": [
      {
        "height": 1333,
        "url": "https://instagram.frix7-1.fna.fbcdn.net/...",
        "width": 750
      }
    ]
  },
  "is_comments_gif_composer_enabled": true,
  "is_in_profile_grid": false,
  "is_organic_product_tagging_eligible": true,
  "is_paid_partnership": false,
  "is_pinned": true,
  "is_quiet_post": false,
  "is_reuse_allowed": false,
  "is_third_party_downloads_eligible": true,
  "is_video": true,
  "like_and_view_counts_disabled": false,
  "like_count": 984068,
  "media_attributions_data": [],
  "media_format": "video",
  "media_name": "reel",
  "media_notes": {
    "1$items(prepend_media_repost_author_ids:$prepend_media_repost_author_ids)": []
  },
  "media_reposter_bottomsheet_enabled": false,
  "media_type": 2,
  "music_metadata": null,
  "number_of_qualities": 7,
  "open_carousel_submission_state": null,
  "organic_cta_info": null,
  "original_height": 1280,
  "original_width": 720,
  "owner": {
    "full_name": "ガミックス",
    "id": "67121579250",
    "is_verified": true,
    "type": "XDTUserDict",
    "username": "gamix.o7"
  },
  "play_count": 22681948,
  "product_type": "clips",
  "profile_grid_thumbnail_fitting_style": "UNSET",
  "share_count": 89798,
  "share_count_disabled": false,
  "social_context": [],
  "sponsor_tags": [],
  "subscribe_cta_visible": false,
  "tagged_users": [
    {
      "user": {
        "full_name": "MrBeast",
        "id": "2278169415",
        "is_verified": true,
        "type": "XDTUserDict",
        "username": "mrbeast"
      }
    }
  ],
  "taken_at": 1783555174,
  "taken_at_date": "2026-07-08T23:59:34+00:00",
  "thumbnail_url": "https://instagram.frix7-1.fna.fbcdn.net/...",
  "timeline_pinned_user_ids": [
    "67121579250"
  ],
  "top_likers": [],
  "type": "XDTMediaDict",
  "user": {
    "full_name": "ガミックス",
    "id": "67121579250",
    "is_verified": true,
    "type": "XDTUserDict",
    "username": "gamix.o7"
  },
  "video_codec": "vp09.00.31.08.00.01.01.01.00",
  "video_duration": 36.86600112915039,
  "video_url": "https://instagram.frix7-1.fna.fbcdn.net/...",
  "video_versions": [
    {
      "height": 1280,
      "id": "1394501309204196v",
      "type": 101,
      "url": "https://instagram.frix7-1.fna.fbcdn.net/...",
      "width": 720
    }
  ],
  "view_count": null,
  "visibility": null
}
````

### How It Works

1. You enter the Instagram username, user ID, or profile URL you want to check.
2. You choose how many reposts you want to collect.
3. The actor starts gathering reposted posts automatically and keeps going until it reaches your limit.
4. If more reposts are available, it continues loading the next batch for you.
5. When it finishes, you get the raw repost data ready for review, export, or further analysis.

### Getting Started

Getting started is simple and does not require coding knowledge. Just click **Try for free**, fill in the Instagram account you want to check, set your preferred result limit, and click **Run**. The actor will collect reposted posts automatically and return the results in a format you can work with right away. You can download the output as JSON, CSV, or Excel depending on how you want to review or share the data.

### Frequently Asked Questions

#### Do I need technical skills?

No. This actor is designed for business users, marketers, researchers, and creators who want results without dealing with complicated setup. You only need to provide the Instagram account you want to check and choose how many reposts to collect.

#### How fast does it run?

Speed depends on how many reposts are available and how many pages need to be loaded. Smaller requests usually finish quickly, while larger limits may take longer because the actor keeps collecting until it reaches your target or runs out of reposts.

#### What format is the output?

The results are available in formats that are easy to review and share, including JSON, CSV, and Excel. The actor returns the raw repost data exactly as provided, so you can inspect the full record or use it in your own reporting workflow.

#### Is this legal to use?

You should always use data responsibly and in line with applicable laws, platform rules, and your organization’s policies. This actor is intended for legitimate research, analysis, and business workflows. If you are unsure about your use case, review your compliance requirements before running it.

#### Can I schedule it to run automatically?

Yes, you can run it whenever you need fresh data, and it can be added to automated workflows if you want recurring collection. That makes it useful for ongoing monitoring of repost activity, campaign tracking, or regular reporting.

# Actor input Schema

## `username_or_id_or_url` (type: `string`):

Enter the Instagram account you want to check. You can paste a username, numeric user ID, or profile URL.

## `max_results` (type: `integer`):

Set the maximum number of reposts to collect. The actor will keep loading more results until it reaches this limit or there are no more reposts.

## Actor input object example

```json
{
  "username_or_id_or_url": "mrbeast",
  "max_results": 100
}
```

# 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 = {
    "username_or_id_or_url": "mrbeast"
};

// Run the Actor and wait for it to finish
const run = await client.actor("datamagnet/instagram-user-reposts-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 = { "username_or_id_or_url": "mrbeast" }

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

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

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

```

## CLI example

```bash
echo '{
  "username_or_id_or_url": "mrbeast"
}' |
apify call datamagnet/instagram-user-reposts-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=datamagnet/instagram-user-reposts-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "✅ Instagram User Reposts Scraper",
        "description": "Collect the reposted posts from any Instagram account by entering a username, user ID, or profile URL. The actor loads multiple pages automatically, stops at your limit, and returns the raw repost data exactly as provided for easy review or export.",
        "version": "0.0",
        "x-build-id": "r6SVQH9gkgZRPW7dx"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/datamagnet~instagram-user-reposts-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-datamagnet-instagram-user-reposts-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/datamagnet~instagram-user-reposts-scraper/runs": {
            "post": {
                "operationId": "runs-sync-datamagnet-instagram-user-reposts-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/datamagnet~instagram-user-reposts-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-datamagnet-instagram-user-reposts-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "username_or_id_or_url"
                ],
                "properties": {
                    "username_or_id_or_url": {
                        "title": "Username, user ID, or profile URL",
                        "type": "string",
                        "description": "Enter the Instagram account you want to check. You can paste a username, numeric user ID, or profile URL."
                    },
                    "max_results": {
                        "title": "Max results",
                        "type": "integer",
                        "description": "Set the maximum number of reposts to collect. The actor will keep loading more results until it reaches this limit or there are no more reposts.",
                        "default": 10
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
