Skip to main content
skill CX Codex

scraping-instagram-location-posts — Claude Code skill

Extracts Instagram posts tagged at venues or geographic places via Apify. Helpful for gathering UGC content and attendee feedback.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add apidojo-io/apidojo-skills --skill scraping-instagram-location-posts -a claude-code
Open on GitHub

What scraping-instagram-location-posts does

This skill collects Instagram content tagged at physical locations using the apidojo/instagram-location-scraper actor on Apify. It accepts location identifiers in locationIds or direct place addresses via startUrls. Output records include the post link, author handle, caption, like count, and timestamp.

Execution relies on scripts/run_actor.js, Apify MCP tool calls, or direct REST API requests. You can limit the result volume with maxItems, filter by date using until, or pass a JavaScript handler into customMapFunction.

Without an APIFY_TOKEN set in your environment or .env file, the scraper fails immediately. For quiet locations with under 20 posts, the actor returns all available items rather than failing.

What it helps with

  • extract Instagram media tagged at a restaurant or hotel
  • gather attendee posts from an event venue
  • filter location-tagged posts by date
  • export post metrics and author handles into CSV or JSON

Example prompts for the agent

  • Collect posts tagged at location ID <LOCATION_ID>
  • Scrape up to 100 Instagram photos from this venue URL and save them as CSV
  • Fetch posts from our hotel location filtered by date

How to install scraping-instagram-location-posts

1Skills CLI (Vercel)

npx skills add apidojo-io/apidojo-skills --skill scraping-instagram-location-posts -a claude-code

2Manually: put the files in place

~/.claude/skills/scraping-instagram-location-posts/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/scraping-instagram-location-posts/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about scraping-instagram-location-posts

How do I install scraping-instagram-location-posts in Claude Code?

Run npx skills add apidojo-io/apidojo-skills --skill scraping-instagram-location-posts -a claude-code.

What does scraping-instagram-location-posts do?

It queries Apify's location scraper to retrieve geotagged Instagram posts, capturing captions, likes, comments, and author details.

What is required to run this skill?

You must set the APIFY_TOKEN environment variable. Installing the optional Apify MCP server allows running the actor directly via tools.

Source text

SKILL.md · Apache-2.0
---
name: scraping-instagram-location-posts
description: >
  Scrapes Instagram posts tagged at a specific location or place using apidojo's Instagram
  Location scraper on Apify. Triggers when the user asks to: get Instagram posts from a
  location, scrape photos tagged at a restaurant or hotel, fetch Instagram content from
  an event or venue, collect posts from a geographic area on Instagram, export location-
  tagged Instagram media, or find what people post from a specific place on Instagram.
  Returns post URL, author handle, caption, likes, comments, and timestamp per post.
  Ideal for hospitality brands, event teams, and UGC content collectors.
license: Apache-2.0
metadata:
  author: apidojo
  version: "1.0"
  apify-actor: apidojo/instagram-location-scraper
---

# Scraping Instagram Location Posts

Exports Instagram posts tagged at any physical location. Uses Instagram's location ID or place name to collect geo-tagged content.

## Prerequisites

- `APIFY_TOKEN` environment variable set
- Optional: Apify MCP server installed

## Inputs

| Parameter | Type | Required | Default | Notes |
|-----------|------|----------|---------|-------|
| `startUrls` | array | Optional | `[]` | Instagram location page URLs |
| `locationIds` | array | Optional | `[]` | Instagram location IDs |
| `maxItems` | number | Optional | Unlimited | Maximum posts to return |
| `until` | string | Optional | — | Date filter (YYYY-MM-DD) |
| `customMapFunction` | string | Optional | — | JavaScript function to transform each output object |

## Workflow

```
Progress:
- [ ] Step 1: Resolve location ID
- [ ] Step 2: Run instagram-location-scraper
- [ ] Step 3: Poll for SUCCEEDED
- [ ] Step 4: Deliver post dataset
```

### Step 2: Run the Actor


**Recommended — run_actor.js (handles waiting, output, and file saving automatically):**
```bash
# Quick answer (prints table to chat)
node scripts/run_actor.js \
  --actor "apidojo~instagram-location-scraper" \
  --input '{"param": "value"}'

# Save as CSV
node scripts/run_actor.js \
  --actor "apidojo~instagram-location-scraper" \
  --input '{"param": "value"}' \
  --output YYYY-MM-DD_results.csv --format csv

# Save as JSON
node scripts/run_actor.js \
  --actor "apidojo~instagram-location-scraper" \
  --input '{"param": "value"}' \
  --output YYYY-MM-DD_results.json --format json
```
> `APIFY_TOKEN` must be set in environment or `.env` file.

**If Apify MCP is available:**
```
Tool: apify:run-actor
Actor: "apidojo~instagram-location-scraper"
Input:
{
  "locationIds": ["<LOCATION_ID>"],
  "maxItems": 100
}
```

**REST API fallback:**
```bash
curl -X POST \
  "https://api.apify.com/v2/acts/apidojo~instagram-location-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"locationIds": ["<LOCATION_ID>"], "maxItems": 100}'
```

Save `id` as `RUN_ID`. Poll until `status = SUCCEEDED`:
```bash
curl "https://api.apify.com/v2/actor-runs/$RUN_ID?token=$APIFY_TOKEN" | grep '"status"'
```

Fetch results:
```bash
curl "https://api.apify.com/v2/actor-runs/$RUN_ID/dataset/items?token=$APIFY_TOKEN&format=json"
```

### Step 3: Handle Edge Cases

- **Location ID not found**: Invalid ID or location removed from Instagram — report to user.
- **Low post volume**: Niche locations may have < 20 posts — return all available.
- **Private account posts in feed**: Metadata visible but media may be restricted.

## Output Format

```
# Instagram Location Posts: <location name>
Location ID: <id> | Posts collected: N

| Post ID | Author | Caption (truncated) | Likes | Comments | Type | Timestamp |
|---------|--------|---------------------|-------|----------|------|-----------|
| ...     | ...    | ...                 | ...   | ...      | ...  | ...       |
```

## Troubleshooting

**Don't have the Location ID:** Visit `https://www.instagram.com/explore/locations/` and search — the ID is in the URL.
**0 results:** Location may have been renamed or merged — search for new ID.

© apidojo · Apache-2.0 · apidojo-io/apidojo-skills

Similar skills

All skills for Browser and scraping →

From the same set96

tracking-sports-team-fan-sentiment-twitter Collects tweets about a sports team and measures fan sentiment. Use it to study reactions to games, team news, player trades, and events. CX Codex +1 785installs analyzing-competitor-twitter-profile-content This skill pulls a competitor's or brand's tweet history through Apify and ranks posts by engagement. Useful when you need to see what a rival actually posts. CX Codex +1 784installs finding-food-bloggers-and-creators Discovers food creators across Instagram, TikTok, and YouTube using Apify scrapers. Segments influencers by engagement, niche, and content themes. CX Codex +1 782installs finding-podcast-hosts-for-outreach Find podcast hosts for PR and guest pitches through Apify Twitter scrapers. Use it when you need a topic-focused outreach list. CX Codex +1 782installs building-journalist-outreach-list-from-twitter Builds journalist and media contact lists for a given beat by scraping Twitter/X through Apify. Useful when you need names before a press pitch. CX Codex +1 780installs scraping-tiktok-comments Exports the comment dataset of any TikTok video through apidojo's scraper on Apify: author, text, likes, replies, timestamp. Handy when you need to read what viewers actually wrote. CX Codex +1 778installs scraping-youtube-comments Pulls comments, likes, and reply counts from YouTube videos using Apify. Useful for audience feedback and sentiment analysis. CX Codex +1 777installs discovering-viral-tiktok-content-trends This skill finds viral TikTok formats in a chosen niche and breaks down hashtags, reach, engagement, and hooks. Use it when planning content angles. CX Codex +1 777installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor