# 🏯 Instagram Location Scraper (Pay Per Result) (`apidojo/instagram-location-scraper`) Actor

Instagram Location Scraper, your premier solution for harvesting data from locations on Instagram. It offers remarkable value at just $0.50 per 1000 posts, with the capability to scrape between 100-200 posts per second!

- **URL**: https://apify.com/apidojo/instagram-location-scraper.md
- **Developed by:** [API Dojo](https://apify.com/apidojo) (community)
- **Categories:** Social media, Lead generation
- **Stats:** 1,765 total users, 81 monthly users, 98.9% runs succeeded, 59 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

$0.50 / 1,000 posts

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

![](https://www.dropbox.com/scl/fi/51dqfg80r6yibmo2289m8/instagram-location-scraper.jpeg?rlkey=rwbhtcpjdxwqwqr8mzo2z6ce8\&dl=1)

## 🏯 Instagram Location Scraper: Your hawk-eye on Instagram Locations 🏯

Introducing the Instagram Location Scraper, your premier solution for harvesting data from locations on [Instagram.com](https://instagram.com). Renowned for its exceptional speed and thoroughness, this tool facilitates quick and comprehensive extraction of posts from any [Instagram.com](https://instagram.com) location. Ideal for researchers seeking in-depth data on [Instagram.com](https://instagram.com) locations or companies aiming to leverage geographical insights, the Instagram Location Scraper is the go-to resource. Additionally, it offers remarkable value at just **$0.50 per 1000 posts**, with the capability to scrape between **100-200 posts per second!**

### ℹ️ Disclaimer

We are professionals specializing in data extraction. This actor is exceptionally fine-tuned for scraping [Instagram](https://instagram.com), providing you with a comprehensive suite of tools. Moreover, we provide top-tier maintenance and exceptional support. Pure data - at your fingertips. You name it, we get it.

#### Important Note About Usage

This scraper is designed to collect posts from specific Instagram locations. Please make sure to follow these rules:

- The selected location should have **at least 10 posts** available. Using low-activity places leads to inefficient runs.
- Always set your `maxItems` value to **greater than 10** to ensure a proper data fetch.
- Scraping locations with too few posts may trigger our **rate-limiter** and can result in blocked requests.

### 🐉 Features and Functionality

- No Authentication needed. 🛡️
- Super cheap. **$0.50 per 1K results.** 💰
- No proxy needed. High flexibility, perfectly customized. 🐉
- Simple Output, extremely fast. ⚡️
- Lightning speed, extreme efficiency, and fits for all types of usage. 🚀
- Simple date filter for only including posts created on or after a date.

### 🆓 Demo Mode & Free Users

The users that are on Free Plan can use the actor only on Demo Mode. **Please keep in mind that the users that are on Free Plan can retrieve a maximum of 10 items, and cannot use the actor via API.** If you want to use this actor without any limitation, you have to subscribe to a paid plan on Apify. You can check this [link to subscribe easily](https://apify.com/pricing?fpr=yhdrb).

### 👹 Competitors

There are no direct competitors of Instagram Location Scraper. All other scrapers on the market, uses it as a functionality rather than focusing only that part. Getting this data can be tough and it always requires a special care and maintenance. Therefore, Instagram Location Scraper is one and only at the current moment.

### 🎎 Who needs this?

The Instagram Location Scraper is engineered to deliver outstanding efficiency.

- **Marketing and Advertising Professionals:** Marketers and advertisers can use location data to analyze trends, hashtags, and the popularity of products or events in specific areas. This can help them tailor their campaigns to target audiences more effectively, understand competitor activities, and identify influencers who could amplify their message.
- **Lead Generation Experts:** With detailed insights into the interests and activities of people in specific areas, Lead Generation experts can design highly targeted advertising campaigns. This ensures that marketing efforts are directed toward individuals most likely to be interested in the product or service, improving conversion rates and ROI.
- **OSINT Professionals:** OSINT professionals can use location-based data to monitor and analyze trends, events, or activities in specific areas. This can be crucial for security assessments, investigative journalism, or research. Understanding the context and sentiment in a particular location can help in piecing together information that's not readily apparent, offering insights into political movements, cultural events, or security threats.
- **Real Estate Professionals:** Real estate agents and companies can use [Instagram.com](https://instagram.com) location data to understand the popularity and perception of different neighborhoods or properties. This insight can help in marketing properties more effectively, identifying areas with high potential for investment, or even guiding clients on the most Instagrammable spots to boost their property's appeal.
- **Retail and E-commerce:** Retailers and e-commerce businesses can leverage location-based insights from [Instagram.com](https://instagram.com) to understand where their products are being used or talked about the most. This can inform decisions on where to open new stores, what products to stock more of in certain locations, and how to create localized marketing campaigns that resonate with the community's preferences.

### 🍜 Output Example

```
{
  "type": "post",
  "id": "1234567890123456789",
  "code": "ABCdefGhIjK",
  "url": "https://www.instagram.com/p/ABCdefGhIjK/",
  "createdAt": "2025-01-15T10:20:30.000Z",
  "likeCount": 123,
  "commentCount": 45,
  "caption": "Example caption text with #hashtags and @mentions.",
  "isAvailable": true,
  "isLikeAndViewCountsDisabled": false,
  "isPinned": false,
  "isPaidPartnership": false,
  "isCarousel": false,
  "isVideo": true,
  "owner": {
    "id": "9876543210",
    "username": "example_user",
    "fullName": "Example User",
    "profilePicUrl": "https://example.com/profile.jpg",
    "isPrivate": false,
    "isVerified": true
  },
  "coowners": [
    {
      "id": "9876543212",
      "username": "example_user_2",
      "fullName": "Example User_2",
      "profilePicUrl": "https://example.com/profile2.jpg",
      "isPrivate": false,
      "isVerified": true
    }
  ],
  "location": {
    "id": "555555555",
    "name": "Example Place",
    "city": "Sample City, Country",
    "lat": 40.7128,
    "lng": -74.006
  },
  "video": {
    "id": "video_12345",
    "url": "https://example.com/video.mp4",
    "width": 1080,
    "height": 1920,
    "duration": 12.34
  },
  "image": {
    "url": "https://example.com/image.jpg",
    "width": 1080,
    "height": 1350"
  },
  "audio": {
    "id": "audio_98765",
    "title": "Example Track",
    "artist": "Example Artist",
    "coverArt": "https://example.com/cover.jpg",
    "duration": 180000,
    "audioUrl": "https://example.com/audio.mp4"
  }
}
```

### 🍚 Input Parameters

| Field | Type | Description | Default value
| ----- | ---- | ----------- | -------------|
startUrls | array | [Instagram](https://instagram.com) URLs. Paste the URLs and get the results immediately. Location URLs are supported. | `[]` |
locationIds | array | [Instagram](https://instagram.com) Location IDs. You can find the IDs from the location links. ID for `https://www.instagram.com/explore/locations/213131048/berlin-germany/` would be `213131048`. | `[]` |
maxItems | number | Maximum number of items that you want to receive as output | `Infinity` |
until | date | Date filter. Only include posts created on or after this date. | `"2025-01-01"` |
customMapFunction | String | Function that takes each of the objects as argument and returns data that will be mapped by the function itself. This function is not intended for filtering, please don't use it for filtering purposes or you will get banned automatically. | `null` |

### 🔧 Troubleshooting

- **Getting Few Results?** Check "Maximum number of items on output" (`maxItems`) field, and "Maximum charged results" fields. These two fields enable you to handle the total number of results. Leaving both empty will result infinite results.
- **Are Some Outputs Missing?** Ensure that you review all fields, not just the overview. You can navigate to the "Storage" tab and select either "Download the results" or "Open in a New Tab."
- **Getting No Results?** Confirm that your parameters are not overly restrictive.
- **Not Receiving New Items After a Large Batch?** Examine the log for messages like "Logging is too fast, some lines were skipped." If you encounter this issue, consider scraping smaller amounts of data to avoid it.

### 📞 Contact and Feature Requests

If you need any sort of support, please send an email to <apidojo10@gmail.com>. You name it, we get it.

### 🈴 Other Actors you might want to check

- [Twitter Scraper Lite](https://apify.com/apidojo/twitter-scraper-lite?fpr=yhdrb)
- [Instagram Scraper](https://apify.com/apidojo/instagram-scraper?fpr=yhdrb)
- [Instagram Comments Scraper](https://apify.com/apidojo/instagram-comments-scraper?fpr=yhdrb)
- [Tweet Scraper](https://apify.com/apidojo/tweet-scraper?fpr=yhdrb)
- [Twitter User Scraper](https://apify.com/apidojo/twitter-user-scraper?fpr=yhdrb)
- [TikTok User Scraper](https://apify.com/apidojo/tiktok-user-scraper?fpr=yhdrb)

# Actor input Schema

## `startUrls` (type: `array`):

Instagram location URLs. Paste the URLs, and get the results immediately. Location URLs are supported.

## `locationIds` (type: `array`):

Instagram Location IDs that you want to get from Instagram

## `maxItems` (type: `integer`):

Maximum number of items that you want as output.

## `until` (type: `string`):

Only include posts created on or after this date.

## `customMapFunction` (type: `string`):

Function that takes each of the objects as argument and returns data that will be mapped by the function itself. This function is not intended for filtering, please don't use it for filtering purposes or you will get banned automatically.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.instagram.com/explore/locations/213131048/berlin-germany/"
  ],
  "locationIds": [
    "213385402"
  ],
  "maxItems": 1000,
  "until": "2025-01-01",
  "customMapFunction": "(object) => { return {...object} }"
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "startUrls": [
        "https://www.instagram.com/explore/locations/213131048/berlin-germany/"
    ],
    "locationIds": [
        "213385402"
    ],
    "maxItems": 1000,
    "until": "2025-01-01",
    "customMapFunction": (object) => { return {...object} }
};

// Run the Actor and wait for it to finish
const run = await client.actor("apidojo/instagram-location-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "startUrls": ["https://www.instagram.com/explore/locations/213131048/berlin-germany/"],
    "locationIds": ["213385402"],
    "maxItems": 1000,
    "until": "2025-01-01",
    "customMapFunction": "(object) => { return {...object} }",
}

# Run the Actor and wait for it to finish
run = client.actor("apidojo/instagram-location-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrls": [
    "https://www.instagram.com/explore/locations/213131048/berlin-germany/"
  ],
  "locationIds": [
    "213385402"
  ],
  "maxItems": 1000,
  "until": "2025-01-01",
  "customMapFunction": "(object) => { return {...object} }"
}' |
apify call apidojo/instagram-location-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=apidojo/instagram-location-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/KGXfArqc140ssBfl0/builds/y0PbqaGxsMGBYf7fp/openapi.json
