> ## 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 Scraper API 端点

> 使用可复制粘贴的代码示例向Bright Data Instagram爬虫API的所有四个端点发出同步请求。

本指南介绍如何向每个 Bright Data Instagram Scraper API 端点发送同步请求。完成后，您将获得用于档案、帖子、短视频和评论的工作示例。

## 前置条件

* 拥有[Bright Data 账户](https://www.bright.cn/products/web-scraper/instagram?hs_signup=1\&utm_source=docs)并具有活跃的 API 密钥
* 已完成[快速入门](/cn/products/scrapers/instagram/quickstart)

## 请求结构

每个同步请求都遵循相同的模式：

```http theme={null}
POST https://api.brightdata.com/datasets/v3/scrape?dataset_id={DATASET_ID}&format=json
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

[{"url": "https://www.instagram.com/..."}]
```

端点之间唯一改变的是 `dataset_id` 和输入 URL 格式。

<Note>
  `/scrape` 端点专为实时的单 URL 请求设计。Bright Data 建议每个请求不超过 20 个 URL（这是最佳实践，而非硬性限制），端点最多等待 1 分钟。如果采集耗时更长，响应为 HTTP `202`，返回 `snapshot_id` 而不是数据，采集将继续以异步方式进行。请通过[异步请求](/cn/products/scrapers/scrapers-library/async-requests)获取结果，或使用 [Webhook 投递](/cn/products/scrapers/scrapers-library/data-delivery)接收结果。
</Note>

## 档案

**数据集 ID：** `gd_l1vikfch901nx3by4`

```bash theme={null}
curl -X POST \
  "https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_l1vikfch901nx3by4&format=json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[{"url": "https://www.instagram.com/instagram"}]'
```

您应该会看到 `200` 响应。处理时间取决于目标网站状况和爬虫负载。

<Accordion title="示例响应">
  ```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_..."
    }
  ]
  ```
</Accordion>

[完整档案响应架构](/cn/api-reference/scrapers/social-media-apis/instagram-profiles-collect-by-url)

### Instagram 个人资料抓取器返回哪些输出字段？

Instagram 个人资料抓取器（`gd_l1vikfch901nx3by4`，`collect_by_url`）返回 26 个输出字段。字段说明保留 API 返回的英文原文。

<Accordion title="输出字段（26）">
  | 字段 | 类型 | 说明 |
  | - | - | - |
  | `account` | text | The username or handle of the Instagram account |
  | `fbid` | text | Facebook ID associated with the account |
  | `id` | text | Unique identifier for the Instagram account |
  | `followers` | number | The number of followers for the account |
  | `posts_count` | number | The total count of posts made by the account |
  | `is_verified` | boolean | Indicates whether the account is verified |
  | `external_url` | array | External websites that users may link to from their Instagram profiles, such as personal blogs or online stores |
  | `biography` | text | Brief descriptions or statements that users write to introduce themselves or share their interests and passions on Instagram |
  | `post_hashtags` | array | Keywords or phrases that the user specified in their top posts preceded by the "#" symbol that help categorize and discover content related to a specific topic |
  | `following` | number | The number of accounts that the account is following |
  | `posts` | array | Data regarding the top posts that the user has published |
  | `profile_image_link` | text | URL that link directly to the Instagram profile image |
  | `profile_url` | url | URL that link directly to the Instagram profile |
  | `profile_name` | text | The name associated with the account's profile |
  | `highlights_count` | number | The count of highlights (featured stories) on the account |
  | `highlights` | array | Data regarding the highlights that the user has published |
  | `full_name` | text | The full name associated with the account |
  | `is_private` | boolean | Indicates whether the account is private |
  | `bio_hashtags` | array | Keywords or phrases that the user specified in his bio preceded by the "#" symbol that help categorize and discover content related to a specific topic |
  | `url` | url | URL pointing to the account's profile |
  | `is_joined_recently` | boolean | Indicates if the account has joined Instagram recently |
  | `partner_id` | text | The partner ID associated with the account |
  | `email_address` | text | Email address extracted from profile description |
  | `external_url_title` | object | External websites that users may link to from their Instagram profiles, such as personal blogs or online stores, with their descriptions |
  | `pronouns` | text | The profile's pronouns (if available) |
  | `external_urls` | array | External URLs |
</Accordion>

包含输入 schema 的机器可读版本：[`/scrapers/gd_l1vikfch901nx3by4.json`](/scrapers/gd_l1vikfch901nx3by4.json)

## 帖子

**数据集 ID：** `gd_lk5ns7kz21pck8jpis`

```bash theme={null}
curl -X POST \
  "https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_lk5ns7kz21pck8jpis&format=json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[{"url": "https://www.instagram.com/p/Cuf4s0MNqNr"}]'
```

<Accordion title="示例响应">
  ```json theme={null}
  [
    {
      "url": "https://www.instagram.com/p/Cuf4s0MNqNr",
      "user_posted": "tin***i",
      "description": "Pet tattoo with forget me nots 🖤💙💛\n.\n.\n.\n#tinybaki #littlepondstudio #cattattoo #pettattoo #forgetmenot #crayontattoo #forgetmenottattoo #forgetmenots #fl...",
      "num_comments": 97,
      "date_posted": "2023-07-10T01:21:31.000Z",
      "likes": 123941,
      "hashtags": [
        "#tinybaki"
      ],
      "content_type": "Carousel",
      "shortcode": "Cuf4s0MNqNr",
      "post_id": "3143480435228975979"
    }
  ]
  ```
</Accordion>

[完整帖子响应架构](/cn/api-reference/scrapers/social-media-apis/instagram-posts-collect-by-url)

### Instagram 帖子抓取器返回哪些输出字段？

Instagram 帖子抓取器（`gd_lk5ns7kz21pck8jpis`，`collect_by_url`）返回 40 个输出字段。字段说明保留 API 返回的英文原文。

<Accordion title="输出字段（40）">
  | 字段 | 类型 | 说明 |
  | - | - | - |
  | `url` | url | The direct URL of the Instagram post |
  | `user_posted` | text | Username of the post creator |
  | `description` | text | Post text description |
  | `hashtags` | array | Hashtags used in the post |
  | `num_comments` | number | Number of comments |
  | `date_posted` | date | Post publication date |
  | `likes` | number | Number of likes on the post |
  | `photos` | array | URLs of attached photos, URLs can be expired due to Instagram policy |
  | `videos` | array | URLs of attached videos, URLs can be expired due to Instagram policy |
  | `location` | array | Geographical location associated with the post |
  | `location_details` | object | Detailed geographical location metadata as returned by Instagram |
  | `latest_comments` | array | Recent comments on the post |
  | `post_id` | text | Unique post identifier |
  | `discovery_input` | object | Discovery input values used to trigger the collection |
  | `has_handshake` | boolean | Indicates if the post has a handshake (collaborative agreement between accounts) |
  | `shortcode` | text | The shortcode of the Instagram post, used in the post URL path |
  | `content_type` | text | The type of content — Posts or Reels |
  | `pk` | text | The primary key of the media content as assigned by Instagram |
  | `content_id` | text | The content ID of the media item |
  | `engagement_score_view` | number | Video view count used as an engagement score metric |
  | `thumbnail` | text | The URL of the post's display image or video thumbnail |
  | `video_view_count` | text | The number of views on the video post |
  | `product_type` | text | The type of product associated with the post, such as 'clips' for Reels |
  | `coauthor_producers` | array | List of co-authors or producers who collaborated on the post |
  | `tagged_users` | array | List of users tagged in the post |
  | `video_play_count` | number | The number of times the video has been played |
  | `followers` | number | Number of followers the post owner has at the time of collection |
  | `posts_count` | number | The total count of posts made by the account at the time of collection |
  | `profile_image_link` | text | URL linking directly to the Instagram profile image of the post owner |
  | `is_verified` | boolean | Indicates whether the post owner's account is verified |
  | `partnership_details` | object | Details of the paid partnership brand associated with the post |
  | `user_posted_id` | text | The Instagram user ID of the account that posted the post |
  | `post_content` | array | List of media items (photos or videos) attached to the post, including carousel items |
  | `audio` | object | Audio track metadata associated with the post or Reel |
  | `profile_url` | url | URL of the Instagram profile that posted the post |
  | `videos_duration` | array | List of video durations for each video attached to the post |
  | `images` | array | List of image objects attached to the post |
  | `alt_text` | text | Accessibility alt text for the post's main image — descriptive text that conveys the meaning of the image for blind or visually impaired users |
  | `photos_number` | number | Total number of photos attached to the post |
  | `audio_url` | url | Direct URL of the audio track used in the post |
</Accordion>

包含输入 schema 的机器可读版本：[`/scrapers/gd_lk5ns7kz21pck8jpis.json`](/scrapers/gd_lk5ns7kz21pck8jpis.json)

## 短视频

**数据集 ID：** `gd_lyclm20il4r5helnj`

```bash theme={null}
curl -X POST \
  "https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_lyclm20il4r5helnj&format=json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[{"url": "https://www.instagram.com/reel/C5Rdyj_q7YN/"}]'
```

<Accordion title="示例响应">
  ```json theme={null}
  [
    {
      "url": "https://www.instagram.com/reel/C5Rdyj_q7YN/",
      "user_posted": "dex***t",
      "description": "Bro is a cat-of-all-trades 🧳 \n\n#catoftheday #orangecatsofinstagram #orangecatbehavior #kitten #asmr #orangecat #catsofig #cardboardcat",
      "num_comments": 7899,
      "date_posted": "2024-04-02T20:44:39.000Z",
      "likes": 3481930,
      "views": null,
      "video_play_count": null,
      "length": "46.79999923706055",
      "shortcode": "C5Rdyj_q7YN"
    }
  ]
  ```
</Accordion>

[完整短视频响应架构](/cn/api-reference/scrapers/social-media-apis/instagram-reels-collect-by-url)

### Instagram 短视频抓取器返回哪些输出字段？

Instagram 短视频抓取器（`gd_lyclm20il4r5helnj`，`collect_by_url`）返回 27 个输出字段。字段说明保留 API 返回的英文原文。

<Accordion title="输出字段（27）">
  | 字段 | 类型 | 说明 |
  | - | - | - |
  | `url` | url | URL of the reel |
  | `user_posted` | text | Username of the reel creator |
  | `description` | text | Reel text description |
  | `hashtags` | array | Hashtags used in the post |
  | `num_comments` | number | Number of comments |
  | `date_posted` | date | Reel publication date |
  | `likes` | number | Number of likes |
  | `views` | number | Number of views |
  | `video_play_count` | number | The number of times the Reel has been played |
  | `top_comments` | array | Top comments |
  | `post_id` | text | Unique post identifier |
  | `thumbnail` | url | The URL of the reel's display image or video thumbnail |
  | `shortcode` | text | The shortcode of the Instagram reel |
  | `content_id` | text | The content ID of the media |
  | `product_type` | text | The type of product, such as "clips" |
  | `coauthor_producers` | array | Coauthor producers |
  | `tagged_users` | array | Tagged users |
  | `length` | text | Length of the reel |
  | `video_url` | url | The video url |
  | `audio_url` | url | link to the audio connected to the post |
  | `posts_count` | number | The profile's number of posts |
  | `followers` | number | The profile's number of followers |
  | `following` | number | The profile's number of following |
  | `user_profile_url` | url | User profile URL |
  | `is_paid_partnership` | boolean | Is the post sponsored |
  | `is_verified` | boolean | Is verified |
  | `profile_image_link` | url | profile image link |
</Accordion>

包含输入 schema 的机器可读版本：[`/scrapers/gd_lyclm20il4r5helnj.json`](/scrapers/gd_lyclm20il4r5helnj.json)

## 评论

**数据集 ID：** `gd_ltppn085pokosxh13`

```bash theme={null}
curl -X POST \
  "https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_ltppn085pokosxh13&format=json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[{"url": "https://www.instagram.com/p/Cuf4s0MNqNr"}]'
```

<Accordion title="示例响应">
  ```json theme={null}
  [
    {
      "url": "https://www.instagram.com/p/Cuf4s0MNqNr",
      "comment_user": "ink***e",
      "comment_user_url": "https://www.instagram.com/ink***e",
      "comment_date": "2026-08-18T03:37:10.000Z",
      "comment": "Wow! Awesome 🙌🙌🙌🔥🔥🔥🔥🔥",
      "likes_number": 0,
      "replies_number": 0,
      "comment_id": "18112992241972031",
      "post_url": "https://www.instagram.com/p/Cuf4s0MNqNr"
    }
  ]
  ```
</Accordion>

[完整评论响应架构](/cn/api-reference/scrapers/social-media-apis/instagram-comments-collect-by-url)

### Instagram 评论抓取器返回哪些输出字段？

Instagram 评论抓取器（`gd_ltppn085pokosxh13`，`collect_by_url`）返回 14 个输出字段。字段说明保留 API 返回的英文原文。

| 字段 | 类型 | 说明 |
| - | - | - |
| `url` | url | URL |
| `comment_user` | text | The username commenting |
| `comment_user_url` | url | Url of the commenting user |
| `comment_date` | text | Date when the comment was made |
| `comment` | text | The comment of the comment |
| `likes_number` | number | Number of likes on the comment |
| `replies_number` | number | Number of replies on the comment |
| `replies` | array | replies on the comment |
| `hashtag_comment` | array | The hashtags used in the comment |
| `tagged_users_in_comment` | array | The usernames tagged in the comment |
| `post_url` | url | The URL of the post itself |
| `post_user` | text | The user posting the original post |
| `comment_id` | text | unique id for each comment |
| `post_id` | text | Post ID |

包含输入 schema 的机器可读版本：[`/scrapers/gd_ltppn085pokosxh13.json`](/scrapers/gd_ltppn085pokosxh13.json)

## 快速参考：数据集 ID

| 端点 | 数据集 ID | URL 模式 |
| :- | :- | :- |
| 档案 | `gd_l1vikfch901nx3by4` | `instagram.com/{username}` |
| 帖子 | `gd_lk5ns7kz21pck8jpis` | `instagram.com/p/{shortcode}` |
| 短视频 | `gd_lyclm20il4r5helnj` | `instagram.com/reel/{shortcode}` |
| 评论 | `gd_ltppn085pokosxh13` | `instagram.com/p/{shortcode}` 或 `instagram.com/reel/{shortcode}` |

## 输出格式

使用 `format` 查询参数控制响应格式：

| 值 | 描述 |
| :- | :- |
| `json` | JSON 数组 |
| `ndjson` | 换行分隔的 JSON，每行一条记录（默认） |
| `csv` | 逗号分隔值 |

以上是 `/scrape` 的 `format` 值。完整列表（NDJSON（默认）、JSON、JSON lines、CSV 和 Parquet）及各格式适用范围见[输出格式](/cn/products/scrapers/scrapers-library/data-delivery#支持哪些输出格式)。

## 相关内容

<CardGroup cols={2}>
  <Card title="异步批量请求" icon="layer-group" href="/products/scrapers/scrapers-library/async-requests">
    在单个批量作业中爬取数百个 URL。
  </Card>

  <Card title="API 参考" icon="code" href="/api-reference/scrapers/social-media-apis/instagram-profiles-collect-by-url">
    完整的参数和响应字段参考。
  </Card>
</CardGroup>
