curl \
-H "Authorization: Bearer API_KEY" \
-X GET "https://api.ayrshare.com/api/ads/snapchat/audiences?accountId=5a0d1b2c-0000-4000-8000-000000000003"
const API_KEY = "API_KEY";
fetch("https://api.ayrshare.com/api/ads/snapchat/audiences?accountId=5a0d1b2c-0000-4000-8000-000000000003", {
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/snapchat/audiences?accountId=5a0d1b2c-0000-4000-8000-000000000003', headers=headers)
print(r.json())
{
"status": "success",
"audiences": [
{
"id": "8c1e2f3a-0000-4000-8000-000000000101",
"name": "Newsletter subscribers",
"type": "customerList",
"size": { "lower": 12000, "upper": 12000 },
"status": { "ready": true, "code": null, "description": "READY" },
"created": "2026-11-20T09:12:00.000Z"
},
{
"id": "8c1e2f3a-0000-4000-8000-000000000102",
"name": "Like my subscribers",
"type": "lookalike",
"size": { "lower": 0, "upper": 0 },
"status": { "ready": false, "code": null, "description": "NOT_READY" },
"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": "Snapchat's reason"
}
Snapchat Ads
الجماهير
اعرض شرائح الجمهور في حساب إعلاني على Snapchat، مع نوع كل منها وحجمها وما إذا كان التعزيز يستطيع استهدافها الآن.
GET
/
ads
/
snapchat
/
audiences
curl \
-H "Authorization: Bearer API_KEY" \
-X GET "https://api.ayrshare.com/api/ads/snapchat/audiences?accountId=5a0d1b2c-0000-4000-8000-000000000003"
const API_KEY = "API_KEY";
fetch("https://api.ayrshare.com/api/ads/snapchat/audiences?accountId=5a0d1b2c-0000-4000-8000-000000000003", {
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/snapchat/audiences?accountId=5a0d1b2c-0000-4000-8000-000000000003', headers=headers)
print(r.json())
{
"status": "success",
"audiences": [
{
"id": "8c1e2f3a-0000-4000-8000-000000000101",
"name": "Newsletter subscribers",
"type": "customerList",
"size": { "lower": 12000, "upper": 12000 },
"status": { "ready": true, "code": null, "description": "READY" },
"created": "2026-11-20T09:12:00.000Z"
},
{
"id": "8c1e2f3a-0000-4000-8000-000000000102",
"name": "Like my subscribers",
"type": "lookalike",
"size": { "lower": 0, "upper": 0 },
"status": { "ready": false, "code": null, "description": "NOT_READY" },
"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": "Snapchat's reason"
}
اعرض شرائح الجمهور في حساب إعلاني على Snapchat: قوائم عملائك وزوار موقعك الذين رصدهم Snap Pixel والجماهير المشابهة (lookalikes). استخدم المعرّفات في
targeting.audiences أو targeting.excludedAudiences عندما تعزّز Snap.
- تُعرض أيضًا الشرائح المُنشأة في Snapchat Ads Manager، وليس فقط تلك المُنشأة عبر Ayrshare.
- تكون قيمة
status.readyهيtrueبمجرد أن يفيد Snapchat بأن التعزيز يستطيع استهداف الشريحة. الشريحة التي بها عدد قليل جدًا من الأشخاص المطابقين ليست جاهزة (TOO_FEW_USERS). sizeهو عدد الأشخاص المطابقين وفق Snapchat نفسه، ويُرسل فيlowerوupperمعًا.- لا تُخزَّن النتائج مؤقتًا: يتغير حجم الشريحة وجاهزيتها أثناء امتلائها.
- يحدد Snapchat حجم الصفحة بنفسه، لذا لا تأثير لـ
limitهنا.
معاملات الترويسة
معاملات الاستعلام
معرّف حسابك الإعلاني على Snapchat الذي تريد عرض شرائحه، مثل
5a0d0000-0000-4000-8000-000000000003.عندما تحتوي الاستجابة على
meta.pagination.hasMore: true، أرسل هنا قيمة meta.pagination.next منها للحصول على الصفحة التالية. أرسل المعاملات الأخرى دون تغيير: قيمة next من طلب مختلف تُعيد code: 101.الاستجابة
يحتوي كل جمهور على:id: معرّف الشريحة الذي تستخدمه عند التعزيز أو إضافة الأشخاص أو الحذف.name: الاسم المعروض في Ads Manager.type:customerListأوwebsiteأوlookalike، أوotherلنوع شريحة لا ينشئه Ayrshare.size:{ lower, upper }، وكلاهما عدد Snapchat، أوnullعندما لا يُبلغ Snapchat عن أي عدد.status:{ ready, code, description }. تكونreadyهيtrueعندما يستطيع التعزيز استهداف الشريحة الآن. تكونcodeدائمًاnull.descriptionهي حالة Snapchat:READYأوNOT_READYأوTOO_FEW_USERS.created: وقت إنشاء الشريحة بتنسيق ISO 8601، أوnull.
curl \
-H "Authorization: Bearer API_KEY" \
-X GET "https://api.ayrshare.com/api/ads/snapchat/audiences?accountId=5a0d1b2c-0000-4000-8000-000000000003"
const API_KEY = "API_KEY";
fetch("https://api.ayrshare.com/api/ads/snapchat/audiences?accountId=5a0d1b2c-0000-4000-8000-000000000003", {
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/snapchat/audiences?accountId=5a0d1b2c-0000-4000-8000-000000000003', headers=headers)
print(r.json())
{
"status": "success",
"audiences": [
{
"id": "8c1e2f3a-0000-4000-8000-000000000101",
"name": "Newsletter subscribers",
"type": "customerList",
"size": { "lower": 12000, "upper": 12000 },
"status": { "ready": true, "code": null, "description": "READY" },
"created": "2026-11-20T09:12:00.000Z"
},
{
"id": "8c1e2f3a-0000-4000-8000-000000000102",
"name": "Like my subscribers",
"type": "lookalike",
"size": { "lower": 0, "upper": 0 },
"status": { "ready": false, "code": null, "description": "NOT_READY" },
"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": "Snapchat's reason"
}