curl \
-H "Authorization: Bearer API_KEY" \
-X GET "https://api.ayrshare.com/api/ads/snapchat/insights?level=ad&ids=c3a1e2d4-0000-4000-8000-0000000000ad&startDate=2026-11-20&endDate=2026-11-21"
{
"status": "success",
"platform": "snapchat",
"level": "ad",
"startDate": "2026-11-20",
"endDate": "2026-11-21",
"insights": [
{
"date": "2026-11-20",
"level": "ad",
"id": "c3a1e2d4-0000-4000-8000-0000000000ad",
"currency": "USD",
"spend": 12.5,
"impressions": 3000,
"clicks": 30,
"cpm": 4.17,
"cpc": 0.42,
"ctr": 1,
"swipes": 30,
"spendUsd": 12.5
},
{
"date": "2026-11-21",
"level": "ad",
"id": "c3a1e2d4-0000-4000-8000-0000000000ad",
"currency": "USD",
"spend": 18,
"impressions": 4000,
"clicks": 42,
"cpm": 4.5,
"cpc": 0.43,
"ctr": 1.05,
"swipes": 42,
"spendUsd": 18
}
],
"count": 2,
"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": "Insights on snapchat report by ad: use level \"ad\" with the ad ids."
}
Snapchat Ads
الرؤى
احصل على مقاييس يومية مباشرة لإعلانات Snapchat التي عززتها عبر Ayrshare، بما في ذلك الإنفاق ومرات الظهور ومرات السحب لأعلى وCPM وCPC وCTR.
GET
/
ads
/
snapchat
/
insights
curl \
-H "Authorization: Bearer API_KEY" \
-X GET "https://api.ayrshare.com/api/ads/snapchat/insights?level=ad&ids=c3a1e2d4-0000-4000-8000-0000000000ad&startDate=2026-11-20&endDate=2026-11-21"
{
"status": "success",
"platform": "snapchat",
"level": "ad",
"startDate": "2026-11-20",
"endDate": "2026-11-21",
"insights": [
{
"date": "2026-11-20",
"level": "ad",
"id": "c3a1e2d4-0000-4000-8000-0000000000ad",
"currency": "USD",
"spend": 12.5,
"impressions": 3000,
"clicks": 30,
"cpm": 4.17,
"cpc": 0.42,
"ctr": 1,
"swipes": 30,
"spendUsd": 12.5
},
{
"date": "2026-11-21",
"level": "ad",
"id": "c3a1e2d4-0000-4000-8000-0000000000ad",
"currency": "USD",
"spend": 18,
"impressions": 4000,
"clicks": 42,
"cpm": 4.5,
"cpc": 0.43,
"ctr": 1.05,
"swipes": 42,
"spendUsd": 18
}
],
"count": 2,
"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": "Insights on snapchat report by ad: use level \"ad\" with the ad ids."
}
احصل على أداء إعلانات Snapchat المباشر، صف واحد لكل إعلان في كل يوم، للإعلانات التي أنشأتها عبر تعزيز المنشور.
يحتوي كل صف أيضًا على
- تُقرأ الأرقام من Snapchat عند الاستدعاء. استخدم السجل لسجل الإنفاق اليومي.
- يُعدّ Snapchat تقاريره حسب الإعلان، لذا أرسل
level=ad. تُعيد المستويات الأخرىcode: 101. - الأيام هي أيام الحساب الإعلاني بمنطقته الزمنية. القيم المالية بعملة الحساب الإعلاني، وتُعاد في
currencyفي كل صف. - يغطي الطلب الواحد حسابًا إعلانيًا واحدًا. إعلانات من عدة حسابات إعلانية تُعيد
code: 101. - الإعلان المُنشأ عبر Ayrshare لملف شخصي آخر يُعيد
code: 400. - يُقرأ كل إعلان من Snapchat مرة واحدة لكل 31 يومًا في النطاق، ويمكن للطلب الواحد إجراء 100 عملية قراءة كحد أقصى. على سبيل المثال، 50 إعلانًا على مدى 62 يومًا تساوي 100 عملية قراءة. الطلب الأكبر يُعيد
code: 101: أرسل إعلانات أقل أو نطاقًا أقصر.
معاملات الترويسة
معاملات الاستعلام
معرّفات إعلانات Snapchat مفصولة بفواصل، حتى 50.يمكنك حذف
ids وإرسال accountId بدلًا منه. يشمل التقرير حينها الإعلانات التي عززتها عبر Ayrshare لهذا الملف الشخصي في ذلك الحساب الإعلاني. إذا كان في الحساب أكثر من 50 من إعلاناتك، يُعيد الطلب code: 101: أرسل معرّفاتها بدلًا من ذلك. إذا لم يُعثر على أي منها، يكون التقرير فارغًا.معرّف حساب Snapchat الإعلاني. مطلوب عند حذف
ids. مع ids، يجب أن يكون كل إعلان لدى Ayrshare سجل له في هذا الحساب. المعرّف الذي ليس لدى Ayrshare سجل له يُقرأ من أي حساب إعلاني لديك يحتويه، لذا لا يقيّده accountId.المقاييس المراد إعادتها مفصولة بفواصل. احذفه للحصول عليها جميعًا. راجع المقاييس.
المقاييس
| المقياس | النوع | المعنى |
|---|---|---|
spend | number | المبلغ المُنفَق |
impressions | number | عدد مرات عرض الإعلان |
clicks | number | مرات السحب لأعلى على الإعلان |
cpm | number أو null | التكلفة لكل 1,000 مرة ظهور. null في يوم بلا مرات ظهور |
cpc | number أو null | التكلفة لكل سحب لأعلى. null في يوم بلا سحب لأعلى |
ctr | number أو null | مرات السحب لأعلى لكل مرة ظهور، كنسبة مئوية. null في يوم بلا مرات ظهور |
swipes، وهو العدد نفسه في clicks، وspendUsd، الذي يساوي spend عندما تكون العملة USD وnull بخلاف ذلك.
لا يُبلغ Snapchat عن reach أو actions أو conversionValue حسب اليوم. طلبها يُعيد code: 101. لا يملك Snapchat أيضًا تقسيمات، لذا إرسال breakdowns يُعيد code: 101.
ترقيم الصفحات
تأتي كل الصفوف في استجابة واحدة، لذا يكونmeta.pagination.hasMore دائمًا false.
الأخطاء
| الرمز | متى |
|---|---|
101 | معامل مفقود أو خاطئ، أو level ليس ad، أو مقياس أو تقسيم غير مدعوم، أو startDate أقدم من 37 شهرًا، أو أُرسل أكثر من 50 معرّفًا، أو يغطي accountId وحده أكثر من 50 من إعلاناتك، أو الإعلانات في أكثر من حساب إعلاني، أو إعلان ليس في accountId، أو يحتاج الطلب إلى أكثر من 100 عملية قراءة |
400 | إعلان ليس ملكك، أو accountId ليس الحساب الإعلاني المسجّل لدى Ayrshare لهذه الإعلانات |
364 | تم بلوغ حد معدل الطلبات في Snapchat. انتظر دقيقة وأعد المحاولة |
370 | تعذّر على Snapchat إعادة الرؤى. أعد المحاولة |
curl \
-H "Authorization: Bearer API_KEY" \
-X GET "https://api.ayrshare.com/api/ads/snapchat/insights?level=ad&ids=c3a1e2d4-0000-4000-8000-0000000000ad&startDate=2026-11-20&endDate=2026-11-21"
{
"status": "success",
"platform": "snapchat",
"level": "ad",
"startDate": "2026-11-20",
"endDate": "2026-11-21",
"insights": [
{
"date": "2026-11-20",
"level": "ad",
"id": "c3a1e2d4-0000-4000-8000-0000000000ad",
"currency": "USD",
"spend": 12.5,
"impressions": 3000,
"clicks": 30,
"cpm": 4.17,
"cpc": 0.42,
"ctr": 1,
"swipes": 30,
"spendUsd": 12.5
},
{
"date": "2026-11-21",
"level": "ad",
"id": "c3a1e2d4-0000-4000-8000-0000000000ad",
"currency": "USD",
"spend": 18,
"impressions": 4000,
"clicks": 42,
"cpm": 4.5,
"cpc": 0.43,
"ctr": 1.05,
"swipes": 42,
"spendUsd": 18
}
],
"count": 2,
"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": "Insights on snapchat report by ad: use level \"ad\" with the ad ids."
}