> ## 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.

# 洞察

> 获取您已推广的 Reddit 广告的实时每日花费、展示次数和点击次数。

获取您通过[推广帖子](https://www.ayrshare.com/docs/apis/ads/reddit/boost-post.md)创建的 Reddit 广告的表现数据，每条广告每天一行，实时从 Reddit 读取。

<ul>
  <li>Reddit 洞察仅按广告报告：请发送 `level=ad`。任何其他层级都会返回 `code: 101`。</li>
  <li>在 `ids` 中指定最多 50 条广告，或只发送 `accountId`，以报告您在该账户中推广的广告。如果该账户中您的广告超过 50 条，会返回 `code: 101`：请改为指定广告 ID。</li>
  <li>时间范围最多 90 天（含首尾两天），以您发送的 `endDate` 为准计算。不指定日期时，范围为过去 30 天加上今天。`startDate` 最早可为 37 个月前，且不能是未来的日期。晚于今天的 `endDate` 会被截至今天。</li>
  <li>Reddit 不报告 `reach`、`actions` 和 `conversionValue`。在 `metrics` 中请求这些指标会返回 `code: 101`。Reddit 不支持 `breakdowns`。</li>
  <li>`spend` 使用广告账户的币种，并在 `currency` 中显示。仅当该币种为 USD 时才会设置 `spendUsd`，否则为 `null`。</li>
  <li>由其他 Profile推广的广告，或在其他广告网络上推广的广告，会返回 `code: 400`。</li>
  <li>一次请求中的所有广告必须属于同一个广告账户。来自多个账户的广告会返回 `code: 101`。</li>
  <li>完整结果在同一页中返回。`meta.pagination.hasMore` 始终为 `false`。</li>
</ul>

## 请求头参数

**Authorization** `string` *required*

[API Key](https://www.ayrshare.com/docs/apis/overview.md#authorization) of the Primary Profile.

Format: `Authorization: Bearer API_KEY`
**Profile-Key** `string`

[Profile Key](https://www.ayrshare.com/docs/apis/overview.md#profile-key-format) of a User Profile.

Format: `Profile-Key: PROFILE_KEY`

## 查询参数

**level** `string` *required*

必须为 `ad`。

**ids** `string`

Reddit 广告 ID，以逗号分隔（`ids=2707300000000000001,2707300000000000002`）或重复传入。最多 50 个。除非发送 `accountId`，否则必填。

**accountId** `string`

您的 Reddit 广告账户 ID，例如 `a2_abc123`。未发送 `ids` 时必填。与 `ids` 一起发送时，必须是这些广告所属的账户，否则会返回 `code: 400`。

**metrics** `string`

要返回的指标，以逗号分隔或重复传入：`spend`、`impressions`、`clicks`、`cpm`、`cpc`、`ctr`。默认返回全部指标。

**startDate** `string` (default: 30 天前)

第一天，格式为 `YYYY-MM-DD`（UTC）。

**endDate** `string` (default: 今天)

最后一天，格式为 `YYYY-MM-DD`（UTC）。不得早于 `startDate`。

```bash cURL theme={"system"}
curl \
  -H "Authorization: Bearer API_KEY" \
  -X GET "https://api.ayrshare.com/api/ads/reddit/insights?level=ad&ids=2707300000000000001&startDate=2026-11-20&endDate=2026-11-21"
```

```json 200: Success theme={"system"}
{
  "status": "success",
  "platform": "reddit",
  "level": "ad",
  "startDate": "2026-11-20",
  "endDate": "2026-11-21",
  "insights": [
    {
      "date": "2026-11-20",
      "level": "ad",
      "id": "2707300000000000001",
      "currency": "USD",
      "spend": 6.1,
      "impressions": 1800,
      "clicks": 27,
      "cpm": 3.39,
      "cpc": 0.23,
      "ctr": 1.5,
      "spendUsd": 6.1
    },
    {
      "date": "2026-11-21",
      "level": "ad",
      "id": "2707300000000000001",
      "currency": "USD",
      "spend": 8.4,
      "impressions": 2400,
      "clicks": 42,
      "cpm": 3.5,
      "cpc": 0.2,
      "ctr": 1.75,
      "spendUsd": 8.4
    }
  ],
  "count": 2,
  "meta": {
    "pagination": { "hasMore": false }
  }
}
```

```json 400: Unsupported level theme={"system"}
{
  "action": "request",
  "status": "error",
  "code": 101,
  "message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
  "details": "Insights on reddit report by ad: use level \"ad\" with the ad ids."
}
```

```json 400: Window too long theme={"system"}
{
  "action": "request",
  "status": "error",
  "code": 101,
  "message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
  "details": "Insights on reddit cover at most 90 days per request."
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.