Instagram 地点下的帖子 API

给一个 location_id,读挂了这个地点的公开帖子:text、like_count、author_username、posted_at,sort 选热门或最新,每千次 $0.56。

  • sort 取 top 或 recent
  • 可以直接给地点页链接
  • 失败和空结果不收费
免费开始

接口健康状态

24h 健康值
正常
  • 健康 / 正常
  • 可用
  • 少量可用
  • 基本不可用
正常

24 小时趋势

30 天趋势

  1. 1请求

    POST /api/v1/social
    {
      "platform": "instagram",
      "action": "location_posts",
      "params": {
        "location_id": "212988663"
      }
    }
  2. 2JSON 响应

    {
      "results": [
        {
          "post_id": string,
          "text": string,
          "media_type": string,
          "like_count": number
        },
        …
      ]
    }
  3. 3表格行

    post_idtextmedia_typelike_count
    stringstringstringnumber
  4. 4CSV

    instagram-location_posts-sample.csv post_id,url,text,media_type,like_count,comment_count,view_count,author_username,author_name,posted_at,location,id,image_url,video_url,author_id,width,height,is_comments_disabled,author_follower_count,hashtags,top_comments,product_type,play_count,fb_play_count,fb_like_count,fb_comment_count,share_count,repost_count,duration_sec,duration_seconds,duration_estimated,image_count,video_count,video_url_expires_at,video_hd_url,video_hd_height,audio_url,video_hd_expires_at,is_paid_partnership,is_pinned,likes_hidden,caption_is_edited,accessibility_caption,author_is_verified,author_is_private,author_avatar_url,posted_at_estimated,mentions,tagged_users,coauthors,sponsors,media,music,platform,location_detail,location_info

请求带 location_id 和可选的 sort,同一个响应里回来这个地点下的一页帖子,再变成表格行和 CSV;有 next_page_token 就能取下一页。

能拿到什么数据

下表列出每行会返回的字段、类型和含义,不含具体值。每行是一条挂了这个地点的帖子;location_info 对象是查的这个地点,每行相同。

字段类型含义
post_idstring帖子短码,就是链接里 /p/ 或 /reel/ 后面那段(不是数字编号)。
urlstring该记录在原平台上的可访问链接。
textstring正文内容,已去除 HTML 标签,全文返回、不截断(个别平台的列表结果本身只有摘要,以该平台的字段说明为准)。
media_typestring取值只有两个:video(视频,Reels 也是 video)、image(图片;轮播帖也记作 image,有 product_type 时,product_type 为 carousel_container 的就是轮播)。
like_countnumber点赞数。null 表示该平台或该接口不公开此数据,不等于 0。
comment_countnumber评论数。null 表示不公开,不等于 0。
view_countnumber浏览/播放数。null 表示不公开,不等于 0。
author_usernamestring作者用户名(@handle),通常可用于拼 URL。
author_namestring作者昵称(显示名)。
posted_atstring发布时间,ISO 8601 格式、UTC 时区(如 2026-08-07T12:34:56+00:00)。平台只给非标准字符串时原样透传,解析前建议做容错。null 表示平台未公开。
locationstring地理位置描述,原文透传,格式随平台而异。
idstring该记录在原平台上的唯一标识。仅在同一平台内唯一,跨平台可能重复。
image_urlstring图片链接。多图能力可能返回 image_urls 数组。
video_urlstring视频文件链接:带声音的完整 mp4,能直接播放。轮播帖里有视频时是第一个视频;不是视频时不出现。链接带签名,会过期;有 video_url_expires_at 时以它为准。
author_idstring作者在原平台的唯一 ID。
widthnumber原图或原视频的宽,像素。
heightnumber原图或原视频的高,像素。
is_comments_disabledboolean帖子是否关闭评论。
author_follower_countnumber作者粉丝数。null 表示不公开。
hashtagsarray正文里的话题标签数组,按出现顺序;没有时不出现这个字段。
top_comments—帖子下展示的几条评论,每项含正文(text)和评论人(author_username);没有时不出现这个字段。
product_typestringInstagram 自己分的内容形态:feed 普通帖、clips Reels、carousel_container 轮播、longform 长视频。
play_countnumber播放量。
fb_play_count—作者把这条同时发到 Facebook 时,Facebook 那边的播放数;只有这样的帖子才出现。
fb_like_count—作者把这条同时发到 Facebook 时,Facebook 那边的点赞数;只有这样的帖子才出现。
fb_comment_count—作者把这条同时发到 Facebook 时,Facebook 那边的评论数;只有这样的帖子才出现。
share_countnumber分享/转发数。null 表示不公开,不等于 0。
repost_countnumber转发数(区别于引用转发)。null 表示不公开。
duration_secnumber时长,秒。
duration_secondsnumber时长,单位秒。非视频/音频内容为 null。
duration_estimatedboolean为 true 表示 duration_sec 是从视频链接里读出的整秒数,和精确时长最多差 1 秒。只在这样读出时出现。
image_countnumber图片张数:单图帖为 1;轮播帖是里面图片的张数,不算视频。
video_count—轮播帖里视频的个数;只有轮播帖有。
video_url_expires_atstringvideo_url 的过期时间,ISO 8601,UTC。
video_hd_urlstring清晰度最高的视频画面轨:只有画面、没有声音。会过期,过期时间见 video_hd_expires_at。要带声音的视频,把它和 audio_url 合成(比如用 ffmpeg 合并两条轨),或者直接用 video_url。
video_hd_heightnumbervideo_hd_url 的画面高度,像素。
audio_urlstring视频的音轨,只有声音;和 video_hd_url 差不多同时过期(见 video_hd_expires_at)。视频没有单独的音轨时(比如无声视频)不出现。
video_hd_expires_atstringvideo_hd_url 的过期时间,ISO 8601,UTC;audio_url 差不多同时过期。
is_paid_partnershipboolean帖子是否标了「付费合作」(Paid partnership)。页面给了这项信息才出现,可能为 false。
is_pinnedboolean是否置顶。帖子(user_posts、tagged_posts、recent_posts,以及 location_posts、audio_posts、explore 等返回帖子的接口):被作者置顶在主页网格或 Reels 标签页,只在置顶时出现,值为 true。评论(comments):被帖子作者置顶,只在置顶时出现,值为 true。精选(highlights):是否被置顶在主页精选栏最前。
likes_hiddenboolean作者隐藏了点赞数。只在隐藏时出现,值为 true;这时一般没有 like_count。
caption_is_edited—正文编辑过。只在编辑过时出现,值为 true。
accessibility_caption—Instagram 自动生成的图片描述(替代文字,英文)。
author_is_verifiedboolean作者账号是否有认证标。出现在 user_posts、tagged_posts、location_posts、audio_posts、explore、stories、comment_replies,以及 post、discover、reels、hashtag、reels_search 的行里(有值才出现)。
author_is_privateboolean作者是不是私密账号。
author_avatar_urlstring作者头像图片链接(多数平台带签名、会过期)。
posted_at_estimatedboolean为 true 表示页面没给发布时间,posted_at 是按帖子的数字编号(id)推算出的上传时间;一般和发布时间相同,定时发布的帖子会早一些。只在推算时出现(tagged_posts 常见)。
mentionsarray正文里 @ 到的用户名,数组。
tagged_users—图片、视频里被标记的人的用户名,数组;轮播帖里每一张的都算。
coauthorsarray合著者:和作者一起署名发这条帖子的账号的用户名,数组。
sponsors—付费合作里标注的品牌方账号的用户名,数组。
media—轮播帖里的每一张,一张一项:type(image 或 video)、image_url(图片地址,视频是封面图;带签名,会过期)、video_url(只有视频有,带声音的 mp4)、width、height(像素)。只有轮播帖有。
musicobject帖子或 Reels 用的音乐,对象:歌手(artist)、曲名(title);有的还带 audio_id(音乐编号)、is_original(true 是作者自己录的原声,false 是曲库里的歌)、is_explicit(曲库歌曲是否标了含露骨内容)、is_trending(原声是否正在流行,只有原声有)、url(Instagram 上这段音乐的页面)。原声的 title 一般是 Original audio,artist 是原声作者的用户名。没有时不出现这个字段。
platformstring数据来源平台标识,与请求里的 platform 一致(如 xiaohongshu、tiktok)。
location_detailobject帖子挂的地点的详细信息,对象:id(地点编号)、name(地点名,和 location 相同)、short_name(短名)、city、address、lat、lng、url(Instagram 上这个地点的页面),有的才带。没挂地点时不出现。
location_info—(location_posts)查的这个地点,每行相同,对象:id(地点编号)、name(地点名)、category(地点类别,如 City)、lat、lng、post_count(这个地点下的帖子总数)、url(Instagram 上这个地点的页面),有的才带。

用途

  • 看这个地点现在在发什么

    sort 设为 recent,按 posted_at 读最新的 text。

  • 找地点里的热门内容

    不传 sort 就是 top,对着 like_count 和 comment_count 看哪些帖子最受关注。

  • 找在这里发帖的账号

    读 author_username 和 author_follower_count,列出常在这个地点发帖的账号。

  • 看一家店或一个景点怎么被拍、被写

    从 text、hashtags 和 image_url 看这个地点常见的内容和说法。

Instagram Graph API 与 EveryInfra 对比

下面从能读谁的数据、接入审核两方面,比 Instagram 官方 Graph API 和 EveryInfra location_posts。

对比项Instagram Graph APIEveryInfra
能读谁的数据权限范围:"Note that a permission only allows access to data created by the app user who granted the permission."location_id 指定的地点下的帖子,是公开可见的内容,不限于你自己的账号。
接入审核Advanced Access:"Advanced Access is the access level required if your app serves Instagram professional accounts that you don’t own or manage" 以及 "This access level requires App Review and Business Verification."一把 EveryInfra API Key 放在 Authorization: Bearer 请求头里,不用提交 Meta 应用审核,也不用登录 Instagram。

引文出自 Meta 开发者文档,2026-11-22 核对;这里只比接入条件。 官方出处: Instagram Platform overview (更新于 2026-10-29)

限制和注意事项

  • location_id 必填:帖子 location_detail 里的 id,或地点页链接里的那串数字,直接给链接也行。
  • sort 取 top(热门,不传时就是它)或 recent(最新)。
  • 一次返回一页。响应有 next_page_token 就原样作 page_token 传回,其他参数和第一页一样;令牌 24 小时有效,每页算一次调用;没有 next_page_token 就翻不下去了。
  • 一页的条数可能不满,不要按页数估一个地点的帖子总量。
  • location_info 对象是查的这个地点,每行相同,有的项才出现。
  • video_url 带签名,会过期,有 video_url_expires_at 时以它为准;top_comments、music 没有时整个字段不出现。

价格

每次调用 $0.000556,按次计费,不按行数算。每翻一页算一次调用。失败和空结果不收费。

调用次数费用
10,000$5.56
100,000$55.56
1,000,000$555.56

合计按每次调用的标价算。

代码示例

#
bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "instagram",
  "action": "location_posts",
  "params": {
    "location_id": "212988663"
  }
}'

OpenAPI 定义 (JSON)示例从环境变量 EVERYINFRA_API_KEY 读取 Key,复制出去的代码不含你的 Key。

API 参考

下面是 location_posts 的参数、响应字段、错误和计费,可以复制整页,或用 Markdown 打开后交给 AI 助手。

POST

AI 提示词

#
请帮我用 EveryInfra 的「Instagram 地点下的帖子」接口(instagram/location_posts)写一个数据采集脚本。

接口约定:
- 请求:POST https://api.everyinfra.com/api/v1/social,请求头 Authorization: Bearer <API Key>;Key 从环境变量 EVERYINFRA_API_KEY 读取,不要写进代码。
- 请求体里 platform 填 instagram,action 填 location_posts,参数放在 params 里。
- 必填参数:
  - location_id:地点 ID:帖子 location_detail 里的 id,或地点页链接(https://www.instagram.com/explore/locations/<数字>/…)里的那串数字,直接给链接也行。
- 可选参数:
  - page_token:翻页令牌:把上一次响应里的 next_page_token 原样传回,拿下一页;不传是第一页。翻页时其他参数要和第一页一样。令牌 24 小时有效,每页算一次调用。没有 next_page_token 就是翻不下去了。
  - sort:top 是热门(不传时就是 top),recent 是最新。(可选值:recent / top)
- 返回一组记录,每条记录的主要字段:post_id(帖子短码)、url、text、media_type(取值只有两个:video(视频)、like_count、comment_count、view_count、author_username、author_name、posted_at、location、id;一共 55 个字段,完整列表见 https://api.everyinfra.com/api/v1/social/catalog?platform=instagram。
- 示例请求体:
{
  "platform": "instagram",
  "action": "location_posts",
  "params": {
    "location_id": "212988663"
  }
}
- 计费:$0.56 / 千次;失败和空结果不扣费。
- 一次要采几十上百个时,在请求体加 "mode": "async":先拿到 job_id,再轮询 GET https://api.everyinfra.com/api/v1/jobs/{job_id} 取结果。
- 返回 422 时,按错误信息里的候选参数和允许值修正;返回 429 或 503 时,按 Retry-After 等待后重试。

写代码前,先问清楚我要采哪些对象、一共多少个、需要哪些字段、结果存成什么格式,再把方案和大概花费讲给我确认。

请求参数

#
参数名位置类型必填默认值说明
Authorizationheaderstring是-Bearer 加你的 API Key。在控制台创建;不要放进网址或代码仓库。
platformbodystring是instagram平台标识,固定值。
actionbodystring是location_posts能力标识,固定值。
location_idbody.paramsstring是-地点 ID:帖子 location_detail 里的 id,或地点页链接(https://www.instagram.com/explore/locations/<数字>/…)里的那串数字,直接给链接也行。
page_tokenbody.paramsstring否-翻页令牌:把上一次响应里的 next_page_token 原样传回,拿下一页;不传是第一页。翻页时其他参数要和第一页一样。令牌 24 小时有效,每页算一次调用。没有 next_page_token 就是翻不下去了。
sortbody.paramsstring (enum)否-top 是热门(不传时就是 top),recent 是最新。允许值recenttop

响应示例

#
这组示例参数还没有真实样例:这里只按接口定义列出响应结构和字段,值用 … 占位,不是一次真实调用的结果。
json
{  "id": "req_…",  "platform": "instagram",  "action": "location_posts",  "results": [    {      "post_id": …,      "url": …,      "text": …,      "media_type": …,      "like_count": …,      "comment_count": …,      "view_count": …,      "author_username": …,      "author_name": …,      "posted_at": …,      "location": …,      "id": …,      "image_url": …,      "video_url": …,      "author_id": …,      "width": …,      "height": …,      "is_comments_disabled": …,      "author_follower_count": …,      "hashtags": …,      "top_comments": …,      "product_type": …,      "play_count": …,      "fb_play_count": …,      "fb_like_count": …,      "fb_comment_count": …,      "share_count": …,      "repost_count": …,      "duration_sec": …,      "duration_seconds": …,      "duration_estimated": …,      "image_count": …,      "video_count": …,      "video_url_expires_at": …,      "video_hd_url": …,      "video_hd_height": …,      "audio_url": …,      "video_hd_expires_at": …,      "is_paid_partnership": …,      "is_pinned": …,      "likes_hidden": …,      "caption_is_edited": …,      "accessibility_caption": …,      "author_is_verified": …,      "author_is_private": …,      "author_avatar_url": …,      "posted_at_estimated": …,      "mentions": …,      "tagged_users": …,      "coauthors": …,      "sponsors": …,      "media": …,      "music": …,      "platform": …,      "location_detail": …,      "location_info": …    }  ],  "next_page_token": …,  "pagination": { … },  "count": …,  "billing": {    "charged": …,    "charged_usd": …,    "balance_after_usd": …,    …  },  "quota": { … }}

返回字段

#

业务数据在 results 里;下表是每条记录可能包含的字段,平台没有提供的值不会被编造。

字段含义
post_id帖子短码,就是链接里 /p/ 或 /reel/ 后面那段(不是数字编号)。
url该记录在原平台上的可访问链接。
text正文内容,已去除 HTML 标签,全文返回、不截断(个别平台的列表结果本身只有摘要,以该平台的字段说明为准)。
media_type取值只有两个:video(视频,Reels 也是 video)、image(图片;轮播帖也记作 image,有 product_type 时,product_type 为 carousel_container 的就是轮播)。
like_count点赞数。null 表示该平台或该接口不公开此数据,不等于 0。
comment_count评论数。null 表示不公开,不等于 0。
view_count浏览/播放数。null 表示不公开,不等于 0。
author_username作者用户名(@handle),通常可用于拼 URL。
author_name作者昵称(显示名)。
posted_at发布时间,ISO 8601 格式、UTC 时区(如 2026-08-07T12:34:56+00:00)。平台只给非标准字符串时原样透传,解析前建议做容错。null 表示平台未公开。
location地理位置描述,原文透传,格式随平台而异。
id该记录在原平台上的唯一标识。仅在同一平台内唯一,跨平台可能重复。
image_url图片链接。多图能力可能返回 image_urls 数组。
video_url视频文件链接:带声音的完整 mp4,能直接播放。轮播帖里有视频时是第一个视频;不是视频时不出现。链接带签名,会过期;有 video_url_expires_at 时以它为准。
author_id作者在原平台的唯一 ID。
width原图或原视频的宽,像素。
height原图或原视频的高,像素。
is_comments_disabled帖子是否关闭评论。
author_follower_count作者粉丝数。null 表示不公开。
hashtags正文里的话题标签数组,按出现顺序;没有时不出现这个字段。
top_comments帖子下展示的几条评论,每项含正文(text)和评论人(author_username);没有时不出现这个字段。
product_typeInstagram 自己分的内容形态:feed 普通帖、clips Reels、carousel_container 轮播、longform 长视频。
play_count播放量。
fb_play_count作者把这条同时发到 Facebook 时,Facebook 那边的播放数;只有这样的帖子才出现。
fb_like_count作者把这条同时发到 Facebook 时,Facebook 那边的点赞数;只有这样的帖子才出现。
fb_comment_count作者把这条同时发到 Facebook 时,Facebook 那边的评论数;只有这样的帖子才出现。
share_count分享/转发数。null 表示不公开,不等于 0。
repost_count转发数(区别于引用转发)。null 表示不公开。
duration_sec时长,秒。
duration_seconds时长,单位秒。非视频/音频内容为 null。
duration_estimated为 true 表示 duration_sec 是从视频链接里读出的整秒数,和精确时长最多差 1 秒。只在这样读出时出现。
image_count图片张数:单图帖为 1;轮播帖是里面图片的张数,不算视频。
video_count轮播帖里视频的个数;只有轮播帖有。
video_url_expires_atvideo_url 的过期时间,ISO 8601,UTC。
video_hd_url清晰度最高的视频画面轨:只有画面、没有声音。会过期,过期时间见 video_hd_expires_at。要带声音的视频,把它和 audio_url 合成(比如用 ffmpeg 合并两条轨),或者直接用 video_url。
video_hd_heightvideo_hd_url 的画面高度,像素。
audio_url视频的音轨,只有声音;和 video_hd_url 差不多同时过期(见 video_hd_expires_at)。视频没有单独的音轨时(比如无声视频)不出现。
video_hd_expires_atvideo_hd_url 的过期时间,ISO 8601,UTC;audio_url 差不多同时过期。
is_paid_partnership帖子是否标了「付费合作」(Paid partnership)。页面给了这项信息才出现,可能为 false。
is_pinned是否置顶。帖子(user_posts、tagged_posts、recent_posts,以及 location_posts、audio_posts、explore 等返回帖子的接口):被作者置顶在主页网格或 Reels 标签页,只在置顶时出现,值为 true。评论(comments):被帖子作者置顶,只在置顶时出现,值为 true。精选(highlights):是否被置顶在主页精选栏最前。
likes_hidden作者隐藏了点赞数。只在隐藏时出现,值为 true;这时一般没有 like_count。
caption_is_edited正文编辑过。只在编辑过时出现,值为 true。
accessibility_captionInstagram 自动生成的图片描述(替代文字,英文)。
author_is_verified作者账号是否有认证标。出现在 user_posts、tagged_posts、location_posts、audio_posts、explore、stories、comment_replies,以及 post、discover、reels、hashtag、reels_search 的行里(有值才出现)。
author_is_private作者是不是私密账号。
author_avatar_url作者头像图片链接(多数平台带签名、会过期)。
posted_at_estimated为 true 表示页面没给发布时间,posted_at 是按帖子的数字编号(id)推算出的上传时间;一般和发布时间相同,定时发布的帖子会早一些。只在推算时出现(tagged_posts 常见)。
mentions正文里 @ 到的用户名,数组。
tagged_users图片、视频里被标记的人的用户名,数组;轮播帖里每一张的都算。
coauthors合著者:和作者一起署名发这条帖子的账号的用户名,数组。
sponsors付费合作里标注的品牌方账号的用户名,数组。
media轮播帖里的每一张,一张一项:type(image 或 video)、image_url(图片地址,视频是封面图;带签名,会过期)、video_url(只有视频有,带声音的 mp4)、width、height(像素)。只有轮播帖有。
music帖子或 Reels 用的音乐,对象:歌手(artist)、曲名(title);有的还带 audio_id(音乐编号)、is_original(true 是作者自己录的原声,false 是曲库里的歌)、is_explicit(曲库歌曲是否标了含露骨内容)、is_trending(原声是否正在流行,只有原声有)、url(Instagram 上这段音乐的页面)。原声的 title 一般是 Original audio,artist 是原声作者的用户名。没有时不出现这个字段。
platform数据来源平台标识,与请求里的 platform 一致(如 xiaohongshu、tiktok)。
location_detail帖子挂的地点的详细信息,对象:id(地点编号)、name(地点名,和 location 相同)、short_name(短名)、city、address、lat、lng、url(Instagram 上这个地点的页面),有的才带。没挂地点时不出现。
location_info(location_posts)查的这个地点,每行相同,对象:id(地点编号)、name(地点名)、category(地点类别,如 City)、lat、lng、post_count(这个地点下的帖子总数)、url(Instagram 上这个地点的页面),有的才带。

错误与计费

#
401
缺少 Key 或 Key 无效。
402
余额不足,先充值。
422
参数名或取值不对,按错误信息给的候选改;不扣费。
429
超过每分钟请求上限,按 Retry-After 等待后再试。
503
暂时无法完成,预扣的费用退回;结果未知时先核对,不要直接重发。
200 空结果
没有数据,不扣费。

错误码

官方资料参照

#

只用于核对对象与术语,不表示平台对 EveryInfra 的授权或背书。

  • Instagram 帮助中心:查看同一地点的帖子 ↗

    Instagram 帮助中心说明点开帖子上的地点标签,可以看到在同一地点拍摄的其他照片。可证明「地点下的帖子」是 Instagram 的官方功能;不证明本接口的地点编号取值、排序或能取全。

    核对于 2026-11-17

常见问题

Instagram 地点帖子接口返回什么?

每行一条挂了这个地点的帖子:post_id、url、text、media_type、like_count、comment_count、author_username、posted_at,还有 location_info 对象。

location_id 从哪里拿?

取自帖子 location_detail 里的 id,或地点页链接(/explore/locations/ 后面的数字);直接把链接传进来也行。

怎么取下一页?

响应有 next_page_token 时,原样作 page_token 传回,其他参数不变。没有 next_page_token 就翻不下去了。

读一页地点帖子要多少钱?

每次 $0.000556,每千次 $0.56,每页算一次调用,不按行数算。失败和空结果不收费。

要登录 Instagram 吗?

不用。请求头里放一把 EveryInfra API Key(Authorization: Bearer),不需要 Instagram 登录,也不需要 Instagram 访问令牌。

同一把 Key 还能调用 Instagram 的其他能力,比如用 location_info 读这个地点的坐标和类别。

Google Analytics 同意才加载 隐私