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
受眾
列出 Reddit 廣告帳戶的自訂受眾,包括每個受眾的類型、規模,以及推廣是否已可鎖定它。
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"
}
列出 Reddit 廣告帳戶的自訂受眾:您的顧客名單、網站訪客,以及帳戶上的任何其他受眾。在推廣貼文時,將這些 ID 用於
targeting.audiences 或 targeting.excludedAudiences。
- 在 Reddit Ads Manager 中建立的受眾也會列出,而不只是透過 Ayrshare 建立的受眾。
- 當 Reddit 比對到至少 1,000 人、推廣可以鎖定該受眾時,
status.ready為true。 size是 Reddit 自己的估計值,以下限和上限表示。在 Reddit 沒有估計值時為null。- 結果不會快取:受眾在填充過程中,其規模和就緒狀態會變化。
請求頭參數
查詢參數
當回應包含
meta.pagination.hasMore: true 時,將其 meta.pagination.next 值傳送到這裡以取得下一頁。其他參數保持不變:來自其他請求的 next 值會返回 code: 101。回應
每個受眾包含:id:推廣、新增人員或刪除時使用的受眾 ID。name:在 Reddit Ads Manager 中顯示的名稱。type:customerList、website、engagement,或 Ayrshare 不建立的受眾類型(例如類似受眾)為other。size:{ lower, upper },Reddit 的估計值,或null。status:{ ready, code, description }。當推廣現在可以鎖定該受眾時,ready為true。description是 Reddit 的狀態,例如PENDING、VALID或NOT_ENOUGH_MATCHES_ERROR。在 Reddit 上,code一律為null。created:受眾的建立時間,ISO 8601 格式,或null。
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"
}