Instagram Scraper avatar

Instagram Scraper

Pricing

from $2.50 / 1,000 results

Go to Apify Store
Instagram Scraper

Instagram Scraper

Scrape Instagram profiles, posts, reels, stories, highlights, followers, and followings. Get comments and likers for any post, plus tagged posts. Fetch by username, user ID, or post URL — raw JSON output with full metadata, pagination support, and API-ready results for automation.

Pricing

from $2.50 / 1,000 results

Rating

0.0

(0)

Developer

Logical Variety

Logical Variety

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

0

Monthly active users

13 days ago

Last modified

Categories

Share

Fetch structured Instagram data through a single Actor. Pick an action and provide its inputs — the Actor stores the result in the dataset, one item per post, comment, user, story or highlight.

What you can fetch

ActionFetchesRequired inputOptional
userInfoUser profile / account infouserId or username—
storiesActive storiesuserId or username—
highlightsHighlight trayuserId or username—
highlightStoriesItems inside a highlighthighlightId—
postsTimeline postsuserId or usernamemaxId
reelsReelsuserId or usernamemaxId
taggedPostsTagged postsuserId or usernamemaxId
followersFollowersuserId or usernamemaxId
followingsFollowingsuserId or usernamemaxId, count
likersUsers who liked a posturl or shortcode—
commentsComments on a posturl or shortcodemaxId

Input

Provide action plus the fields it needs (see the table above). Example:

{ "action": "posts", "username": "nasa" }
{ "action": "comments", "shortcode": "C1a2b3c4d5", "maxId": "..." }

Output

Each run writes one page of results:

ResponseDatasetKey-value store
List actions (all except userInfo)one item per list element (post, reel, comment, user, story, highlight); each item has a copy of the cursor in _pageInfoPAGE_INFO record with the cursor
Empty listno itemsPAGE_INFO record is still written
userInfoone item: the profile—
Errorone item { "success": false, "message": ... }—

Example item of posts:

{
"id": "4001971394119634476",
"type": "image",
"shortcode": "DeJ28eTxo4s",
"permalink": "https://www.instagram.com/p/DeJ28eTxo4s/",
"caption": "...",
"takenAt": 1791292211,
"likeCount": 120000,
"commentCount": 900,
"media": [ { "type": "image", "url": "https://...", "thumbnailUrl": "https://..." } ],
"owner": { "userId": "528817151", "username": "nasa" },
"_pageInfo": { "hasNextPage": true, "maxId": "4002789380695323831_528817151" }
}
  • Fields are camelCase. A field that has no value is omitted (no empty strings).
  • Times (takenAt, createdAt) are Unix timestamps in seconds.
  • Other top-level fields of a list response are copied into every item with a _ prefix: stories items carry the account in _owner.
  • In Apify Console the dataset has a view (table) for every action and an Errors view (.actor/dataset_schema.json); pick the view of the action you ran. The Output tab links to the dataset items and to the PAGE_INFO record (.actor/output_schema.json).

Pagination

Paginated actions (posts, reels, taggedPosts, followers, followings, comments) return a cursor { "hasNextPage": true, "maxId": "..." }. It is stored twice:

  • in the PAGE_INFO record of the run's default key-value store;
  • in the _pageInfo field of every dataset item of that page.

To fetch the next page, run the Actor again and pass maxId as input maxId. There is no maxId when hasNextPage is false. Each run returns a single page. If a page is empty there are no items, so read the cursor from PAGE_INFO.

Run via API

curl -X POST \
"https://api.apify.com/v2/acts/<ORG>~instagram/run-sync-get-dataset-items?token=<APIFY_TOKEN>" \
-H "Content-Type: application/json" \
-d '{ "action": "posts", "username": "nasa" }'

The response is an array of dataset items — one per post. The cursor for the next page is in items[0]._pageInfo.maxId, so one request is enough per page:

curl -X POST \
"https://api.apify.com/v2/acts/<ORG>~instagram/run-sync-get-dataset-items?token=<APIFY_TOKEN>" \
-H "Content-Type: application/json" \
-d '{ "action": "posts", "username": "nasa", "maxId": "<items[0]._pageInfo.maxId>" }'

For userInfo the array has one item, the profile. An error is one item with "success": false.

Pricing

This Actor uses pay-per-event pricing — you pay only for these events, platform usage (compute) is included:

EventPrice
Result — one dataset item$2.50 per 1,000 results ($0.0025 each)
Actor start — per GB of run memory, at least one$0.001

An error is returned as one dataset item, so it counts as one result.

Notes

  • Validation happens before any network call: an unknown action or a missing required field returns a clear error.
  • Business errors (e.g. "page not found", private account) are returned as one dataset item as-is ({ "success": false, "message": ... }) and the run still succeeds, so you can handle them programmatically.