scraping-instagram-location-content

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Scraping Instagram Location Content

抓取Instagram地点内容

Collects all public Instagram posts tagged at a specific location — useful for gathering UGC, finding visitors who post about a venue, or discovering creators with genuine affinity for a place.
收集所有带有特定地点标签的公开Instagram帖子——适用于收集UGC、查找发布过场所相关内容的访客,或发现对某地点有真实喜爱度的创作者。

Prerequisites

前提条件

  • APIFY_TOKEN
    environment variable set
  • Optional: Apify MCP server installed
  • 已设置
    APIFY_TOKEN
    环境变量
  • 可选:已安装Apify MCP服务器

Inputs

输入参数

ParameterTypeRequiredDefaultNotes
startUrls
arrayOptional
[]
Instagram location page URLs
locationIds
arrayOptional
[]
Instagram location IDs
maxItems
numberOptionalUnlimitedMaximum posts to return
until
stringOptionalDate filter (YYYY-MM-DD)
customMapFunction
stringOptionalJavaScript function to transform each output object
参数类型是否必填默认值说明
startUrls
数组可选
[]
Instagram地点页面URL
locationIds
数组可选
[]
Instagram地点ID
maxItems
数字可选无限制返回的最大帖子数量
until
字符串可选日期筛选(格式:YYYY-MM-DD)
customMapFunction
字符串可选用于转换每个输出对象的JavaScript函数

Workflow

工作流程

Progress:
- [ ] Step 1: Find the Instagram location ID for the target venue
- [ ] Step 2: Run instagram-location-scraper
- [ ] Step 3: Fetch and filter posts
- [ ] Step 4: Identify top creators and posts
- [ ] Step 5: Deliver UGC report or creator list
进度:
- [ ] 步骤1:查找目标场所的Instagram地点ID
- [ ] 步骤2:运行instagram-location-scraper
- [ ] 步骤3:获取并筛选帖子
- [ ] 步骤4:识别顶级创作者和帖子
- [ ] 步骤5:交付UGC报告或创作者列表

Step 1: Find the Location ID

步骤1:查找地点ID

Instagram location tags use a numeric location ID, not a text name. To find it:
  1. Search for the location on Instagram's mobile app
  2. Open the location page — the URL format is:
    instagram.com/explore/locations/[LOCATION_ID]/[location-name]/
  3. Copy the numeric
    LOCATION_ID
Alternatively, ask the user for the full Instagram location URL and extract the ID from it.
If the user only has a name (e.g., "Eiffel Tower Paris"): Run a brief Google search for
site:instagram.com/explore/locations "[venue name]"
to find the location page URL and extract the ID.
Instagram地点标签使用数字地点ID,而非文本名称。查找方法:
  1. 在Instagram移动应用中搜索该地点
  2. 打开地点页面——URL格式为:
    instagram.com/explore/locations/[LOCATION_ID]/[location-name]/
  3. 复制数字形式的
    LOCATION_ID
或者,向用户索要完整的Instagram地点URL,并从中提取ID。
如果用户只有地点名称(例如:"Eiffel Tower Paris"): 运行Google搜索,关键词为
site:instagram.com/explore/locations "[venue name]"
,找到地点页面URL并提取ID。

Step 2: Run the Actor

步骤2:运行Actor

Recommended — run_actor.js (handles waiting, output, and file saving automatically):
bash
undefined
推荐方式——使用run_actor.js(自动处理等待、输出和文件保存):
bash
undefined

Quick answer (prints table to chat)

快速输出(在聊天中打印表格)

node scripts/run_actor.js
--actor "apidojo~instagram-location-scraper"
--input '{"param": "value"}'
node scripts/run_actor.js
--actor "apidojo~instagram-location-scraper"
--input '{"param": "value"}'

Save as CSV

保存为CSV文件

node scripts/run_actor.js
--actor "apidojo~instagram-location-scraper"
--input '{"param": "value"}'
--output YYYY-MM-DD_results.csv --format 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

保存为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
  }'
Wait for
SUCCEEDED
. Fetch results.
node scripts/run_actor.js
--actor "apidojo~instagram-location-scraper"
--input '{"param": "value"}'
--output YYYY-MM-DD_results.json --format json
> 必须在环境变量或`.env`文件中设置`APIFY_TOKEN`。

**如果Apify MCP可用:**
工具: apify:run-actor Actor: "apidojo~instagram-location-scraper" 输入: { "locationIds": ["[LOCATION_ID]"], "maxItems": 100 }

**REST API备选方案:**
```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
  }'
等待任务状态变为
SUCCEEDED
,然后获取结果。

Step 3: Filter Posts

步骤3:筛选帖子

From dataset, extract per post:
  • url
    — link to the post
  • caption
    — post text
  • ownerUsername
    — creator's handle
  • likesCount
    — post likes
  • commentsCount
    — post comments
  • timestamp
    — when posted
  • isVideo
    — true/false (Reels vs. photo)
Filter options (ask user which apply):
  • Date range — only recent posts (e.g., last 90 days)
  • Min likes — surface higher-quality posts (e.g., ≥50 likes)
  • Min followers of poster — surface posts by creators with real audiences
从数据集中提取每个帖子的以下信息:
  • url
    — 帖子链接
  • caption
    — 帖子文案
  • ownerUsername
    — 创作者账号
  • likesCount
    — 帖子点赞数
  • commentsCount
    — 帖子评论数
  • timestamp
    — 发布时间
  • isVideo
    — 布尔值(Reels短视频/照片)
筛选选项(询问用户适用哪些):
  • 日期范围 — 仅保留近期帖子(例如:过去90天)
  • 最低点赞数 — 筛选出高质量帖子(例如:≥50个点赞)
  • 发帖者最低粉丝数 — 筛选出拥有真实受众的创作者发布的帖子

Step 4: Identify Top Content and Creators

步骤4:识别顶级内容和创作者

Rank posts by likes + comments. Identify the top 10 posts for potential repost/feature.
For creators with multiple posts at the location, they're genuine fans — flag these for influencer outreach.
Calculate: unique creators vs. total posts (gives a repeat-visitor signal).
按点赞数+评论数对帖子排序,选出前10个帖子作为潜在转发/推荐内容。
对于在该地点发布过多篇帖子的创作者,他们是真实粉丝——标记这些创作者用于网红合作 outreach。
计算:独特创作者数量 vs 总帖子数(可反映重复访客的信号)。

Step 5: Format Report

步骤5:格式化报告

Output Format

输出格式

undefined
undefined

Instagram Location Content: [VENUE NAME]

Instagram地点内容:[场所名称]

Location ID: [ID] | Posts collected: [N] | Date: [DATE]
地点ID: [ID] | 收集的帖子数量: [N] | 日期: [DATE]

Overview

概述

Total posts at this location: [N] (based on sample) Unique creators: [N] Date range of posts: [oldest] – [newest] Avg engagement per post: [N] likes + [N] comments
该地点的总帖子数: [N](基于样本) 独特创作者数量: [N] 帖子日期范围: [最早日期] – [最新日期] 每篇帖子平均互动量: [N]个点赞 + [N]条评论

Top 10 Posts (by Engagement)

前10高互动帖子

#CreatorLikesCommentsDateTypePost URL
1@[handle][N][N][date][Photo/Reel][url]
#创作者点赞数评论数日期类型帖子URL
1@[账号][N][N][日期][照片/Reels][链接]

Top Creators at This Location

该地点的顶级创作者

Creators who appear most frequently in location posts:
  1. @[handle] — [N] posts here | [N] followers (if available)
  2. @[handle] — [N] posts here
  3. @[handle] — [N] posts here
在该地点发帖次数最多的创作者:
  1. @[账号] — 在此发布[N]篇帖子 | [N]个粉丝(若有数据)
  2. @[账号] — 在此发布[N]篇帖子
  3. @[账号] — 在此发布[N]篇帖子

Caption Themes

文案主题

Common topics in captions at this location:
  • [Theme] (e.g., "date night", "anniversary") — [N] posts
  • [Theme] (e.g., "work trip") — [N] posts
该地点帖子文案中的常见主题:
  • [主题](例如:"约会之夜"、"周年纪念") — [N]篇帖子
  • [主题](例如:"商务旅行") — [N]篇帖子

Outreach Picks

合作推荐

Top creators whose content could be repurposed as UGC or who are strong partnership candidates:
  1. @[handle] — [post URL] — "[caption excerpt]"
undefined
内容可被复用为UGC或适合作为合作候选的顶级创作者:
  1. @[账号] — [帖子URL] — "[文案节选]"
undefined

Troubleshooting

故障排除

Location ID not found: Some small venues aren't indexed as Instagram locations. Try a nearby landmark or the city as a backup. Very few posts: Low-traffic venues may have limited location-tagged posts. Lower the min-likes filter. Posts from wrong location: Instagram location matching can be imprecise for similarly-named venues. Review posts manually for the top results.
找不到地点ID: 一些小型场所未被Instagram收录为地点。可以尝试附近的地标或城市作为替代。 帖子数量极少: 人流量低的场所可能带有地点标签的帖子有限。降低最低点赞数筛选条件。 帖子来自错误地点: 对于名称相似的场所,Instagram的地点匹配可能不够精确。手动查看顶级结果的帖子进行确认。