taskType SOCIAL 并设置 platform instagram,用 action 选择要读取的内容。每次完成的请求消耗 0.5 积分。
请求
GET /v1/async/task/{id} 或通过 webhook 接收。参见异步任务。
操作
username 接受用户名或个人主页 URL。postUrl 接受帖子、Reel 或 IGTV 的 URL,例如 https://www.instagram.com/p/Df147tCiAyB/。
参数
query:search必填。关键词、话题标签词或品牌名。limit:可选。search范围 1-30,默认 10。posts范围 1-12,默认 12。comments范围 1-500,默认 50。
响应示例
结果字段
- 每个响应都会原样返回
platform和action。列表带有returnedCount。 profile返回id、username、displayName、biography、bioLinks、avatarUrl、profileUrl、isVerified、isPrivate、followerCount、followingCount、postCount、hasReels、highlights、threadsUsername、pronouns和recentPosts。账号有快拍在线时会出现latestStoryAt,isMemorialized表示纪念账号。posts返回posts,即账号最新的 12 条帖子,带有从每条帖子页面读取的likeCount、commentCount和publishedAt。post返回post和帖子的前几条comments。帖子包含id、code、url、mediaType(image、video或carousel)、caption、imageUrl、images、videoUrl、width、height、likeCount、commentCount、publishedAt、username、authorFullName、authorIsVerified、authorProfileImageUrl、coauthors、taggedUsers、topics、audio(歌曲或作者的原创音频)、hasAudio、captionIsEdited、aiLabel和commentsDisabled。comments返回comments,每条评论包含id、text、username、likeCount、replyCount和publishedAt。GIF 评论带有gifUrl。availableCount是帖子的评论数,partial: true表示列表短于该数量。search返回posts,包含position、作者的username、authorId、authorIsVerified和authorProfileImageUrl,Reels 还有playCount。Instagram 为该关键词提供搜索页时,source为instagram,并加上该页的title、relatedKeywords、Instagram 对该关键词的summary,以及脚注编号所指的sources。其他关键词的source为web,posts包含最近 30 天的公开帖子和 Reels。- Instagram 向未登录的访客显示个人主页最新的 12 条帖子和一条帖子的十几条评论,
posts、post和comments返回的就是这些内容。搜索结果的计数和发布时间请用post读取。 - 不存在的账号或帖子、私密帖子,或 Instagram 只向已登录访客显示的页面,会使任务以
PAGE_UNAVAILABLE结束。只对完成的请求计费。