curl \
-H "Authorization: Bearer API_KEY" \
-X GET "https://api.ayrshare.com/api/ads/reddit/audiences?accountId=a2_abcdefg"
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);
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())
{
"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 } }
}
{
"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."
}
{
"action": "ads",
"status": "error",
"code": 370,
"message": "Error getting audiences. Please try again.",
"details": "Reddit's reason"
}
Reddit Ads
Đố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.
GET
/
ads
/
reddit
/
audiences
curl \
-H "Authorization: Bearer API_KEY" \
-X GET "https://api.ayrshare.com/api/ads/reddit/audiences?accountId=a2_abcdefg"
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);
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())
{
"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 } }
}
{
"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."
}
{
"action": "ads",
"status": "error",
"code": 370,
"message": "Error getting audiences. Please try again.",
"details": "Reddit's reason"
}
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.
- 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.
status.readylàtruekhi 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.sizelà ước tính riêng của Reddit, dưới dạng cận dưới và cận trên. Giá trị lànullkhi Reddit chưa có ước tính.- 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.
Tham số Header
Tham số truy vấn
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ó:id: id đối tượng dùng khi boost, thêm người hoặc xóa.name: tên hiển thị trong Reddit Ads Manager.type:customerList,website,engagement, hoặcothercho loại đối tượng mà Ayrshare không tạo, chẳng hạn đối tượng tương tự (lookalike).size:{ lower, upper }, ước tính của Reddit, hoặcnull.status:{ ready, code, description }.readylàtruekhi một lượt boost có thể nhắm tới đối tượng ngay bây giờ.descriptionlà trạng thái của Reddit, chẳng hạnPENDING,VALIDhoặcNOT_ENOUGH_MATCHES_ERROR.codeluôn lànulltrên Reddit.created: thời điểm tạo đối tượng, theo ISO 8601, hoặcnull.
curl \
-H "Authorization: Bearer API_KEY" \
-X GET "https://api.ayrshare.com/api/ads/reddit/audiences?accountId=a2_abcdefg"
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);
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())
{
"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 } }
}
{
"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."
}
{
"action": "ads",
"status": "error",
"code": 370,
"message": "Error getting audiences. Please try again.",
"details": "Reddit's reason"
}