# Instagram Location Scraper - Places, Coordinates and Posts (`s-r/instagram-location-scraper`) Actor

Turn an Instagram location ID or location URL into structured place data: name, city, street, coordinates, total post count and recent post shortcodes. No login required.

- **URL**: https://apify.com/s-r/instagram-location-scraper.md
- **Developed by:** [SR](https://apify.com/s-r) (community)
- **Categories:** Social media, Marketing
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 location returneds

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

## Instagram Location Scraper - Places, Coordinates and Posts

Turn an Instagram location ID or URL into structured place data: name, city, street, coordinates and post counts. No login, no cookies and no API key: the actor reads Instagram's public surface directly.

This is a single-purpose instagram location scraper. It does one thing, takes one input and returns one clean row per location.

### What you get

- `location_name`, `city`, `city_name` and `street` - the place as Instagram records it
- `lat`, `lng`, `latitude`, `longitude` - coordinates for mapping and joins
- `media_count` - total posts tagged at the location, the popularity signal
- `recent_post_count` and `recent_post_shortcodes` - a sample of what is being posted there now
- `location_id` and `url` - the canonical id and public URL for joining back

### Why scrape this from Instagram

Instagram location pages are a geographic dataset hiding in plain sight. Every venue that has ever been tagged has a page with coordinates and a running post count, which together make a decent proxy for foot traffic and cultural relevance. None of it is exposed through an API, and the pages are built for browsing rather than extraction.

This actor accepts either a bare location ID or a full location URL, detects which you gave it, and returns the page as a row. Coordinates come back as numbers, so the output joins directly against your own venue list or drops into a mapping tool without cleanup.

### Input

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `search` | array | yes | `['213385402']` | Instagram location IDs or full location URLs, one per line. |

### Output

One row per location.

| Field | Description |
|---|---|
| `location_id` | Instagram numeric location id |
| `location_name` | Place name as Instagram shows it |
| `city` | City the place sits in |
| `city_name` | City name as Instagram reports it |
| `street` | Street address when published |
| `lat` | Latitude |
| `lng` | Longitude |
| `latitude` | Latitude as returned upstream |
| `longitude` | Longitude as returned upstream |
| `media_count` | Total posts tagged at this location |
| `recent_post_count` | Recent posts sampled |
| `recent_post_shortcodes` | Shortcodes of the recent posts |
| `url` | Public Instagram URL for this record |
| `record_type` | Which kind of row this is |

### Use cases

**Retail and hospitality site analysis.** Pull `media_count` for a set of candidate locations and compare. A venue with a high tagged-post count relative to its neighbours has organic visibility that does not show up in footfall data, which matters when the decision is between two addresses on the same street.

**Tourism and destination research.** Location pages reveal which spots visitors actually tag, which frequently differs from the official attraction list. Coordinates plus post counts turn that into a heat map of where attention concentrates in a city.

**Competitive venue benchmarking.** Track your own location against nearby competitors over time. Because `media_count` is cumulative, sampling it on a schedule gives you a growth rate rather than a single reading, and the rate is the interesting number.

**Enriching a venue database.** If you already hold a list of Instagram location IDs, this fills in name, city, street and coordinates in one pass. Useful for cleaning a venue table where addresses were entered by hand and coordinates are missing.

### How it compares

There is no Apify-official Instagram location actor. The largest third-party listing in the category sits around 1.37 million lifetime runs, so there is real demand here, but no platform-owned incumbent setting the price.

### Pricing

$0.0020 per location returned, which is $2.00 per 1,000 rows. All pricing is pay-per-event - you only pay for results you receive. No actor-start fee, no per-compute-unit charges.

### Limits and gotchas

- Input is an ID or a location URL. There is no name search.
- Some locations publish no street or city; those fields come back empty rather than guessed.
- `media_count` is cumulative and never decreases, so change over time only appears if you sample on a schedule.
- Recent post shortcodes are a sample, not the full tagged history.
- Free Apify plans are capped at 10 rows per run. Paid plans have no cap.
- Locations that have been merged or removed return an error row rather than a blank record.

### FAQ

**How do I find an Instagram location ID?**

It is the numeric segment in a location URL, for example the digits in instagram.com/explore/locations/213385402/. You can paste either the bare ID or the whole URL; the actor detects which you gave it.

**Can I scrape Instagram locations without logging in?**

Yes. Location pages are public and this actor reads them logged out, so no account, cookie or API key is involved.

**Does it return the posts tagged at a location?**

It returns a sample of recent post shortcodes plus the total tagged-post count. For full post detail, feed those shortcodes into an Instagram post scraper.

**Are the coordinates accurate enough to map?**

They are the coordinates Instagram holds for the venue, returned as numbers rather than strings, so they plot directly. Accuracy is whatever Instagram recorded when the place was created.

**Can I search locations by name?**

Not with this actor. It resolves known IDs and URLs rather than performing a place search.

### Related Actors

- [Instagram Profile Scraper](https://apify.com/s-r/instagram-profile-scraper)
- [Instagram Post Scraper](https://apify.com/s-r/instagram-post-scraper)
- [Instagram Keyword Scraper](https://apify.com/s-r/instagram-keyword-scraper)

# Actor input Schema

## `search` (type: `array`):

Instagram location IDs or full location URLs, one per line.

## Actor input object example

```json
{
  "search": [
    "213385402",
    "https://www.instagram.com/explore/locations/212988663/"
  ]
}
```

# 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 = {
    "search": [
        "213385402"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("s-r/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 = { "search": ["213385402"] }

# Run the Actor and wait for it to finish
run = client.actor("s-r/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 '{
  "search": [
    "213385402"
  ]
}' |
apify call s-r/instagram-location-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/D9a6VH7ZG9O4mtJDS/builds/8MpJfLFPYN86PTEHg/openapi.json
