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

# Đối tượng

> Liệt kê các đối tượng tùy chỉnh trên tài khoản quảng cáo Reddit, kèm loại, quy mô và việc một lượt boost đã có thể nhắm tới từng đối tượng hay chưa.

Liệt kê các đối tượng tùy chỉnh trên tài khoản quảng cáo Reddit: danh sách khách hàng của bạn, khách truy cập trang web và mọi đối tượng khác trên tài khoản. Dùng các id trong `targeting.audiences` hoặc `targeting.excludedAudiences` khi bạn [boost một bài đăng](https://www.ayrshare.com/docs/apis/ads/reddit/boost-post.md#audiences).

<ul>
  <li>Các đối tượng tạo trong Reddit Ads Manager cũng được liệt kê, không chỉ những đối tượng tạo qua Ayrshare.</li>
  <li>`status.ready` là `true` khi Reddit đã khớp được ít nhất 1.000 người và một lượt boost có thể nhắm tới đối tượng.</li>
  <li>`size` là ước tính riêng của Reddit, dưới dạng cận dưới và cận trên. Giá trị là `null` khi Reddit chưa có ước tính.</li>
  <li>Kết quả không được lưu đệm: quy mô và trạng thái sẵn sàng của đối tượng thay đổi trong khi nó được điền.</li>
</ul>

## Tham số Header

**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`

## Tham số truy vấn

**accountId** `string` *required*

ID tài khoản quảng cáo Reddit của bạn, ví dụ `a2_abc123`.

**limit** `number`

Số đối tượng tối đa trả về trong một trang, từ 1 đến 2000. Số lớn hơn sẽ trả về 2000.

**next** `string`

Khi phản hồi có `meta.pagination.hasMore: true`, hãy gửi giá trị `meta.pagination.next` của nó vào đây để lấy trang tiếp theo. Giữ nguyên các tham số khác: một giá trị `next` từ yêu cầu khác sẽ trả về `code: 101`.

## Phản hồi

Mỗi đối tượng có:

<ul>
  <li>`id`: id đối tượng dùng khi boost, thêm người hoặc xóa.</li>
  <li>`name`: tên hiển thị trong Reddit Ads Manager.</li>
  <li>`type`: `customerList`, `website`, `engagement`, hoặc `other` cho loại đối tượng mà Ayrshare không tạo, chẳng hạn đối tượng tương tự (lookalike).</li>
  <li>`size`: `{ lower, upper }`, ước tính của Reddit, hoặc `null`.</li>
  <li>`status`: `{ ready, code, description }`. `ready` là `true` khi một lượt boost có thể nhắm tới đối tượng ngay bây giờ. `description` là trạng thái của Reddit, chẳng hạn `PENDING`, `VALID` hoặc `NOT_ENOUGH_MATCHES_ERROR`. `code` luôn là `null` trên Reddit.</li>
  <li>`created`: thời điểm tạo đối tượng, theo ISO 8601, hoặc `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.