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

# Twitter API Scrapers

## 概览

Twitter API 套件提供多种类型的 API，每种 API 都针对 Twitter 数据收集的特定需求而设计。以下是这些 API 如何连接和交互的概览，基于可用功能：

<CardGroup cols={1}>
  <Card title="个人资料 API" icon="user" href="/cn/api-reference/web-scraper-api/social-media-apis/twitter#profiles-api">
    该 API 允许用户基于单一输入（个人资料 URL）收集个人资料详细信息。

    <br />

    *   **发现功能**：

    *   不适用

    <br />

    *   **重要字段**：

    *   `url`，`profile_name`，`is_verified`，`followers`。
  </Card>

  <Card title="帖子 API" icon="images" href="/cn/api-reference/web-scraper-api/social-media-apis/twitter#posts-api">
    该 API 允许用户基于单一输入 URL 收集多个帖子。

    <br />

    *   **发现功能**：

    *   通过个人资料 URL 发现。

    <br />

    *   **重要字段**：

    *   `name`，`description`，`replies`，`likes`。
  </Card>
</CardGroup>

## 个人资料 API

### 通过 URL 获取个人资料

该 API 允许用户使用提供的个人资料 URL 获取详细的 Twitter 个人资料信息。

**输入参数**：

<ParamField path="URL" type="string" required="true">
  Twitter 个人资料 URL。
</ParamField>

<ParamField path="max_number_of_posts" type="number">
  要收集的帖子数量。如果省略，则没有限制。
</ParamField>

**输出结构**：\
包含全面的数据点：

* **个人资料详情**：\
  `x_id`，`url`，`id`，`profile_name`，`biography`，`is_verified`，`profile_image_link`，`external_link`，`date_joined`，`location`，`birth_date`，`posts_count`，`posts`，`suggested_profiles`，`is_business_account`，`is_government_account`，`category_name`。

  > 获取所有数据点，请[点击这里](https://brightdata.com/cp/data_api/gd_lwxmeb2u1cniijd7t4?id=all\&tab=overview)。

* **互动指标**：\
  `followers`，`following`，`subscriptions`。

* **帖子详情**：\
  `posts`。

该 API 允许用户获取详细的 Twitter 个人资料信息，包括用户互动指标、帖子详情等，提供对用户活动和个人资料数据的深入洞察。

## 帖子 API

### 通过 URL 采集

该 API 允许用户使用提供的帖子 URL 获取特定 Twitter 帖子的详细信息。

**输入参数**：

<ParamField path="URL" type="string" required="true">
  Twitter 帖子 URL。
</ParamField>

<Note>API 限制：每个输入最多 1000 篇帖子。</Note>

**输出结构**：\
包含全面的数据点：

* **帖子详情**：\
  `id`，`user_posted`，`name`，`description`，`date_posted`，`url`，`tagged_users`，`replies`，`reposts`，`likes`，`views`，`external_url`，`hashtags`，`quotes`，`bookmarks`，`external_image_urls`，`videos`，`quoted_post`。

  > 获取所有数据点，请[点击这里](https://brightdata.com/cp/data_api/gd_lwxkxvnf1cynvib9co?id=all\&tab=overview)。

* **用户个人资料详情**：\
  `followers`，`biography`，`posts_count`，`profile_image_link`，`following`，`is_verified`。

* **父级帖子详情**：\
  `parent_post_details`。

该 API 允许用户获取特定 Twitter 帖子的详细信息，包括用户详情、互动指标和媒体内容，提供对帖子互动和用户活动的深入洞察。

### 通过个人资料 URL 发现帖子

该 API 允许用户在指定日期范围内发现并获取特定 Twitter 个人资料的帖子。

**输入参数**：

<ParamField path="URL" type="string" required="true">
  Twitter 个人资料 URL。
</ParamField>

<ParamField path="start_date" type="string">
  过滤帖子的起始日期，格式为 MM-DD-YYYY。
</ParamField>

<ParamField path="end_date" type="string">
  过滤帖子的结束日期，格式为 MM-DD-YYYY。
</ParamField>

**输出结构**：\
包含全面的数据点：

* **帖子详情**：\
  `id`，`user_posted`，`name`，`description`，`date_posted`，`url`，`tagged_users`，`replies`，`reposts`，`likes`，`views`，`external_url`，`hashtags`，`quotes`，`bookmarks`，`external_image_urls`，`videos`，`quoted_post`。

  > 获取所有数据点，请[点击这里](https://brightdata.com/cp/data_api/gd_lwxkxvnf1cynvib9co/profile_url?id=all\&tab=overview)。

* **用户个人资料详情**：\
  `followers`，`biography`，`posts_count`，`profile_image_link`，`following`，`is_verified`。

* **父级帖子详情**：\
  `parent_post_details`。

该 API 允许用户在指定时间范围内从特定 Twitter 个人资料中获取帖子，提供详细的帖子互动、用户数据和媒体内容的洞察。
