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

# 如何通过 API 获取所有帖子 | Ayrshare 文档

> 了解如何使用 Ayrshare API 获取所有已发布和已排期的社交媒体帖子，包括每篇帖子的历史、状态与分析数据。

本指南介绍如何通过不同方式获取与你账号相关联的所有帖子，无论它们来自 Ayrshare 还是其他来源。

## 获取所有用户资料的所有帖子（Ayrshare 来源）

1. 获取与主资料相关联的所有用户资料：

   * 在请求头中使用你的 [Authorization Bearer](/apis/overview#authorization) 令牌
   * 调用 [Get User Profiles](/apis/profiles/get-profiles) 端点

2. 获取 profile keys：

   * 从每个用户资料中提取 `refId`
   * 使用你自己的存储创建一个关联用户资料 key 列表

3. 获取帖子：
   * 使用 [Posts History](/apis/history/get-history) 端点
   * 获取每个用户资料 key 关联的所有帖子

## 获取所有用户在某个特定社交网络上的帖子（包括 Ayrshare 与非 Ayrshare 来源）

1. 获取与主资料相关联的所有用户资料：

   * 在请求头中使用你的 [Authorization Bearer](/apis/overview#authorization) 令牌
   * 调用 [Get User Profiles](/apis/profiles/get-profiles) 端点

2. 获取 profile keys：

   * 从每个用户资料中提取 `refId`
   * 使用你自己的存储创建一个关联用户资料 key 列表

3. 获取特定社交网络的帖子
   * 使用 [Posts History for a Platform](/apis/history/history-platform) 端点
   * 在 `platform` 路径参数中传入平台名称。可选值：`facebook`、
     `instagram`、`linkedin`、`pinterest`、`snapchat`、`threads`、`tiktok`、`twitter`、`youtube`
   * 获取每个用户资料 key 关联的所有对应平台帖子
