> ## 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 廣告帳戶的自訂受眾，包括每個受眾的類型、規模，以及推廣是否已可鎖定它。

列出 Reddit 廣告帳戶的自訂受眾：您的顧客名單、網站訪客，以及帳戶上的任何其他受眾。在[推廣貼文](https://www.ayrshare.com/docs/apis/ads/reddit/boost-post.md#audiences)時，將這些 ID 用於 `targeting.audiences` 或 `targeting.excludedAudiences`。

<ul>
  <li>在 Reddit Ads Manager 中建立的受眾也會列出，而不只是透過 Ayrshare 建立的受眾。</li>
  <li>當 Reddit 比對到至少 1,000 人、推廣可以鎖定該受眾時，`status.ready` 為 `true`。</li>
  <li>`size` 是 Reddit 自己的估計值，以下限和上限表示。在 Reddit 沒有估計值時為 `null`。</li>
  <li>結果不會快取：受眾在填充過程中，其規模和就緒狀態會變化。</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`

## 查詢參數

**accountId** `string` *required*

您的 Reddit 廣告帳戶 ID，例如 `a2_abc123`。

**limit** `number`

每頁返回的最大受眾數，1 到 2000。更大的數字會返回 2000。

**next** `string`

當回應包含 `meta.pagination.hasMore: true` 時，將其 `meta.pagination.next` 值傳送到這裡以取得下一頁。其他參數保持不變：來自其他請求的 `next` 值會返回 `code: 101`。

## 回應

每個受眾包含：

<ul>
  <li>`id`：推廣、新增人員或刪除時使用的受眾 ID。</li>
  <li>`name`：在 Reddit Ads Manager 中顯示的名稱。</li>
  <li>`type`：`customerList`、`website`、`engagement`，或 Ayrshare 不建立的受眾類型（例如類似受眾）為 `other`。</li>
  <li>`size`：`{ lower, upper }`，Reddit 的估計值，或 `null`。</li>
  <li>`status`：`{ ready, code, description }`。當推廣現在可以鎖定該受眾時，`ready` 為 `true`。`description` 是 Reddit 的狀態，例如 `PENDING`、`VALID` 或 `NOT_ENOUGH_MATCHES_ERROR`。在 Reddit 上，`code` 一律為 `null`。</li>
  <li>`created`：受眾的建立時間，ISO 8601 格式，或 `null`。</li>
</ul>

```bash cURL theme={"system"}
curl \
-H "Authorization: Bearer API_KEY" \
-X GET "https://api.ayrshare.com/api/ads/reddit/audiences?accountId=a2_abcdefg"
```

```javascript JavaScript theme={"system"}
const API_KEY = "API_KEY";

fetch("https://api.ayrshare.com/api/ads/reddit/audiences?accountId=a2_abcdefg", {
      method: "GET",
      headers: {
        "Authorization": `Bearer ${API_KEY}`
      }
    })
      .then((res) => res.json())
      .then((json) => console.log(json))
      .catch(console.error);
```

```python Python theme={"system"}
import requests

headers = {'Authorization': 'Bearer API_KEY'}

r = requests.get('https://api.ayrshare.com/api/ads/reddit/audiences?accountId=a2_abcdefg', headers=headers)

print(r.json())
```

```json 200: Success theme={"system"}
{
  "status": "success",
  "audiences": [
    {
      "id": "ca.129482487242828",
      "name": "Buyers",
      "type": "customerList",
      "size": { "lower": 140000, "upper": 160000 },
      "status": { "ready": true, "code": null, "description": "VALID" },
      "created": "2026-11-20T09:12:00.000Z"
    },
    {
      "id": "ca.129482487242999",
      "name": "Site visitors 30d",
      "type": "website",
      "size": null,
      "status": { "ready": false, "code": null, "description": "PENDING" },
      "created": "2026-12-01T16:40:00.000Z"
    }
  ],
  "meta": { "pagination": { "hasMore": false } }
}
```

```json 400: Missing account 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": "accountId is required."
}
```

```json 400: Reddit failed the request theme={"system"}
{
  "action": "ads",
  "status": "error",
  "code": 370,
  "message": "Error getting audiences. Please try again.",
  "details": "Reddit's reason"
}
```


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