Instagram Hashtag Scraper
lantfly/instagram-hashtag-scraper
Recent posts and reels for Instagram hashtags and public profiles.
Run this actor in the dashboard
1475 runs quality score 70.15/100 social-media updated 2026-11-16
Price
Pay per event, on top of the compute the run uses.
| Event | What it is | USD each |
|---|---|---|
result_itemResult item |
0.0025 |
Input
| Field | Type | Default | What it is |
|---|---|---|---|
hashtagsHashtags |
array | [] | Without the #. |
postUrlsPost URLs |
array | [] | Post or reel URLs (`/p/…`, `/reel/…`): one item each with fresh counts. Deleted or private posts give a NOT_FOUND error item. |
profilesProfiles |
array | [] | Usernames, @handles or profile URLs of public accounts: their own recent posts. |
usernamesUsernames (legacy) |
array | [] | Same as Profiles (`apify~instagram-scraper` name). |
directUrlsDirect URLs (legacy) |
array | [] | Profile or post URLs (`apify~instagram-scraper` name): profiles go to Profiles, posts to Post URLs. |
strategiesStrategies |
array | Optional: which ways to try, in order (names or kinds; `*` = the rest in the default order). Default: web-api, embedded-json, browser, browser-firefox, instaloader (profiles, posts), ytdlp (reels/videos), then official-api/vendor sources when configured. Example: ["instaloader", "*"]. | |
commentUrlsComment URLs |
array | [] | Post URLs whose comments to read: one target `comments:<url>` each, rows with `kind: "comment"` in the `apify~instagram-comment-scraper` shape. |
graphqlDocIdGraphQL doc_id (posts) |
string | Optional: doc_id of instagram.com's post-by-shortcode query, used only when a post page has no embedded data. It changes with Instagram's web app; leave empty if unknown. | |
resultsLimitResults per hashtag or profile |
integer | 20 | |
commentsPerPostComments per post |
integer | 50 | Most comments read per comment URL (top-level comments, newest first where the platform allows). |
maxRequestRetriesMax request retries |
integer | 3 | Retries per target on a new exit IP after a block, rate limit or network error. |
proxyConfigurationProxy |
object | {"groups":["RESIDENTIAL"],"country":"VN","useLantflyProxy":true} | |
graphqlTimelineDocIdGraphQL doc_id (profile timeline) |
string | Optional: doc_id of instagram.com's logged-out user-timeline query, tried for profiles when web_profile_info refuses. Default: the last known one; empty string turns it off. |
Sample input
{
"hashtags": [
"velyniq"
],
"resultsLimit": 20
}
README
Instagram Hashtag Scraper
Comments (best effort, logged out): commentUrls + commentsPerPost give rows with kind: comment in the apify~instagram-comment-scraper shape (id, text, ownerUsername, timestamp, likesCount, repliesCount, postUrl) from the post page's embedded data or its comment calls, then Apify.
Output items follow apify~instagram-hashtag-scraper: id, shortCode, type (Image|Video|Sidecar), productType, url, caption, hashtags, ownerUsername, ownerFullName, displayUrl, images, videoDuration, videoPlayCount, likesCount, commentsCount, timestamp.
Profiles (profiles, or usernames/directUrls as in apify~instagram-scraper) give the account's own posts with inputUrl and ownerProfilePicUrl. postUrls (post or reel URLs) give one item per post with inputUrl. Each hashtag, profile and post is a target in OUTPUT: a private or missing one is private/not_found, a login wall or rate limit after every retry is blocked (LOGIN_REQUIRED/RATE_LIMITED), an unknown payload is SCHEMA_CHANGED.
Each target goes through a chain of strategies until one answers: web-api (the public page for cookies, then the web API it calls, Chrome TLS), embedded-json (the page's embedded data), browser and browser-firefox (logged-out Playwright reading the page's own JSON calls; the login dialog is closed, never filled), instaloader (anonymous; profiles and posts), ytdlp (reels/videos), then official-API/vendor sources when configured. A hashtag or profile cut short is filled by the next strategy; OUTPUT names the strategy of each answer and every attempt. Refusals retry on a new exit IP. Needs RESIDENTIAL VN or MOBILE-VN proxies. Hashtags are the least reliable source: Instagram shows them to logged-out visitors only from some IPs.
Issues
0 open issues0 closed issues
What people reported and what the author answered is not published: sign in to read the reports or open one.
Reviews
No published review yet.