Instagram Location Scraper & Comments
Pricing
from $4.99 / 1,000 results
Instagram Location Scraper & Comments
Instagram Location Scraper extracts posts from any Instagram location page. Collect captions, media, hashtags, timestamps, and engagement metrics. Ideal for local research, trend tracking, audience insights, and workflows needing structured location-based Instagram data.
Pricing
from $4.99 / 1,000 results
Rating
0.0
(0)
Developer
API Empire
Maintained by CommunityActor stats
1
Bookmarked
51
Total users
1
Monthly active users
12 days ago
Last modified
Categories
Share
Instagram Location Scraper — Extract Posts, Comments & Media
Instagram Location Scraper & Comments pulls public posts tagged to any Instagram location — paste a location URL, an @username, or a place keyword — then enriches every post with its real comment thread: text, author, like count, timestamp, and optional threaded replies. Output is typed, normalized JSON: post metadata, owner profile, location data, video/image/audio details, and nested comments in one row, no HTML and no selectors. Filter by date, cap comments per post, and every field lands ready for a spreadsheet, a database, or an LLM context window.
What is Instagram Location Scraper & Comments?
Instagram Location Scraper & Comments is an Apify Actor that collects Instagram posts tagged to a specific location — a landmark, city, venue, or any tagged place — and attaches each post's real comment thread in the same run. Give it a location URL, an Instagram username (its posts' tagged locations are used to find places), or a place keyword, and it returns structured post rows enriched with comments, replies, owner details, and media metadata.
Instagram gates both location feeds and comments behind a login wall, so this Actor needs a valid Instagram sessionid cookie to return data reliably. Without one, the source code raises an explicit authentication error rather than returning a silent empty result.
- 📍 Scrape posts tagged to any Instagram location, username, or place keyword
- 💬 Fetch each post's real comments — text, author, likes, timestamp
- ↪️ Optionally pull threaded replies under each comment (up to 20 per comment)
- 🗓️ Filter posts by an absolute or relative date window
- 📤 Export as JSON, CSV, or Excel — or read results through the Apify API
📍 What data does Instagram Location Scraper & Comments collect?
Every run returns three layers of data on the same row: the post itself, its real comment thread, and the owner/location context each post carries.
| Data Type | Key Fields | JSON Field Names |
|---|---|---|
| Location posts | Caption, like/comment counts, media type, timestamp | caption, likeCount, commentCount, isVideo, isCarousel, createdAt |
| Comments & replies | Comment text, author, like count, timestamp, reply thread | comments[].text, comments[].user, comments[].commentLikeCount, comments[].replies |
| Post owner & location | Poster identity, tagged place name, coordinates | owner.username, owner.isVerified, location.name, location.lat, location.lng |
| Post media | Highest-resolution video, image, and audio metadata per post | video, image, audio |
Need more Instagram data?
If you need account-level data instead of location-tagged posts, API Empire's catalogue covers other angles on the same platform: Instagram Hashtag Content Planner for hashtag-driven content discovery, Instagram Profile Bio & Contact Extractor for outreach-ready profile fields, Instagram Comment Moderation Scraper for flagging comment content at scale, and Instagram Mention Sentiment Analyzer for tracking how a brand is discussed outside of a specific location. Pick the Actor that matches how you're discovering posts — by place, by hashtag, by account, or by mention.
How does Instagram Location Scraper & Comments differ from the official Instagram API?
Instagram's official Graph API does not expose a location-search or public post-by-location endpoint at all — it only returns data tied to Instagram professional accounts that you or your app manage — while Instagram Location Scraper & Comments returns public posts tagged to any location, username, or keyword you point it at.
| Feature | Instagram Graph API | Instagram Location Scraper & Comments |
|---|---|---|
| Location-based post discovery | Not available — no public location-search endpoint | Any location URL, @username, or place keyword |
| Account scope | Only Instagram professional accounts you or your app manage | Any public post visible on the location page |
| Comment access | Only comments on media owned by a managed account | Comments (and optional replies) on posts discovered by location |
| Approval process | Requires Meta App Review and business verification for most permissions | No approval process — provide a session cookie and run |
| Setup time | App creation, permission requests, review queue | Minutes — set input, click start |
| Output consistency | Raw Graph API JSON on Meta's own versioned schema | One normalized JSON row per post, stable field names across runs |
The Graph API is the right choice if you manage the Instagram account yourself and only need your own content within Meta's terms of use. Instagram Location Scraper & Comments is the practical option when you need public posts tied to a place — a store, a venue, an event — that you don't have a managed account for.
Why do developers and teams scrape Instagram locations?
Location-tagged Instagram data serves distinct needs depending on who's pulling it — from grounding data for an AI agent to a brand team checking what customers are saying about a specific venue. The audiences below are the ones that actually route Instagram location and comment data through Apify.
For AI engineers and agent builders
An agent that answers "what are people saying about this venue on Instagram this week" needs real location posts and real comment text as tool output, not scraped HTML. Feeding caption, owner.username, and comments[].text from posts under a location URL into a RAG index lets an agent ground answers in actual recent posts and comments instead of a stale training-data snapshot. dateFilterType: "relative" with a short relativeValue window keeps an index current without re-indexing the entire location history on every run.
For marketers and brand teams
A brand launching a pop-up or monitoring a retail location can pull every post tagged to that venue, then read the real comment thread under each one — not just the caption — to see what customers actually said. likeCount, commentCount, and each comment's own commentLikeCount surface which posts and which specific comments are driving reaction, useful for deciding what to boost, address, or escalate to support. Setting dateFilterType: "absolute" around a launch window isolates only the posts from that campaign.
For researchers and analysts
Academic and market researchers studying how a physical place shows up in public discourse — a protest site, a tourist landmark, a disaster area — can pull every publicly tagged post and its comment thread for a defined date window without touching anything the poster or commenter hasn't already made public. absoluteStartDate/absoluteEndDate bound a study to an exact event window, and owner.isVerified plus comments[].user.isVerified help separate verified accounts from anonymous ones in a sample.
For developers building data products
A location-intelligence product or a scheduled monitoring dashboard can run this Actor on an Apify schedule against a fixed list of venue or city location URLs, storing each run's dataset for trend comparison over time. Because every row uses the same field names run over run, a pipeline built once against caption, location, and comments keeps working without a parsing rewrite each time the underlying posts change.
🧭 How to scrape Instagram locations and comments (step by step)
- Open Instagram Location Scraper & Comments on the Apify Store — or find it under your account's Actors if you've already added it — and click Try for free.
- Add one or more location URLs,
@usernames, or place keywords tostartUrls— this is the only required input. - Paste your Instagram
sessionidcookie value intosessionId. It's required in practice: both location posts and comments sit behind Instagram's login wall. - Set
maxItems,commentsPerPost,includeReplies, and the date filter to match how much data you want, then click Start. - Download results as JSON, CSV, or Excel from the Storage tab, or read the dataset straight through the Apify API.
What to do when Instagram changes its structure
Instagram's internal GraphQL query IDs and comment doc_ids change without notice. The Actor is maintained against those changes, and the output schema — field names and types — stays stable, so an existing integration keeps working through a maintenance update instead of needing a rewrite.
⬇️ Input
Instagram Location Scraper & Comments reads its configuration from a single JSON object, defined in .actor/actor.json. startUrls is the only required field; everything else has a default.
| Parameter | Required | Type | Description | Example Value |
|---|---|---|---|---|
startUrls | Yes | array of strings | Instagram location page URLs, @usernames (their posts' tagged locations), or place keywords. | ["https://www.instagram.com/explore/locations/213131048/berlin-germany/"] |
maxItems | No | integer — default 20, min 0 | How many location posts to collect before stopping. 0 = no limit. | 20 |
sessionId | No (required in practice) | string, secret | Your logged-in Instagram sessionid cookie value. Location posts and comments are behind Instagram's login wall. | "58012345%3AabCDefGhIjKlMnOpQr%3A25%3AAYc..." |
includeComments | No | boolean — default true | When on, each post row is enriched with its real comments. Turn off to only collect posts. | true |
commentsPerPost | No | integer — default 30, min 0 | Upper bound on comments fetched per post (most-popular first). 0 skips comment fetching entirely. | 30 |
includeReplies | No | boolean — default false | Also fetch threaded replies under each comment (up to 20 per comment). Adds requests and block risk. | false |
proxyConfiguration | No | object | Apify Proxy settings. | {"useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"]} |
dateFilterType | No | string, enum absolute / relative — default relative | Filter collected posts by creation date using a relative window or an absolute date range. | "relative" |
absoluteStartDate | No | string — default "", pattern YYYY-MM-DD or empty | Earliest post date. Used when dateFilterType is absolute. | "2026-01-01" |
absoluteEndDate | No | string — default "", pattern YYYY-MM-DD or empty | Latest post date. Leave empty for today. Used when dateFilterType is absolute. | "2026-07-25" |
relativeValue | No | integer — default 0, min 0 | Number of time units for the relative window (e.g. 7). 0 disables the filter. | 7 |
relativeUnit | No | string, enum days / weeks / months / years — default days | Time unit for the relative window. | "days" |
includeEngagement | No | boolean — default true | Include like and comment counts on each post row. | true |
includeVideoMetadata | No | boolean — default true | Include video details (url, dimensions, duration) on video posts. | true |
Note on
includeEngagementandincludeVideoMetadata: both are accepted inputs with real titles and descriptions in the input form, but as of this build neither is read anywhere in the extraction code. Like/comment counts and video metadata are written to every row regardless of how these two toggles are set — turning them off does not currently remove anything from the output. Documented here as-is, per the actual schema, so you know not to rely on them to shrink your rows.
Example input
{"startUrls": ["https://www.instagram.com/explore/locations/213131048/berlin-germany/","@nasa"],"maxItems": 20,"sessionId": "58012345%3AabCDefGhIjKlMnOpQr%3A25%3AAYc...","includeComments": true,"commentsPerPost": 30,"includeReplies": false,"proxyConfiguration": {"useApifyProxy": true,"apifyProxyGroups": ["RESIDENTIAL"]},"dateFilterType": "relative","absoluteStartDate": "","absoluteEndDate": "","relativeValue": 7,"relativeUnit": "days","includeEngagement": true,"includeVideoMetadata": true}
Common pitfall: the most frequent cause of an empty run is a missing or expired sessionId — Instagram's location feed and comment endpoints redirect anonymous or stale-session requests to a login page instead of returning data. A second, less obvious one: automatic fallback to a residential proxy on a block only has a proxy to fall back to when proxyConfiguration.useApifyProxy is turned on. Leaving proxy configuration at its default means a blocked location is skipped rather than retried on a different IP.
⬆️ Output
Every result is one dataset row per Instagram post, already typed and normalized — no HTML, no selectors to write. Export as JSON, CSV, Excel, or XML from the Storage tab's Export menu, or read the dataset through the Apify API. The dataset's default view surfaces all 21 top-level fields the Actor writes to every row — there is nothing hidden beyond what's documented below.
Scraped location post
{"type": "post","id": "3477912345678901234","code": "C2xR9pLoQoF","url": "https://www.instagram.com/p/C2xR9pLoQoF/","createdAt": "2026-07-18T14:32:07Z","likeCount": 842,"commentCount": 37,"caption": "Sunset over the Spree tonight #berlin","isAvailable": true,"isLikeAndViewCountsDisabled": false,"isPinned": false,"isPaidPartnership": false,"isCarousel": false,"isVideo": false,"owner": {"id": "48219034521","username": "berlin.explorer","fullName": "Berlin Explorer","profilePicUrl": "https://scontent.cdninstagram.com/v/t51.2885-19/owner.jpg","isPrivate": false,"isVerified": false},"location": {"id": "213131048","name": "Berlin, Germany","city": "Berlin","lat": 52.520008,"lng": 13.404954},"video": null,"image": {"url": "https://scontent.cdninstagram.com/v/t51.2885-15/post.jpg","width": 1080,"height": 1350},"audio": null,"commentsFetched": 2,"comments": [{"pk": "17998812340056789","text": "This view never gets old","user": {"pk": "5192834701","username": "travel_with_mia","fullName": "Mia","isVerified": false,"profilePicUrl": "https://scontent.cdninstagram.com/v/t51.2885-19/mia.jpg"},"commentLikeCount": 14,"createdAt": "2026-07-18T15:02:41Z","childCommentCount": 1,"didReportAsSpam": false,"replies": [{"pk": "17998812340099001","text": "Right? Been here three times this summer","user": {"pk": "48219034521","username": "berlin.explorer","fullName": "Berlin Explorer","isVerified": false,"profilePicUrl": "https://scontent.cdninstagram.com/v/t51.2885-19/owner.jpg"},"commentLikeCount": 2,"createdAt": "2026-07-18T15:10:03Z"}]},{"pk": "17998812340077654","text": "Which bridge is this?","user": {"pk": "9012384756","username": "erik.k","fullName": "Erik K.","isVerified": false,"profilePicUrl": "https://scontent.cdninstagram.com/v/t51.2885-19/erik.jpg"},"commentLikeCount": 0,"createdAt": "2026-07-18T16:45:12Z","childCommentCount": 0,"didReportAsSpam": false,"replies": []}]}
owner, location, video, image, and audio are written as null — not omitted — when a post has no owner data, no tagged location on that node, or no media of that type, so a downstream consumer never needs a presence check. isAvailable is written as true on every row in the current build; there is no code path that marks a post unavailable, so treat it as informational rather than a live availability check. Comment and reply createdAt values are converted to UTC before the Z suffix is added; post createdAt is derived from Instagram's taken_at timestamp the same way, and on Apify's UTC-based infrastructure both match wall-clock UTC in practice.
replies[] on a comment is populated only when includeReplies is true and that comment has replies; otherwise it is an empty array, and childCommentCount still reports Instagram's real reply count even when replies aren't fetched.
How does Instagram Location Scraper & Comments work?
Instagram renders its location feed and comment threads through its own internal web GraphQL endpoints — the same ones instagram.com itself calls in a browser, not a published public API. Instagram Location Scraper & Comments talks to those endpoints directly, the way the website does.
For a location URL, the Actor first extracts the numeric location ID from the URL, then loads the location page's HTML once to pull two things out of Instagram's own bundled JavaScript: a CSRF token and a GraphQL doc_id for the location-feed query (matched with a regex against Instagram's static.cdninstagram.com script bundles). Every subsequent page of posts for that location is then a direct POST to instagram.com/graphql/query using that doc_id, paginated 12 posts per request until Instagram's has_next_page flag turns false or maxItems is reached.
Comments use a separate, one-time lookup rather than a per-post one: the Actor loads a single post page from the batch just fetched, scans its script bundles for the comment and (if includeReplies is on) reply GraphQL doc_ids, and caches both for the rest of the run — so that lookup happens at most once per run, not once per post. From there, each post's comments are fetched through Instagram's comments connection, sorted by Instagram's own "popular" order, in pages of up to 50, until commentsPerPost is reached. Replies use the sibling child-comments connection the same way, capped at 20 per comment.
Both the location feed and the comment fetch keep working from partial data rather than failing outright: Instagram commonly returns a handful of non-fatal per-field "execution error" entries on an otherwise-successful location response (fields that need extra permissions the request doesn't have), and the Actor only treats a response as fatal when no usable post edges came back at all — a partial field error doesn't cost you the whole page.
Proxy use follows the same escalate-rather-than-fail instinct. Requests start however proxyConfiguration says to start (no proxy by default). A block response — HTTP 403, 429, 503, or an error message containing "blocked", "forbidden", "rate limit", or "too many requests" — steps the run from no proxy to an Apify datacenter proxy, then to a residential proxy, retrying the failed request on the new proxy each time it steps up. Once a residential proxy succeeds, the Actor sticks with it for the rest of the run instead of requesting a fresh IP on every retry, and residential retries are capped at three attempts before the Actor gives up on that particular location and moves on.
How does Instagram Location Scraper & Comments compare to other Instagram scrapers?
| Feature | Instagram Location Scraper & Comments | Generic alternative |
|---|---|---|
| Discovery input | Location URL, @username, or place keyword | apify/instagram-comment-scraper and louisdeconinck/instagram-comments-scraper both start from a single Instagram post URL — checked on their Apify Store listings, 2026-07-25 |
| Posts + comments in one run | Yes — location posts and their comment threads land in a single dataset row | apify/export-instagram-comments-posts combines posts and comments from a profile, but its own listing states the run triggers two additional Actors with their own separate charges — checked 2026-07-25 |
| Threaded replies | Optional, up to 20 per comment, toggled with includeReplies | apify/instagram-comment-scraper documents its own includeReplies option for reply extraction — checked 2026-07-25 |
| Date filtering on posts | Built-in relative or absolute window via dateFilterType | Not documented on any of the three comment-focused listings reviewed |
| Login requirement | Requires an Instagram sessionId cookie | apify/instagram-comment-scraper and louisdeconinck/instagram-comments-scraper both advertise no login requirement on their listings — checked 2026-07-25 |
| Location metadata on the row | location.name, location.city, location.lat, location.lng on every post | Not part of any of the three reviewed listings' documented output — checked 2026-07-25 |
If you're building an AI agent or RAG pipeline, the output format row is the decision-maker — parsing HTML inside an agent loop is a reliability failure mode, not a feature. For location-first discovery specifically, the discovery-input row matters just as much: a post-URL-only scraper can't find posts by place at all, no matter how good its comment extraction is.
How many results can you scrape with Instagram Location Scraper & Comments?
There is no hard cap in the Actor itself beyond what you set. maxItems defaults to 20 posts per run and accepts 0 for unlimited — the Actor pages through Instagram's location feed 12 posts per GraphQL request until either maxItems is reached or Instagram reports no further pages. Every entry in startUrls is processed in turn, and maxItems is a running total across all of them, not a per-entry figure.
Comments are capped independently by commentsPerPost (default 30, minimum 0), fetched in batches of up to 50 per GraphQL request, most-popular first. Threaded replies are capped at 20 per comment — a fixed limit in the code, not currently exposed as an input. Beyond those settings, how far a run gets depends on Instagram's own pagination and blocking behavior; no benchmark run count is published here.
Integrate Instagram Location Scraper & Comments and automate your workflow
Instagram Location Scraper & Comments works with any language or tool that can send an HTTP request.
REST API integration
from apify_client import ApifyClientclient = ApifyClient("<YOUR_APIFY_TOKEN>")run = client.actor("<YOUR_USERNAME>/instagram-location-scraper-comments").call(run_input={"startUrls": ["https://www.instagram.com/explore/locations/213131048/berlin-germany/"],"maxItems": 20,"sessionId": "<YOUR_INSTAGRAM_SESSIONID>","includeComments": True,"commentsPerPost": 30,})for post in client.dataset(run["defaultDatasetId"]).iterate_items():print(post["code"], post["likeCount"], post["commentsFetched"])
Works in Python, Node.js, Go, Ruby, cURL.
MCP for AI agents
Apify publishes an Actors MCP Server that exposes any Actor — including this one — as a callable tool. Point a compatible MCP client (Claude Desktop, Cursor, LibreChat) at it with your Apify token, then call the Actor by its <YOUR_USERNAME>/instagram-location-scraper-comments identifier. See the Actor's API → MCP tab in Apify Console for the exact connection command for your client.
Automation platforms (n8n, Make, LangChain)
In n8n, use the official Apify node — or an HTTP Request node against the Apify run endpoint — with the same JSON input shown above. In Make, use the Apify app's Run Actor module and map the dataset output straight into a Google Sheets or Airtable step. In LangChain, langchain_community.utilities.ApifyWrapper can call this Actor directly and load the returned posts as Documents for a retrieval chain.
Is it legal to scrape Instagram locations and comments?
Scraping Instagram comments, usernames, and profile pictures involves personal data, so GDPR (in the EU) and CCPA (in California) govern how you store and use the results, not just how you collect them. Instagram Location Scraper & Comments returns only what your sessionId account can already see through Instagram's own web interface — no private accounts, no content beyond what your session already unlocks, nothing pulled from behind a paywall or an inquiry form. Consult legal counsel for commercial use cases involving bulk personal data, particularly before storing comment authors' usernames or profile pictures at scale or for extended periods.
❓ Frequently asked questions
Does Instagram Location Scraper & Comments work without an Instagram account?
Not reliably. The Actor's own request code raises an explicit authentication error when no sessionId is supplied, and Instagram's location and comment endpoints redirect anonymous requests to a login page. Provide a logged-in sessionid cookie value in the sessionId input for consistent results.
How often is the scraped data updated?
Every run performs a live fetch against Instagram's current location and comment endpoints — nothing is cached or replayed from a previous run. What you get back reflects what Instagram serves at the moment the Actor runs.
What happens if a location has no posts, or a post's comments come back empty?
If a location page returns no post edges, the Actor logs it and moves on to the next input — no rows for that location. Per post, comments are skipped entirely (not attempted) when Instagram's own commentCount on that post is 0, and if the one-time comment/reply "doc_id" lookup fails (invalid session, or Instagram changed its bundle), comment fetching is disabled for the rest of the run. In both cases the post row is still pushed, with comments: [] and commentsFetched: 0 — you get an empty comment list, not a missing row.
Can I scrape private or login-restricted Instagram content?
No. The Actor returns only what your sessionId account can see through Instagram's normal web interface — the same posts, locations, and comments a logged-in user browsing that page would see. It does not access private accounts you don't already have visibility into.
How is Instagram Location Scraper & Comments priced?
The Actor runs on Apify's pay-per-event model and charges the row_result event once for each post pushed to the dataset — there are no separate uncharged accounting or error rows, so your dataset item count matches your billed row count exactly. Check the Actor's Pricing tab on Apify for the current rate. A post row is still charged even if comment enrichment for that post comes back empty — see the question above.
Does Instagram Location Scraper & Comments work for AI agent workflows and LLM pipelines?
Yes. It's callable as a standard HTTP endpoint through the Apify API, so any agent framework that can send a request — LangChain, CrewAI, a custom tool definition — can trigger a run and read back typed JSON, with no parsing step before it reaches an LLM context window.
How does Instagram Location Scraper & Comments handle Instagram's anti-bot system?
Requests start with no proxy by default, matching your proxyConfiguration input. When Instagram responds with a block signal — HTTP 403, 429, 503, or an error message containing "blocked", "forbidden", "rate limit", or "too many requests" — the Actor escalates from no proxy to an Apify datacenter proxy, then to a residential proxy, and retries the failed request on the new proxy. Once a residential proxy succeeds, it's kept ("sticky") for the rest of the run instead of rotating away from a working IP. This escalation only has a proxy to escalate to when proxyConfiguration.useApifyProxy is turned on in the input.
How does Instagram Location Scraper & Comments compare to other Instagram scrapers?
Checked on the Apify Store, 2026-07-25: apify/instagram-comment-scraper and louisdeconinck/instagram-comments-scraper both start from a single post URL and advertise no login requirement, but neither discovers posts by location. apify/export-instagram-comments-posts covers posts and comments together but starts from a profile, and its own listing states running it triggers two additional Actors' separate pay-per-event charges. Instagram Location Scraper & Comments is location-first: it discovers posts tied to a place, then attaches comments and replies to each one in a single dataset row and a single Actor charge.
Does Instagram Location Scraper & Comments return data in a format LLMs can use directly?
Yes. Every row is typed, normalized JSON with stable field names — no HTML, no selectors. Pass a row directly into an LLM context window, index it into a vector store, or hand it to an agent tool.
Can I use Instagram Location Scraper & Comments without managing proxies?
Yes, for direct requests — the Actor works with no proxy configured at all. If you want the automatic block-fallback described above to actually reach a residential IP instead of skipping the blocked location, turn on proxyConfiguration.useApifyProxy; Apify then handles proxy creation, rotation, and the datacenter-to-residential escalation for you.
What happens when Instagram changes its structure or blocks the scraper?
The scraper is maintained, and the output schema is designed to stay stable — field names and types don't change on your end even when Instagram's internal GraphQL query IDs or page structure shift. No specific turnaround time is promised for any given change.
What's the difference between comments and replies in the output?
comments is the top-level array on each post row — every top-level comment Instagram returns for that post, up to commentsPerPost. Each comment object carries its own nested replies array, which is only populated when includeReplies is true and Instagram's child_comment_count for that comment is greater than zero; otherwise replies is an empty array. Replies are capped at 20 per comment regardless of how high commentsPerPost is set, since that cap is fixed in the Actor rather than exposed as an input.
💬 Your feedback
Found a bug, or a field Instagram exposes that isn't in the output? We want to know. Open an issue on this Actor's Issues tab in Apify Console with a sample location URL and a run ID — reports with both are the fastest to act on.