# Instagram Scraper - Posts, Profiles, Reels, Comments & Hashtags (`socialscrapers/instagram-scraper`) Actor

Instagram scraper for any mix of usernames, profile and post links, hashtags and keywords: posts and reels (caption, likes, comments, plays, date, location, media URLs), comments, and profiles (followers, bio, links, latest posts). No login, no cookies. API, JSON, CSV, Excel. $0.32 per 1,000 posts.

- **URL**: https://apify.com/socialscrapers/instagram-scraper.md
- **Developed by:** [Social Scrapers](https://apify.com/socialscrapers) (community)
- **Categories:** Social media, Marketing, Lead generation
- **Features:** Limited permissions
- **Stats:** 39 total users, 14 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.26 / 1,000 posts

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 Scraper** gets public Instagram data from any mix of usernames, profile links, post and reel links, hashtags and keywords, with no Instagram account, login or cookies. Choose what to get: **posts and reels** (caption, hashtags, likes, comments count, plays, date, location, sound, image and video URLs), **comments**, or **profiles** (followers, bio, links, verified badge, latest posts), as JSON, CSV or Excel. It costs **$0.32 per 1,000 posts**.

> 💡 **Need a feature that isn't here? Just ask.** Open an issue on the **Issues** tab and tell us what you need: a new field, filter, input type or output format. We build requested features fast, usually within 24 hours, at no extra cost.

> ⭐ **Found it useful?** A short review on the **Reviews** tab helps other people find this scraper, and tells us what to build next.

### What does Instagram Scraper do?

Instagram Scraper reads what Instagram shows a visitor who is not logged in, from one list that takes anything you paste:

- 👤 **Profiles**: their latest posts or reels, their comments, or the profile itself with followers, following, posts count, bio, bio links, account type and 12 latest posts.
- 📸 **Posts and reels by link**: full details of each one, or all of its comments.
- \#️⃣ **Hashtags and keywords**: the top posts Instagram shows for them, their comments, or the creators behind them (influencer discovery).
- 🔗 **Messy lists**: `@handles`, profile links with tabs and tracking parameters, share links from the app, `Name (@handle)`, Threads links, hashtag links from other sites. Duplicates are read once.
- 🗓️ **Date filter and pinned posts**: keep only posts newer than a date or an age such as `30 days`, and leave out pinned posts.
- 💸 **Pay only for results**: private profiles, deleted posts and entries with nothing public cost nothing.

Everything the Apify platform gives you comes with it: the Apify API, scheduled runs, webhooks, integrations with Make, Zapier, n8n and Google Sheets, and datasets you can download in any format.

### What can you scrape from Instagram?

One list of entries, and one choice of **What to get** (`resultsType`):

| Entry | Posts / Reels | Comments | Details | Profiles |
|---|---|---|---|---|
| Profile (`natgeo`, `@natgeo`, profile link) | its latest posts (or reels) | comments of its latest posts | the profile, with its 12 latest posts | the profile, with its 12 latest posts |
| Post or reel link | the post | its comments | the post | its owner's profile |
| Hashtag or keyword (`#sourdough`, `running shoes`) | its top posts | comments of its top posts | its top posts | the creators of its top posts |

A single bare word is read as a username: write a hashtag with `#`, a keyword as two or more words, or put them in **Search hashtags or keywords**.

### What data do you get?

Each result is one dataset item: a post, a comment or a profile. Every field is always present (`null` when Instagram doesn't show it), so CSV and Excel exports line up.

**Posts and reels**: `inputUrl`, `id`, `type` (Image, Video, Sidecar), `productType`, `shortCode`, `url`, `caption`, `hashtags`, `mentions`, `likesCount`, `commentsCount`, `videoPlayCount`, `videoDuration`, `timestamp`, `displayUrl`, `images`, `videoUrl`, `dimensionsHeight`, `dimensionsWidth`, `alt`, `childPosts` (carousel slides), `ownerId`, `ownerUsername`, `ownerFullName`, `isPinned`, `taggedUsers`, `coauthorProducers`, `paidPartnership`, `isCommentsDisabled`, `locationName`, `locationId`, `sponsors`, `musicInfo`, `searchTerm`, `scrapedAt`. Instagram no longer shows visitors who are not logged in a post's paid partnership label, brand partners or whether comments are turned off, so `paidPartnership`, `sponsors` and `isCommentsDisabled` are `null` for posts read one by one (links, reels, comments, hashtag results with details).

**Comments**: `postUrl`, `commentUrl`, `id`, `text`, `ownerUsername`, `ownerId`, `ownerIsVerified`, `ownerProfilePicUrl`, `timestamp`, `likesCount`, `repliesCount`, and the post's `postShortCode`, `postId`, `postType`, `postOwnerUsername`, `postOwnerId`, `postCaption`, `postTimestamp`, `postLikesCount`, `postCommentsCount`, plus `inputUrl` and `scrapedAt`.

**Profiles**: `inputUrl`, `id`, `username`, `url`, `fullName`, `biography`, `externalUrl`, `externalUrls`, `followersCount`, `followsCount`, `postsCount`, `highlightReelCount`, `hasReels`, `private`, `verified`, `isBusinessAccount`, `accountType` (business, creator or personal), `profilePicUrl`, `profilePicUrlHD`, `fbid`, `pronouns`, `latestPosts` (12 posts, with the post fields above), `searchTerm`, `scrapedAt`.

The dataset has a view for each kind: **Posts**, **Comments** and **Profiles**.

### How to scrape Instagram

1. Open Instagram Scraper and click **Try for free**.
2. Paste usernames, links, hashtags or keywords into **Instagram usernames, links, hashtags or keywords**, one per line, in any mix.
3. Choose **What to get**: Posts, Reels, Comments, Details or Profiles.
4. Set **Max results per entry**: posts per profile or hashtag, comments per post, or creators per hashtag (`0` for no limit).
5. Optionally set **Only posts newer than**, or **Skip pinned posts**.
6. Click **Start**, then download the results as JSON, CSV, Excel or HTML, or read them with the Apify API.

### How much does it cost to scrape Instagram?

You pay per result saved, platform usage and proxies included:

| Result | Price per 1,000 | Silver | Gold and up |
|---|---|---|---|
| Post or reel | **$0.32** | $0.288 | $0.256 |
| Profile (with its 12 latest posts) | **$2.46** | $2.214 | $1.968 |
| Comment | **$0.47** | $0.423 | $0.376 |

Plus Apify's start charge of $0.0005 per run. Some examples:

- the latest 20 posts of 50 profiles (1,000 posts) → **$0.32**
- the top 100 posts of 10 hashtags (1,000 posts) → **$0.32**
- 1,000 profiles with their latest posts → **$2.46**
- 5,000 comments → **$2.35**

Private profiles, deleted posts and entries Instagram shows nothing for are free. To cap the cost of a run, set **Maximum cost per run** in the run options: the scraper saves results until the next one would go over it, then stops cleanly. Apify's free plan includes monthly platform credit, enough to try the scraper on thousands of posts.

### Input example

```json
{
  "directUrls": ["https://www.instagram.com/natgeo/", "https://www.instagram.com/p/DfahZrMjAqq/", "#sourdough"],
  "resultsType": "posts",
  "resultsLimit": 20,
  "onlyPostsNewerThan": "30 days"
}
```

| Field | Type | Description |
|---|---|---|
| `directUrls` | array of strings | Usernames, profile links, post and reel links, share links, hashtags and keywords, in any mix. `{ "url": "…" }` objects work too. A single bare word is a username. |
| `resultsType` | string | `posts`, `reels`, `comments`, `details` or `profiles`. Default: `posts`. |
| `resultsLimit` | integer | Posts or reels per profile or hashtag, comments per post, or creators per hashtag. `0` for no limit. Default: 20. |
| `commentsPostsLimit` | integer | With `comments`: how many of a profile's latest posts (or a hashtag's top posts) to read comments from. Post links are always read. `0` for every post. Default: 5. |
| `onlyPostsNewerThan` | string | Leave out older posts of profiles and hashtags: a date (`2026-01-31`, `31/01/2026`, `Jan 31 2026`), a date-time (`2026-01-31T18:00:00Z`) or an age (`7 days`, `2w`, `3 months`). Optional. |
| `skipPinnedPosts` | boolean | With `posts`: leave out the posts a profile pinned to the top of its grid. Default: false. |
| `search` | string | Hashtags or keywords, separated by commas (`sourdough, running shoes`). A single word here is a hashtag, never a username. |
| `proxyConfiguration` | object | The scraper picks Apify Proxy's tier itself: datacenter first, residential only when Instagram refuses a request. Your own proxy URLs are used as given. |

### Output example

A post (shortened; image and video URLs abbreviated):

```json
{
  "inputUrl": "https://www.instagram.com/p/DfahZrMjAqq/",
  "id": "4024676116912147114",
  "type": "Image",
  "productType": "feed",
  "shortCode": "DfahZrMjAqq",
  "url": "https://www.instagram.com/p/DfahZrMjAqq/",
  "caption": "Galaxy in bloom\n\nData from our Hubble, Chandra, and Spitzer telescopes…",
  "hashtags": ["NASA", "Galaxy", "Flower"],
  "likesCount": 236506,
  "commentsCount": 783,
  "videoPlayCount": null,
  "timestamp": "2026-11-06T21:00:08.000Z",
  "displayUrl": "https://instagram.fxyz1-1.fna.fbcdn.net/v/…",
  "ownerUsername": "nasa",
  "ownerFullName": "NASA",
  "isPinned": null,
  "paidPartnership": null,
  "locationName": null,
  "musicInfo": null,
  "searchTerm": null,
  "scrapedAt": "2026-11-13T13:58:31.567Z"
}
```

A comment (`resultsType: "comments"`, shortened):

```json
{
  "postUrl": "https://www.instagram.com/p/DfahZrMjAqq/",
  "commentUrl": "https://www.instagram.com/p/DfahZrMjAqq/c/17940797343122260/",
  "id": "17940797343122260",
  "text": "Beautiful image. Thanks for sharing!",
  "ownerUsername": "example_commenter",
  "timestamp": "2026-11-13T13:52:58.000Z",
  "likesCount": 0,
  "repliesCount": 0,
  "postOwnerUsername": "nasa",
  "postLikesCount": 236508,
  "inputUrl": "https://www.instagram.com/p/DfahZrMjAqq/"
}
```

A profile (`resultsType: "profiles"`, shortened; `latestPosts` holds 12 posts with the post fields):

```json
{
  "inputUrl": "https://www.instagram.com/p/DfahZrMjAqq/",
  "id": "528817151",
  "username": "nasa",
  "url": "https://www.instagram.com/nasa/",
  "fullName": "NASA",
  "biography": "Making the seemingly impossible, possible. ✨",
  "externalUrl": "https://www.nasa.gov",
  "followersCount": 104336521,
  "followsCount": 91,
  "postsCount": 5009,
  "highlightReelCount": 6,
  "private": false,
  "verified": true,
  "isBusinessAccount": true,
  "accountType": "business",
  "latestPosts": [{ "shortCode": "Dfc1mYxFevS", "type": "Video", "likesCount": 89922, "videoPlayCount": 3718030, "isPinned": true }],
  "searchTerm": null
}
```

### Switching from another Instagram scraper

The input and output use the long-standing Instagram scraper conventions on the Apify Store, so most pipelines work unchanged:

- **Input:** `directUrls`, `resultsType` (`posts`, `reels`, `comments`, `details`), `resultsLimit`, `onlyPostsNewerThan`, `skipPinnedPosts` and `search` mean what you expect. `startUrls`, `usernames`, `postUrls` and `hashtags` are read as entries too.
- **Output:** `shortCode`, `url`, `caption`, `hashtags`, `mentions`, `likesCount`, `commentsCount`, `videoPlayCount`, `timestamp`, `displayUrl`, `images`, `videoUrl`, `childPosts`, `ownerUsername`, `ownerFullName`, `isPinned`, `paidPartnership`, `musicInfo` (`artist_name`, `song_name`), `locationName`, `latestPosts`, `followersCount`, `private`, `verified`, `commentUrl` and more keep their usual names.
- **Different:** profiles, post links and hashtags can be mixed in one run, and every run needs no login.

### Use it via API, Python, JavaScript and integrations

Run Instagram Scraper from your own code with the Apify API or the Apify clients:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("socialscrapers/instagram-scraper").call(
    run_input={"directUrls": ["natgeo", "#sourdough"], "resultsType": "posts", "resultsLimit": 20}
)
for post in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(post["ownerUsername"], post["likesCount"], post["url"])
```

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

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('socialscrapers/instagram-scraper').call({ directUrls: ['natgeo'], resultsType: 'details' });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

You can also schedule runs (for example every morning to collect new posts of a list of accounts), get a webhook when a run finishes, send results to Google Sheets, Slack or a database with [Apify integrations](https://docs.apify.com/integrations), connect it to Make, Zapier or n8n, or let AI agents run it through the [Apify MCP server](https://docs.apify.com/mcp): it needs no login, so an agent can call it on its own.

### Limits

- **Public data only.** Instagram Scraper never logs in, so it sees what a logged-out visitor sees. Private profiles, and posts deleted or hidden from logged-out visitors, are skipped and cost nothing.
- **Shown to logged-in users only, so not included:** stories, follower and following lists, posts a profile is tagged in, place and sound pages, comment replies, and the "recent" tab of a hashtag. Hashtags give the top posts Instagram shows logged-out visitors (usually 50 to 100 per hashtag or keyword); some very broad single words have no such page, while a more specific keyword (`fitness workout` rather than `fitness`) usually does.
- **Location and sound** are filled for posts read one by one (post links, reels, hashtag posts). A profile's latest posts are read many at a time, which is faster and cheaper, and those pages carry no location or sound.
- **Play counts** of reels are shown for a profile's recent posts; a post read by its link gets its play count when it is among its owner's recent posts.
- **A run with 0 results still succeeds, and no results are charged.** When every entry is private, missing or empty, the run ends as Succeeded with a status message naming each one and why. When no entry is usable at all, the run ends at once with a status message that starts "Nothing to scrape:" and says how to fix the input. A run fails only when Instagram refuses the scraper itself (every one of 3 or more entries, and a profile that is always public too), or on an internal error.

### FAQ

**Is it legal to scrape Instagram?**
Instagram Scraper collects only public data that anyone can see without logging in. You are responsible for using the data lawfully: usernames, bios and comments can be personal data protected by laws such as the GDPR and the CCPA, so have a legitimate reason to collect it, and follow Instagram's terms and the laws that apply to you.

**Do I need an Instagram account or cookies?**
No. The scraper never logs in, so no account of yours is ever at risk.

**Can I mix profiles, posts and hashtags in one run?**
Yes. Put them all in the one list: each entry gives what **What to get** asks for, as in the table above.

**How do I get the profiles of the people posting about a topic?**
Add the hashtag or keyword and choose **Profiles**: you get the creators of its top posts, each with followers, bio, links and latest posts. **Max results per entry** sets how many creators per hashtag.

**Why did I get fewer results than I asked for?**
The profile has fewer posts, the date filter left the rest out, Instagram shows fewer top posts for that hashtag, a post has fewer comments shown to logged-out visitors, or the run reached its maximum cost. The run log says which, for each entry, and the `RUN_SUMMARY` record in the run's key-value store lists what every entry came to.

**Why don't the numbers match what I see on Instagram?**
The scraper sees the logged-out version of a page, and counts keep changing after the run. Open the post in a private browser window to see what a logged-out visitor sees.

**Can I get only new posts?**
Yes. Set **Only posts newer than** to a date or an age such as `7 days`, and schedule the run to repeat.

### Other scrapers by Social Scrapers

| Scraper | What it gets |
| --- | --- |
| [TikTok API](https://apify.com/socialscrapers/tiktok-api) | Profiles, Videos and Comments |
| [TikTok Comments Scraper](https://apify.com/socialscrapers/tiktok-comments-scraper) | Comments, Replies and Likes |
| [TikTok Hashtag Scraper](https://apify.com/socialscrapers/tiktok-hashtag-scraper) | Top Videos, Views and Likes |
| [TikTok Profile Scraper](https://apify.com/socialscrapers/tiktok-profile-scraper) | Followers, Bio, Stats and Videos |
| [TikTok Scraper](https://apify.com/socialscrapers/tiktok-scraper) | Videos, Profiles, Hashtags and Comments |
| [TikTok Sound Scraper](https://apify.com/socialscrapers/tiktok-sound-scraper) | Videos Using a Sound and Music Info |
| [TikTok Video Scraper](https://apify.com/socialscrapers/tiktok-video-scraper) | Views, Likes, Captions and Comments |
| [Instagram API](https://apify.com/socialscrapers/instagram-api) | Profiles, Posts, Reels, Comments and Hashtags |
| [Instagram Comments Scraper](https://apify.com/socialscrapers/instagram-comments-scraper) | Comments, Likes and Reply Counts |
| [Instagram Hashtag Scraper](https://apify.com/socialscrapers/instagram-hashtag-scraper) | Reels and Keyword Search |
| [Instagram Post Details Scraper](https://apify.com/socialscrapers/instagram-post-details-scraper) | Likes, Comments, Views and Media |
| [Instagram Post Scraper](https://apify.com/socialscrapers/instagram-post-scraper) | Posts, Reels and Comments |
| [Instagram Profile Scraper](https://apify.com/socialscrapers/instagram-profile-scraper) | Followers, Bio, Posts and Reels |
| [Instagram Reels Scraper](https://apify.com/socialscrapers/instagram-reels-scraper) | Reels, Plays, Likes and Comments |
| [Instagram Reels Transcript Scraper](https://apify.com/socialscrapers/instagram-reels-transcript-scraper) | Speech to Text and Captions |
| [YouTube API](https://apify.com/socialscrapers/youtube-api) | Videos, Transcripts, Search, Channels and Comments |
| [YouTube Channel Scraper](https://apify.com/socialscrapers/youtube-channel-scraper) | Videos, Shorts, Subscribers and About |
| [YouTube Comments Scraper](https://apify.com/socialscrapers/youtube-comments-scraper) | Comments, Replies and Likes |
| [YouTube Scraper](https://apify.com/socialscrapers/youtube-scraper) | Videos, Shorts, Channels and Comments |
| [YouTube Search Scraper](https://apify.com/socialscrapers/youtube-search-scraper) | Videos, Channels, Views and Filters |
| [YouTube Shorts Scraper](https://apify.com/socialscrapers/youtube-shorts-scraper) | Shorts, Views, Likes and Search |
| [YouTube Transcript Scraper](https://apify.com/socialscrapers/youtube-transcript-scraper) | Subtitles, Captions and SRT |
| [YouTube Video Details Scraper](https://apify.com/socialscrapers/youtube-video-details-scraper) | Stats, Subtitles and Comments |
| [Facebook Ads Library Scraper](https://apify.com/socialscrapers/facebook-ads-library-scraper) | Meta Ad Library and Spend |
| [Facebook Comments Scraper](https://apify.com/socialscrapers/facebook-comments-scraper) | Posts, Reels, Videos and Replies |
| [Facebook Groups Scraper](https://apify.com/socialscrapers/facebook-groups-scraper) | Public Group Posts and Reactions |
| [Facebook Marketplace Scraper](https://apify.com/socialscrapers/facebook-marketplace-scraper) | Prices, Locations and Sellers |
| [Facebook Page Contact Info Scraper](https://apify.com/socialscrapers/facebook-page-contact-scraper) | Email, Phone and WhatsApp |
| [Facebook Posts Scraper](https://apify.com/socialscrapers/facebook-profile-posts-scraper) | Pages, Profiles and Timelines |
| [Facebook Pages Scraper](https://apify.com/socialscrapers/facebook-profile-scraper) | Profiles, Contact Info and Reviews |
| [Facebook Reels Scraper](https://apify.com/socialscrapers/facebook-reels-scraper) | Reels, Videos, Plays and Captions |
| [X (Twitter) Profile Scraper](https://apify.com/socialscrapers/x-profile-scraper) | Followers, Bio and Tweets |
| [X (Twitter) Tweet Scraper](https://apify.com/socialscrapers/x-tweet-scraper) | Latest Posts by Profile |
| [Threads Profile Scraper](https://apify.com/socialscrapers/threads-profile-scraper) | Followers, Bio, Links and Posts |
| [Threads Replies Scraper](https://apify.com/socialscrapers/threads-replies-scraper) | Comments, Authors, Likes and Media |
| [Threads Scraper](https://apify.com/socialscrapers/threads-scraper) | Posts, Profiles, Replies and Search |
| [Threads Search Scraper](https://apify.com/socialscrapers/threads-search-scraper) | Keywords, Hashtags, Top and Recent Posts |
| [Reddit Comments Scraper](https://apify.com/socialscrapers/reddit-comments-scraper) | Threads, Replies, Votes and Authors |
| [Reddit Scraper](https://apify.com/socialscrapers/reddit-scraper) | Posts, Comments, Subreddits, Users and Search |
| [Reddit Search Scraper](https://apify.com/socialscrapers/reddit-search-scraper) | Posts by Keyword, Subreddit and Date |
| [Reddit User Scraper](https://apify.com/socialscrapers/reddit-user-scraper) | Profiles, Karma, Posts and Comments |
| [Subreddit Scraper](https://apify.com/socialscrapers/subreddit-scraper) | Hot, New and Top Posts with Comments |
| [Quora Scraper](https://apify.com/socialscrapers/quora-scraper) | Answers, Questions, Profiles and Topic Search |
| [LinkedIn Ad Library Scraper](https://apify.com/socialscrapers/linkedin-ad-library-scraper) | Ads, Advertisers and Impressions |
| [LinkedIn Job Search Scraper](https://apify.com/socialscrapers/linkedin-job-search-scraper) | Filters, Salaries and New Jobs |
| [LinkedIn Jobs Scraper](https://apify.com/socialscrapers/linkedin-jobs-scraper) | Job Listings, Salaries and Companies |
| [Google Maps Email Extractor](https://apify.com/socialscrapers/google-maps-email-extractor) | Emails, Phones and Social Links |
| [Google Maps Scraper](https://apify.com/socialscrapers/google-maps-scraper) | Places, Phones, Websites, Ratings and Hours |
| [Google News Scraper](https://apify.com/socialscrapers/google-news-scraper) | Headlines, Articles and Search |
| [Google Ads Transparency Scraper](https://apify.com/socialscrapers/google-ads-transparency-scraper) | Ad Creatives and Advertisers |
| [Amazon Product Scraper](https://apify.com/socialscrapers/amazon-product-scraper) | Search Results, Prices, Ratings, ASINs |
| [Indeed Jobs Scraper](https://apify.com/socialscrapers/indeed-jobs-scraper) | Salaries, Full Descriptions, Company Data |
| [Contact Details Scraper](https://apify.com/socialscrapers/contact-details-scraper) | Emails, Phones and Social Links |
| [Telegram Channel Scraper](https://apify.com/socialscrapers/telegram-channel-scraper) | Posts, Views and Media |
| [Doximity Scraper](https://apify.com/socialscrapers/doximity-physician-scraper) | Physician Profiles and Doctor Directory |
| [KevinMD Scraper](https://apify.com/socialscrapers/kevinmd-articles-scraper) | Physician Articles and Author Specialties |
| [Op-Med Scraper](https://apify.com/socialscrapers/opmed-articles-scraper) | Physician Essays and Doctor Profiles |
| [Career Site Jobs Scraper](https://apify.com/socialscrapers/career-site-jobs-scraper) | Greenhouse, Lever, Ashby and Workday |
| [Google Trends Scraper](https://apify.com/socialscrapers/google-trends-scraper) | Interest Over Time, Regions and Queries |

# Actor input Schema

## `directUrls` (type: `array`):

One entry per line, in any mix: a username (<code>natgeo</code>, <code>@natgeo</code>), a profile, post or reel link, a share link from the app, a hashtag (<code>#sourdough</code>) or a keyword of two or more words (<code>running shoes</code>). A single bare word is read as a username. Messy entries are fine: links with extra parameters, <code>Name (@handle)</code>. What each entry gives depends on <b>What to get</b>.

## `resultsType` (type: `string`):

<b>Posts</b>: a profile's latest posts, a hashtag's or keyword's top posts, a post link's post. <b>Reels</b>: the same, reels only. <b>Comments</b>: a post's comments; for a profile or hashtag, the comments of its latest or top posts. <b>Details</b>: a profile's details (with its 12 latest posts), a post's details. <b>Profiles</b>: the profile behind each entry: the account itself, a post's owner, or the creators of a hashtag's top posts.

## `resultsLimit` (type: `integer`):

Posts or reels per profile or hashtag, comments per post, or creators per hashtag. <code>0</code> means no limit: everything Instagram shows a logged-out visitor.

## `commentsPostsLimit` (type: `integer`):

With <b>Comments</b>: how many of a profile's latest posts (or a hashtag's top posts) to read comments from. Post links are always read. <code>0</code> means every post shown.

## `onlyPostsNewerThan` (type: `string`):

Leave out posts older than this (for profiles and hashtags; post links are always read). Pick a date or an age, or type one: a date (<code>2026-01-31</code>, <code>31/01/2026</code>, <code>Jan 31 2026</code>; a UTC day), an ISO date-time through the API (<code>2026-01-31T18:00:00Z</code>), or an age such as <code>7 days</code>, <code>2w</code>, <code>3 months</code> or <code>yesterday</code>. Leave empty for no limit.

## `skipPinnedPosts` (type: `boolean`):

With <b>Posts</b>: leave out the posts a profile pinned to the top of its grid.

## `search` (type: `string`):

Hashtags or keywords, separated by commas: <code>sourdough, running shoes</code>. Each one works like a hashtag entry above (a single word here is a hashtag, never a username).

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

The scraper picks Apify Proxy's tier itself: datacenter first, residential only when Instagram refuses a request (a country you choose applies to the residential retries). Your own proxy URLs are used exactly as given.

## Actor input object example

```json
{
  "directUrls": [
    "https://www.instagram.com/natgeo/",
    "https://www.instagram.com/p/DfahZrMjAqq/",
    "#sourdough"
  ],
  "resultsType": "posts",
  "resultsLimit": 5,
  "commentsPostsLimit": 5,
  "skipPinnedPosts": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (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 = {
    "directUrls": [
        "https://www.instagram.com/natgeo/",
        "https://www.instagram.com/p/DfahZrMjAqq/",
        "#sourdough"
    ],
    "resultsType": "posts",
    "resultsLimit": 5,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("socialscrapers/instagram-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 = {
    "directUrls": [
        "https://www.instagram.com/natgeo/",
        "https://www.instagram.com/p/DfahZrMjAqq/",
        "#sourdough",
    ],
    "resultsType": "posts",
    "resultsLimit": 5,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("socialscrapers/instagram-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 '{
  "directUrls": [
    "https://www.instagram.com/natgeo/",
    "https://www.instagram.com/p/DfahZrMjAqq/",
    "#sourdough"
  ],
  "resultsType": "posts",
  "resultsLimit": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call socialscrapers/instagram-scraper --silent --output-dataset

```

## MCP server setup

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