Instagram User Post Scraper API
Pricing
from $1.00 / 1,000 results
Instagram User Post Scraper API
Collect posts from any public Instagram account — including captions, likes, comments, media type, location, tagged users, and more. Process up to 10 accounts per run. Requires an Instagram Session ID. (Beta)
Pricing
from $1.00 / 1,000 results
Rating
5.0
(1)
Developer

Futurize Rush
Actor stats
0
Bookmarked
1
Total users
0
Monthly active users
5 hours ago
Last modified
Categories
Share
Collect posts from any public Instagram account — including captions, likes, comments, media type, location, tagged users, music, and more. Process up to 10 accounts in a single run.
What does Instagram User Post Scraper API do?
This Actor collects all accessible posts from any public Instagram user and returns detailed data for each one. You can process multiple usernames in a single run.
For each user, the Actor first returns a profile summary row followed by individual post rows — one per post.
Data you can extract
For the source user (profile row):
- Identity — username, full name, biography, bio link (external URL)
- Stats — follower count, following count, total post count
- Status — verified badge, private account flag, business/creator account flag, account category
- Media — profile picture
- Links — profile URL
For each post:
- Content — caption, hashtags, mentions
- Media — media type (image/video/carousel), media URL, all carousel slide URLs
- Engagement — like count, comment count
- Video — view count, duration, audio flag
- Metadata — post URL, post ID, shortcode, timestamp, position index
- Creator controls — like count visibility, comments disabled flag, sharing disabled flag, paid partnership label, reshare count
- Extras — location, tagged users, music attribution, coauthors, pinned status, verified badge, sponsor tags, accessibility caption
How to get your Session ID
This Actor requires an Instagram Session ID for authentication. Here's how to get it:
Option 1: Browser Developer Tools
- Open instagram.com in your browser and log in
- Press F12 to open Developer Tools
- Go to Application → Cookies →
https://www.instagram.com - Find the cookie named
sessionidand copy its value - Paste it into the Session ID field in the Actor input
Option 2: Cookie Editor Extension
You can also use a browser extension like Cookie-Editor to quickly view and copy cookies. Simply install the extension, visit instagram.com, and search for the sessionid cookie.
Disclaimer: Cookie-Editor is a third-party extension not affiliated with this Actor. As with any browser extension that accesses cookie data, please review its permissions and use at your own discretion.
Important notes
-
Get a fresh Session ID before each run. Session IDs can expire at any time — often without warning. For best results, copy a fresh Session ID from your browser immediately before starting each run.
-
Use a secondary account. Automated access may cause Instagram to flag your account or temporarily restrict it. We strongly recommend using a secondary account rather than your primary one.
Input example
{"usernames": ["natgeo","nasa"],"sessionId": "your-session-id-here","maxPosts": 0}
| Field | Type | Description |
|---|---|---|
usernames | Array | Instagram usernames to scrape (1–10). Accepts username, @username, or full profile URL |
sessionId | String | Your Instagram login session credential |
maxPosts | Number | Max posts to collect per user (0 = unlimited, default: 0) |
Output example
Profile row (item_type: "profile"):
{"item_type": "profile","sourceUsername": "natgeo","username": "natgeo","userId": "787132","fullName": "National Geographic","biography": "...","profileUrl": "https://www.instagram.com/natgeo","profilePicUrl": "https://...","externalUrl": "https://www.nationalgeographic.com","isVerified": true,"isPrivate": false,"isBusinessAccount": true,"category": "Media/News Company","followerCount": 300000000,"followingCount": 150,"postCount": 15200,"scrapedAt": "2026-03-01T12:00:00.000Z"}
Post row (item_type: "post"):
{"item_type": "post","sourceUsername": "natgeo","username": "natgeo","userId": "787132","postId": "3567890123456789012","shortcode": "ABC123xyz","postUrl": "https://www.instagram.com/p/ABC123xyz/","caption": "The Amazon rainforest...","hashtags": ["#nature", "#wildlife"],"mentions": ["@wwf"],"mediaType": "image","mediaUrl": "https://...","mediaUrls": null,"likeCount": 50000,"commentCount": 300,"videoViewCount": null,"videoDuration": null,"hasAudio": null,"isPinned": false,"isVerified": true,"isLikeCountHidden": false,"isPaidPartnership": false,"isCommentsDisabled": false,"isSharingDisabled": false,"reshareCount": null,"locationName": "Amazon Rainforest","taggedUsers": ["wwf"],"sponsorTags": [],"musicName": null,"coauthors": [],"accessibilityCaption": null,"timestamp": "2026-03-01T12:00:00.000Z","scrapedAt": "2026-03-01T12:05:00.000Z","index": 1}
Output schema
Each run produces two row types in the same dataset:
| Field | Type | Profile | Post |
|---|---|---|---|
item_type | String | "profile" | "post" |
sourceUsername | String | ✓ | ✓ |
username | String | ✓ | ✓ |
userId | String | ✓ | ✓ |
fullName | String | ✓ | — |
biography | String | ✓ | — |
profileUrl | String | ✓ | — |
profilePicUrl | String | ✓ | — |
externalUrl | String | ✓ ¹ | — |
isVerified | Boolean | ✓ | ✓ |
isPrivate | Boolean | ✓ | — |
isBusinessAccount | Boolean | ✓ | — |
category | String | ✓ ¹ | — |
followerCount | Integer | ✓ | — |
followingCount | Integer | ✓ | — |
postCount | Integer | ✓ ¹ | — |
postId | String | — | ✓ |
shortcode | String | — | ✓ |
postUrl | String | — | ✓ |
caption | String | — | ✓ |
hashtags | Array | — | ✓ |
mentions | Array | — | ✓ |
mediaType | String | — | ✓ (image / video / carousel) |
mediaUrl | String | — | ✓ |
mediaUrls | Array | — | ✓ ¹ |
likeCount | Integer | — | ✓ |
commentCount | Integer | — | ✓ |
videoViewCount | Integer | — | ✓ ¹ |
videoDuration | Number | — | ✓ ¹ |
hasAudio | Boolean | — | ✓ ¹ |
isPinned | Boolean | — | ✓ |
isLikeCountHidden | Boolean | — | ✓ |
isPaidPartnership | Boolean | — | ✓ |
isCommentsDisabled | Boolean | — | ✓ |
isSharingDisabled | Boolean | — | ✓ |
reshareCount | Integer | — | ✓ ¹ |
locationName | String | — | ✓ ¹ |
taggedUsers | Array | — | ✓ |
sponsorTags | Array | — | ✓ |
musicName | String | — | ✓ ¹ |
coauthors | Array | — | ✓ |
accessibilityCaption | String | — | ✓ ¹ |
timestamp | String | — | ✓ |
scrapedAt | String | ✓ | ✓ |
index | Integer | — | ✓ |
¹ This field is present in every row of the indicated type but may be null when not applicable (e.g., videoViewCount is null for image posts; mediaUrls is null for single-media posts; reshareCount is null for most posts as Instagram does not publicly expose share counts).
How it works
- Connects to Instagram using your Session ID
- Looks up each username and collects their profile information
- Collects all accessible posts — captions, media, engagement data, and more
- Continues gathering posts in batches until your limit is reached
- Saves results as they come in — no need to wait for the full run to finish
- Automatically resumes from where it left off if interrupted
Tips for best results
- Refresh your Session ID if you see errors. Session IDs can expire at any time. If authentication fails, obtain a fresh one and retry.
- Private accounts are automatically handled. Their profile information will still be collected, but their post list is not accessible. You can identify them by the
isPrivate: truefield. - Results are saved progressively. Posts are saved to the dataset as they are collected. If a run is interrupted, the data collected so far is preserved and the run can resume automatically.
Frequently asked questions
Why is a Session ID required?
Instagram requires you to be logged in to access post data. The Session ID is how the Actor authenticates on your behalf — without it, posts cannot be retrieved.
Is it safe to use my Session ID?
Your Session ID is treated as a secret — it is stored securely by Apify and never exposed in logs or output. That said, we strongly recommend using a secondary Instagram account rather than your primary one as a precaution.
How many accounts can I scrape?
You can process up to 10 Instagram accounts per run. Set maxPosts to 0 (the default) for unlimited posts per user, or any positive value up to 100,000 to cap the posts collected per account.
What is the difference between mediaUrl and mediaUrls?
mediaUrl is the primary media file for all post types. For carousels, it is the URL of the first slide — which may be a video URL if the first slide is a video. mediaUrls contains all slide URLs for carousel posts and is null for single-image or single-video posts.
Can I scrape private accounts?
No. Private accounts are not accessible. Their profile information will be collected and returned with isPrivate: true, but their post list will not be available.
What happens if authentication fails?
The Actor will stop and report an authentication error. Obtain a fresh Session ID and try again.
Can I scrape multiple users at once?
Yes. The usernames field accepts up to 10 usernames per run. Each user is processed in sequence.
Integrations
Connect Instagram User Post Scraper API with other apps and services using Apify integrations. Export data to Google Sheets, Slack, Zapier, Make, and many more.
Disclaimer
This Actor is intended for learning, research, and personal use. Please use it responsibly and ethically, and ensure your usage complies with Instagram's Terms of Service.
Instagram may update its platform at any time, which could temporarily affect this Actor's functionality. While we actively maintain compatibility, occasional disruptions are possible.
Using a Session ID involves providing authentication credentials to the Actor. We strongly recommend using a secondary account, as automated access may result in account restrictions or temporary bans. You are solely responsible for how you use this tool and any consequences that may arise from its use.
Instagram post scraper, Instagram user posts, Instagram posts extractor, Instagram profile posts API, Instagram content scraper, Instagram media downloader, Instagram post data export, Instagram captions scraper, Instagram engagement data, social media scraper, Apify actor, OpenClaw, Claude Code, Gemini, Codex, Antigravity