> ## Documentation Index
> Fetch the complete documentation index at: https://docs.brightdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Instagram 抓取 API

> 使用Bright Data Instagram爬虫API从Instagram个人资料、帖子、短视频和评论中提取结构化数据。同步请求最适合单个输入。

发送一个 Instagram URL，获得结构化的 JSON 响应。Bright Data Instagram Scraper API 处理代理、CAPTCHA 和解析，让你专注于数据管道。

> [!TIP]
>
> 初次使用 Bright Data？[创建免费账户](https://www.bright.cn/products/web-scraper/instagram?hs_signup=1\&utm_source=docs)，即可**每月获得 5,000 个免费积分**，无需信用卡。这相当于最多 **5,000 条 Instagram 记录**，可供你开始抓取。请参阅[免费套餐](https://docs.brightdata.com/cn/general/account/billing-and-pricing/free-tier.md)。

## 工作原理

你向 Bright Data Instagram Scraper API 发送一个或多个 Instagram URL。Bright Data 处理爬取基础设施并返回清晰的结构化 JSON。

```
Your app  -->  Bright Data API  -->  Structured JSON
           POST /datasets/v3/scrape
           Authorization: Bearer YOUR_API_KEY
```

所有请求都使用 `dataset_id` 来指定数据类型（资料、帖子、短视频或评论）并以 NDJSON（默认）、JSON、JSON lines、CSV 和 Parquet 格式返回结果。见[输出格式](https://docs.brightdata.com/cn/products/scrapers/scrapers-library/data-delivery.md#支持哪些输出格式)。

## 响应内容示例

Bright Data Instagram Scraper API 于 2026 年 9 月 6 日返回的单条记录（已裁剪为所示字段）。可在[快速开始](https://docs.brightdata.com/cn/products/scrapers/instagram/quickstart.md)中亲自发送该请求。

```json theme={null}
{
  "full_name": "Instagram",
  "biography": "Discover what's new on Instagram 🔎✨",
  "followers": 686423902,
  "following": 286,
  "posts_count": 8579,
  "is_verified": true,
  "account": "instagram",
  "fbid": "17841400039600391",
  "id": "25025320",
  "profile_image_link": "https://scontent-iad3-2.cdninstagram.com/v/t51.82787-19/550891366_18667771684001321_1383210656577177067_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_cat=1&ccb=7-5&_nc_..."
}
```

## 支持的数据类型

> [card] [资料](https://docs.brightdata.com/api-reference/scrapers/social-media-apis/instagram-profiles-collect-by-url.md)
>
> 粉丝数、简介、认证状态、资料图片。按用户名发现资料。

> [card] [帖子](https://docs.brightdata.com/api-reference/scrapers/social-media-apis/instagram-posts-collect-by-url.md)
>
> 标题、点赞、评论、话题标签、照片和视频。按资料 URL 发现帖子。

> [card] [短视频](https://docs.brightdata.com/api-reference/scrapers/social-media-apis/instagram-reels-collect-by-url.md)
>
> 视频 URL、浏览次数、播放次数、缩略图。发现短视频或收集资料中的所有短视频。

> [card] [评论](https://docs.brightdata.com/api-reference/scrapers/social-media-apis/instagram-comments-collect-by-url.md)
>
> 评论文本、点赞、回复、评论者信息，适用于任何帖子或短视频。

## 数据集 ID

每种 Instagram 数据类型使用自己的 `dataset_id`。在每个请求上将 ID 作为查询参数传递。

| 数据类型 | 数据集 ID |
| :- | :- |
| 档案 | `gd_l1vikfch901nx3by4` |
| 帖子 | `gd_lk5ns7kz21pck8jpis` |
| 短视频 | `gd_lyclm20il4r5helnj` |
| 评论 | `gd_ltppn085pokosxh13` |

## 请求方式

Bright Data Scraper API 支持两种请求方式，请根据您的数据量和延迟需求选择。

| 方式 | 端点 | 适用场景 |
| :- | :- | :- |
| **同步** | `/scrape` | 实时查询，每个请求一个输入 |
| **异步** | [`/trigger`](https://docs.brightdata.com/cn/products/scrapers/scrapers-library/async-requests) | 批量任务、多个输入、生产环境管道 |

详见[了解同步与异步请求](https://docs.brightdata.com/cn/concepts/sync-vs-async.md)。

两个端点都接受带 `input` 数组的对象，可附加 `limit_per_input` 和 `custom_output_fields`，在 `/trigger` 上还可附加 `deliver` 配置。也接受由输入组成的纯 JSON 数组，本页示例使用此格式。详见[请求体](https://docs.brightdata.com/cn/api-reference/scrapers/synchronous-requests.md#请求体)。

## 功能与限制

| 功能 | 详情 |
| :- | :- |
| **输出格式** | NDJSON（默认）、JSON、JSON lines、CSV 和 Parquet（[各格式适用范围](https://docs.brightdata.com/cn/products/scrapers/scrapers-library/data-delivery.md#支持哪些输出格式)） |
| **同步请求最大 URL 数** | 20 |
| **异步请求最大 URL 数** | 无限制，每个任务最多 1 GB 输入 |
| **数据新鲜度** | 实时（按需抓取） |
| **投递方式** | API 下载、[webhook](https://docs.brightdata.com/cn/products/scrapers/scrapers-library/data-delivery.md)、[Amazon S3](https://docs.brightdata.com/cn/products/scrapers/scrapers-library/data-delivery.md)、Snowflake、Azure、GCS（[全部目标](https://docs.brightdata.com/cn/products/scrapers/scrapers-library/data-delivery.md)） |
| **计费** | 按成功记录计费（[查看价格](https://www.bright.cn/pricing/web-scraper)） |

## 常见问题

### 数据是否实时爬取？

是的。每个请求都触发实时爬取。没有缓存或过期数据。处理时间取决于目标网站状况和爬虫负载。Bright Data Instagram Scraper API 不公布固定的响应时间。同步请求最多等待 1 分钟，之后返回 HTTP `202` 和 `snapshot_id`，并继续以异步方式采集。发现（discovery）请求始终以异步方式运行，耗时更长，具体取决于结果数量。

### 响应时间为什么会发生变化？

Instagram 会调整其页面的提供方式，Bright Data Instagram Scraper API 的采集器也会相应更新。即使成功率保持不变，采集器更新也可能改变一次爬取所需的时间。对于生产环境的工作负载，请基于[异步工作流](https://docs.brightdata.com/cn/products/scrapers/scrapers-library/async-requests.md)或 [Webhook 投递](https://docs.brightdata.com/cn/products/scrapers/scrapers-library/data-delivery.md)进行构建，这样较长的运行时间不会破坏集成。

### URL 收集和发现有什么区别？

**URL 收集**爬取你提供的特定 Instagram 页面（例如资料 URL）。**发现**查找与搜索条件匹配的 Instagram 内容（例如资料中的所有帖子）并爬取结果。发现请求在两个端点上均可使用。在 `/scrape` 上通常会超过 1 分钟限制并返回 HTTP `202` 和 `snapshot_id`，因此发现请求请使用异步 [`/trigger`](https://docs.brightdata.com/cn/products/scrapers/scrapers-library/async-requests) 端点。

### 与使用代理或 Web Unlocker API 抓取有何不同？

使用代理或 Web Unlocker API 抓取时，您仍需编写和维护自己的解析逻辑，并在目标网站页面结构变化时随时更新。Bright Data Scraper API 处理整个链路：代理轮换、反爬绕过与解析。您只需发送 URL 或关键词，即可获得干净的结构化 JSON，无需自建抓取基础设施或维护解析器。

### GitHub 上有开源的 Instagram 爬虫吗？

有。Bright Data 维护两个调用 Bright Data Instagram Scraper API 的开源 Instagram 爬虫：Python 版 [instagram-scraper](https://github.com/brightdata/instagram-scraper) 和 Node.js 版 [instagram-scraper-node](https://github.com/brightdata/instagram-scraper-node)。两者均采用 Apache 2.0 许可证，GitHub Actions 定时任务每天对照实时 API 检查。

## 后续步骤

> [card] [快速入门](https://docs.brightdata.com/products/scrapers/instagram/quickstart.md)
>
> 5 分钟内爬取你的第一个 Instagram 资料。

> [card] [端点](https://docs.brightdata.com/products/scrapers/instagram/send-first-request.md)
>
> 每个端点一个请求，附实际抓取的响应。

> [card] [API 参考](https://docs.brightdata.com/api-reference/scrapers/social-media-apis/instagram-profiles-collect-by-url.md)
>
> 端点规范、参数和响应架构。
