Instagram Location Scraper
Pricing
$9.99/month + usage
Instagram Location Scraper
Instagram Location Scraper extracts data from Instagram location pages: captions, media URLs, timestamps, geotags, user handles, hashtags, and engagement metrics. Ideal for local trend analysis, market research, venue monitoring, and automating location-based social data pipelines at scale for teams
Pricing
$9.99/month + usage
Rating
0.0
(0)
Developer

SimpleAPI
Actor stats
0
Bookmarked
2
Total users
1
Monthly active users
a day ago
Last modified
Categories
Share
A powerful Apify actor that scrapes Instagram posts from specific locations, extracting comprehensive post data including images, videos, captions, engagement metrics, and user information. Perfect for location-based social media analysis, competitor research, and content discovery.
Enter Instagram location URLs, usernames, or keywords to scrape posts. The actor will automatically detect the input type and convert usernames/keywords to location URLs. Configure proxy settings if needed.
๐ฌ For custom solutions or feature requests, contact us at dev.scraperengine@gmail.com
Why Choose Us?
- Intelligent Proxy Management: Automatic proxy fallback system ensures reliable data collection even when Instagram blocks requests
- Comprehensive Data Extraction: Captures all post details including media URLs, engagement metrics, user profiles, and location data
- Bulk Processing: Process multiple locations simultaneously with efficient pagination
- Production-Ready: Built with robust error handling, retry logic, and detailed logging
- Flexible Configuration: Customize sort order, item limits, and proxy settings to fit your needs
- Smart Input Detection: Automatically detects and converts URLs, usernames, or keywords to location URLs
Key Features
- โ Location-Based Scraping: Extract posts from any Instagram location page
- โ Multiple Input Types: Accepts location URLs, usernames, or keywords - automatically converts to location URLs
- โ Smart Proxy Fallback: Automatically switches from no proxy โ datacenter โ residential proxy if blocked
- โ Pagination Support: Automatically handles pagination to extract all available posts
- โ
Rich Data Extraction:
- Post metadata (ID, code, URL, creation date)
- Engagement metrics (likes, comments)
- Media content (images, videos with quality info)
- Audio/music information
- User profile data
- Location coordinates and details
- โ Sort Options: Choose between "ranked" (default) or "recent" post sorting
- โ Bulk Input Support: Process multiple location URLs, usernames, or keywords in a single run
- โ Session Authentication: Optional session ID support for authenticated requests
- โ Detailed Logging: Real-time progress updates and error reporting
- โ Structured Output: Clean JSON format ready for analysis
Input
The actor accepts the following input parameters:
Input Schema
{"startUrls": ["https://www.instagram.com/explore/locations/213131048/berlin-germany/","mrbeast","berlin"],"sortOrder": "ranked","maxComments": 0,"maxItems": 100,"sessionId": "","proxyConfiguration": {"useApifyProxy": false}}
Input Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
startUrls | Array of Strings | Yes | - | List of Instagram location URLs, usernames, or keywords. Examples: 'https://www.instagram.com/explore/locations/213131048/berlin-germany/' (URL), 'mrbeast' (username), 'berlin' (keyword). The actor automatically detects the input type and converts usernames/keywords to location URLs. |
sortOrder | String | No | "ranked" | How to sort posts. Options: "ranked" (most popular) or "recent" (newest first). |
maxComments | Integer | No | 0 | Maximum number of comments to extract per post. Set to 0 to disable comment extraction. |
maxItems | Integer | No | 100 | Maximum number of posts to extract per location. Set to 0 for unlimited (extracts all available posts). |
sessionId | String | No | "" | Instagram session ID cookie value (required for authentication). Get this from your browser cookies when logged into Instagram. Leave empty for unauthenticated requests (may have limited access). |
proxyConfiguration | Object | No | {"useApifyProxy": false} | Proxy configuration. If useApifyProxy is false, the actor starts with direct requests. If blocked, it automatically falls back to datacenter and then residential proxies. |
Example Input
{"startUrls": ["https://www.instagram.com/explore/locations/213131048/berlin-germany/","https://www.instagram.com/explore/locations/212988663/new-york-new-york/","mrbeast","paris"],"sortOrder": "recent","maxItems": 500,"maxComments": 0,"sessionId": "your_session_id_here","proxyConfiguration": {"useApifyProxy": false}}
Input Types
The actor supports three types of input in the startUrls array:
-
Location URLs: Full Instagram location page URLs
- Example:
"https://www.instagram.com/explore/locations/213131048/berlin-germany/" - Used directly without conversion
- Example:
-
Usernames: Instagram usernames (with or without @)
- Example:
"mrbeast"or"@mrbeast" - The actor searches for locations in the user's posts
- Example:
-
Keywords: Location keywords for searching
- Example:
"berlin"or"new york" - The actor searches Instagram for locations matching the keyword
- Example:
Output
The actor outputs structured JSON data for each scraped post. All results are saved to the Apify dataset and can be exported in JSON, CSV, or Excel formats.
Output Schema
Each post in the output contains the following structure:
{"type": "post","id": "3761820491792436654","code": "DQ0q85qEs2u","url": "https://www.instagram.com/p/DQ0q85qEs2u/","createdAt": "2025-11-09T10:52:49Z","likeCount": 1,"commentCount": 0,"caption": "#esmocongress2025 #berlin #dataize","isAvailable": true,"isLikeAndViewCountsDisabled": false,"isPinned": false,"isPaidPartnership": false,"isCarousel": true,"isVideo": false,"owner": {"id": "222741818","username": "sihyun_sung_photography","fullName": "","profilePicUrl": "https://instagram.fdac142-1.fna.fbcdn.net/...","isPrivate": false,"isVerified": false},"location": {"id": "1681866845218607","name": "Messe Berlin","city": "","lat": 52.503101530657,"lng": 13.272066565882},"video": null,"image": {"url": "https://scontent.cdninstagram.com/v/t51.82787-15/...","width": 1440,"height": 1440},"audio": null}
Output Fields
| Field | Type | Description |
|---|---|---|
type | String | Always "post" for post items |
id | String | Unique Instagram post ID |
code | String | Short code used in post URLs |
url | String | Full URL to the Instagram post |
createdAt | String | ISO 8601 timestamp of when the post was created |
likeCount | Integer | Number of likes on the post |
commentCount | Integer | Number of comments on the post |
caption | String | Post caption text (empty string if no caption) |
isAvailable | Boolean | Whether the post is currently available |
isLikeAndViewCountsDisabled | Boolean | Whether like/view counts are hidden |
isPinned | Boolean | Whether the post is pinned by the user |
isPaidPartnership | Boolean | Whether the post is a paid partnership |
isCarousel | Boolean | Whether the post is a carousel (multiple images/videos) |
isVideo | Boolean | Whether the post contains video content |
owner | Object | User who created the post (see Owner Object below) |
location | Object | Location information (see Location Object below) |
video | Object/null | Video details if post contains video (see Video Object below) |
image | Object/null | Image details if post contains image (see Image Object below) |
audio | Object/null | Audio/music information if available (see Audio Object below) |
Owner Object
| Field | Type | Description |
|---|---|---|
id | String | User's Instagram ID |
username | String | User's Instagram username |
fullName | String | User's full name |
profilePicUrl | String | URL to user's profile picture |
isPrivate | Boolean | Whether the account is private |
isVerified | Boolean | Whether the account is verified |
Location Object
| Field | Type | Description |
|---|---|---|
id | String | Location ID |
name | String | Location name |
city | String | City name (if available) |
lat | Float | Latitude coordinate |
lng | Float | Longitude coordinate |
Video Object
| Field | Type | Description |
|---|---|---|
id | String | Video ID |
url | String | URL to the video file |
width | Integer | Video width in pixels |
height | Integer | Video height in pixels |
duration | Float | Video duration in seconds |
Image Object
| Field | Type | Description |
|---|---|---|
url | String | URL to the image file |
width | Integer | Image width in pixels |
height | Integer | Image height in pixels |
Audio Object
| Field | Type | Description |
|---|---|---|
id | String | Audio ID |
title | String | Audio/music title |
artist | String | Artist name |
coverArt | String | URL to cover art image |
duration | Integer | Duration in milliseconds |
audioUrl | String | URL to audio file |
๐ How to Use the Actor (via Apify Console)
-
Log in to Apify: Go to https://console.apify.com and sign in to your account.
-
Find the Actor: Navigate to the Actors section and search for "Instagram Location Scraper" or find it in your actor list.
-
Configure Input:
- Click on the actor to open it
- In the INPUT tab, configure your settings:
- Add one or more Instagram location URLs, usernames, or keywords in the
startUrlsfield (as strings, not objects) - Choose your preferred
sortOrder(ranked or recent) - Set
maxItemsto limit the number of posts (or 0 for unlimited) - Optionally provide a
sessionIdfor authenticated requests - Configure proxy settings if needed (default: no proxy)
- Add one or more Instagram location URLs, usernames, or keywords in the
-
Run the Actor: Click the Start button to begin the scraping process.
-
Monitor Progress:
- Watch real-time logs in the LOG tab
- Monitor proxy fallback events and extraction progress
- Track the number of posts extracted
-
Access Results:
- Once complete, go to the OUTPUT tab
- View results in the table format
- Export data as JSON, CSV, or Excel
-
Export Data:
- Click Export button
- Choose your preferred format (JSON, CSV, or Excel)
- Download the file to your computer
Best Use Cases
- Location-Based Marketing Research: Analyze what content performs well at specific locations
- Competitor Analysis: Monitor competitor posts at key business locations
- Event Monitoring: Track posts from event venues and locations
- Tourism Insights: Understand what visitors post about specific destinations
- Brand Monitoring: Track mentions and posts at your business locations
- Content Discovery: Find trending content and influencers at specific locations
- Geographic Analytics: Analyze posting patterns and engagement by location
- Social Media Intelligence: Gather location-based social media data for research
- User Location Analysis: Extract locations from specific user profiles
Frequently Asked Questions
How do I find a location URL?
Navigate to the location page on Instagram (either through search or by clicking a location tag on a post), then copy the URL from your browser. The URL format is: https://www.instagram.com/explore/locations/[LOCATION_ID]/[location-name]/
Alternatively, you can use a location keyword (e.g., "berlin") and the actor will search for matching locations automatically.
Can I use usernames or keywords instead of URLs?
Yes! The actor accepts three types of input:
- URLs: Full Instagram location page URLs
- Usernames: Instagram usernames (e.g., "mrbeast") - the actor will extract locations from the user's posts
- Keywords: Location keywords (e.g., "berlin", "new york") - the actor will search Instagram for matching locations
How do I get a session ID?
- Log in to Instagram in your browser
- Open Developer Tools (F12)
- Go to the Application/Storage tab
- Navigate to Cookies โ https://www.instagram.com
- Find the
sessionidcookie - Copy its value and paste it into the
sessionIdfield
Note: Session IDs expire after some time. You may need to refresh it periodically.
What happens if Instagram blocks my requests?
The actor has intelligent proxy fallback:
- Starts with direct requests (no proxy) by default
- If blocked, automatically switches to datacenter proxy
- If datacenter fails, switches to residential proxy with 3 retries
- Once residential proxy works, it sticks with it for all remaining requests
- All proxy transitions are logged for transparency
Can I scrape multiple locations at once?
Yes! Simply add multiple URLs, usernames, or keywords to the startUrls array. The actor will process each input sequentially.
What's the difference between "ranked" and "recent" sort order?
- ranked: Shows posts sorted by Instagram's algorithm (most popular/relevant first)
- recent: Shows posts sorted by creation date (newest first)
How many posts can I extract?
You can set maxItems to any number, or 0 for unlimited. The actor will extract all available posts up to your limit. Note that Instagram may have limits on how many posts are available for a location.
Do I need to configure proxies?
Not necessarily. The actor starts with no proxy by default. If Instagram blocks your requests, the actor automatically falls back to proxies. However, if you expect high-volume scraping, you may want to enable Apify proxy from the start.
How long does scraping take?
Scraping time depends on:
- Number of locations/usernames/keywords
- Number of posts per location
- Instagram's response time
- Whether proxy fallback is needed
- Whether session ID is provided (authenticated requests may be faster)
Typically, 100 posts take 2-5 minutes, but this can vary.
Can I extract comments?
The maxComments parameter is available in the input schema, but comment extraction requires additional API calls that may not be fully implemented in the current version. Set it to 0 to disable.
What data format is the output?
All output is in JSON format, which can be exported as JSON, CSV, or Excel files from the Apify console.
Is the actor free to use?
Apify actors consume compute units. Check your Apify plan for pricing details. The actor is optimized to minimize compute usage through efficient pagination and request handling.
Do I need a session ID?
A session ID is optional but recommended for:
- Better access to posts (some posts may require authentication)
- More reliable keyword and username searches
- Higher rate limits
Without a session ID, the actor will still work but may have limited access to some content.
Support and Feedback
If you encounter any issues or have questions:
- Check the actor logs for detailed error messages
- Review the proxy fallback logs to understand connection issues
- Ensure your location URLs are valid and accessible
- Verify your Apify account has sufficient compute units
- Try providing a valid session ID if you're having authentication issues
๐ฌ For custom solutions or feature requests, contact us at dev.scraperengine@gmail.com
Cautions
-
Public Data Only: This actor collects data only from publicly available Instagram location pages. It does not access private accounts or password-protected content.
-
Rate Limiting: Instagram may implement rate limiting. The actor includes retry logic and proxy fallback to handle this, but very high-volume scraping may still encounter limits.
-
Session ID Security: Never share your session ID publicly. Treat it like a password. If compromised, log out of Instagram and generate a new session ID.
-
Legal Compliance: Users are responsible for ensuring their use of this actor complies with:
- Instagram's Terms of Service
- Local data protection and privacy laws (GDPR, CCPA, etc.)
- Copyright and intellectual property laws
- Any applicable regulations in your jurisdiction
-
Data Usage: Be mindful of how you use the scraped data. Respect user privacy and do not use data for spam, harassment, or other malicious purposes.
-
API Changes: Instagram may change their API structure, which could temporarily affect the actor's functionality. The actor is maintained to adapt to such changes.
Note: This actor is designed for legitimate research, analysis, and business intelligence purposes. Always use scraped data responsibly and in compliance with applicable laws and platform terms of service.