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

7

Total users

2

Monthly active users

16 days ago

Last modified

Categories

Features

Limited permissions

Share

Fetch structured Instagram data through a single Actor. Pick an action and provide its inputs — the Actor stores the result in the dataset: a list as one item per element (post, comment, user, story), a profile or a post as one item.

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
profileProfile with recent posts: userId, username, fullName, avatarUrl, isPrivate, biography, postsCount, followersCount, followingCount, postsusername—
mediaA single post: id, type, shortcode, permalink, caption, takenAt, likeCount, commentCount, media, ownerurl or shortcode—
storyA single story: story items with id, type, url, thumbnailUrl, takenAt and the account in ownerurl, or storyId and username—

Input

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

{ "action": "posts", "username": "nasa" }
{ "action": "comments", "shortcode": "C1a2b3c4d5", "maxId": "..." }
{ "action": "story", "storyId": "<id of an item from the stories action>", "username": "nasa" }

Output

ResponseDatasetKey-value store
List actions (all except userInfo, profile, media)one item per element of the listPAGE_INFO record { "pageInfo": {...} }; stories and story also have the account in owner
Empty listno itemsPAGE_INFO record
userInfo, profile, mediaone item: the profile or the post—
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" }
}
  • Fields are camelCase. A field that has no value is omitted (no empty strings).
  • Times (takenAt, createdAt) are Unix timestamps in seconds.
  • 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) write the cursor { "pageInfo": { "hasNextPage": true, "maxId": "..." } } to the PAGE_INFO record of the run's default key-value store. To fetch the next page, run the Actor again and pass pageInfo.maxId as input maxId. There is no maxId when hasNextPage is false. Each run returns a single page.

Run via API

curl -X POST \
"https://api.apify.com/v2/acts/logical_variety~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. To paginate, start the run and read the cursor from the run's key-value store:

curl -X POST \
"https://api.apify.com/v2/acts/logical_variety~instagram/runs?waitForFinish=60&token=<APIFY_TOKEN>" \
-H "Content-Type: application/json" \
-d '{ "action": "posts", "username": "nasa" }'
# items: GET https://api.apify.com/v2/datasets/<data.defaultDatasetId>/items
# cursor: GET https://api.apify.com/v2/key-value-stores/<data.defaultKeyValueStoreId>/records/PAGE_INFO

For userInfo, profile and media the item is the profile or the post. An error is one item with "success": false.

Pricing

This Actor uses pay-per-event pricing: you pay for the Actor start and for each result, platform usage (compute) is included. The prices are on the Actor's page in Apify Store.

  • A result is one dataset item with data: each post, comment, user or story of a list; the profile or the post of userInfo, profile and media.
  • Only the Actor start is charged for an error item, an empty list and a run that fails.
  • With a maximum cost per run set, the Actor stores only as many items as the limit covers: the rest of the list is not stored.

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.