curl \
-H "Authorization: Bearer API_KEY" \
-X GET "https://api.ayrshare.com/api/ads/snapchat/history?adId=c3a1e2d4-0000-4000-8000-0000000000ad&startDate=2026-11-20&endDate=2026-11-22"
{
"status": "success",
"history": [
{
"accountId": "5a0d0000-0000-4000-8000-000000000003",
"adId": "c3a1e2d4-0000-4000-8000-0000000000ad",
"adName": "Acme - Snap - 2026-11-20T15:04",
"budgetDaily": 20,
"budgetType": "",
"currency": "USD",
"deliveryStatus": null,
"goal": { "type": "brand_awareness" },
"isActive": true,
"isComplete": false,
"metrics": {
"clicks": 42,
"cpc": 0.43,
"cpp": 0,
"cpm": 4.5,
"ctr": 1.05,
"frequency": 0,
"impressions": 4000,
"reach": 0
},
"network": "snapchat",
"postId": "DE6gpw8kxlonHy6eb7L1",
"snapchatSnapId": "6f1c2d3e-0000-4000-8000-00000000000a",
"socialPostId": "6f1c2d3e-0000-4000-8000-00000000000a",
"spend": 18,
"spendDate": "2026-11-21T00:00:00.000Z",
"spendUsd": 18,
"status": "ACTIVE"
}
],
"dateRange": {
"start": "2026-11-20T00:00:00.000Z",
"end": "2026-11-22T00:00:00.000Z",
"adId": "c3a1e2d4-0000-4000-8000-0000000000ad"
},
"metrics": {
"totalSpend": null,
"totalSpendByCurrency": { "USD": 18 },
"totalClicks": 42,
"totalImpressions": 4000,
"totalReach": 0,
"averageCTR": 1.05,
"averageFrequency": 0,
"cpm": 4.5,
"cpp": 0,
"cpc": 0.43,
"costPerResult": 0.43,
"byGoalType": {
"brand_awareness": {
"spend": 18,
"impressions": 4000,
"clicks": 42,
"reach": 0,
"count": 1,
"ctr": 1.05,
"cpm": 4.5,
"cpp": 0,
"cpc": 0.42857142857142855
}
},
"byGoalTitle": {},
"goalPerformance": {
"bestPerformingGoalType": { "type": "brand_awareness", "clicks": 42, "spend": 18, "ctr": 1.05 },
"mostEfficientGoalType": { "type": "brand_awareness", "cpc": 0.43, "spend": 18 }
},
"count": 1,
"firstDay": "2026-11-21T00:00:00.000Z",
"lastDay": "2026-11-21T00:00:00.000Z"
}
}
{
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
"details": "Invalid date format. Please use ISO 8601 format (YYYY-MM-DD)."
}
Snapchat Ads
履歴
Ayrshare でブーストした Snapchat 広告の日別費用と成果を、通貨別合計と日付フィルター付きで取得します。
GET
/
ads
/
snapchat
/
history
curl \
-H "Authorization: Bearer API_KEY" \
-X GET "https://api.ayrshare.com/api/ads/snapchat/history?adId=c3a1e2d4-0000-4000-8000-0000000000ad&startDate=2026-11-20&endDate=2026-11-22"
{
"status": "success",
"history": [
{
"accountId": "5a0d0000-0000-4000-8000-000000000003",
"adId": "c3a1e2d4-0000-4000-8000-0000000000ad",
"adName": "Acme - Snap - 2026-11-20T15:04",
"budgetDaily": 20,
"budgetType": "",
"currency": "USD",
"deliveryStatus": null,
"goal": { "type": "brand_awareness" },
"isActive": true,
"isComplete": false,
"metrics": {
"clicks": 42,
"cpc": 0.43,
"cpp": 0,
"cpm": 4.5,
"ctr": 1.05,
"frequency": 0,
"impressions": 4000,
"reach": 0
},
"network": "snapchat",
"postId": "DE6gpw8kxlonHy6eb7L1",
"snapchatSnapId": "6f1c2d3e-0000-4000-8000-00000000000a",
"socialPostId": "6f1c2d3e-0000-4000-8000-00000000000a",
"spend": 18,
"spendDate": "2026-11-21T00:00:00.000Z",
"spendUsd": 18,
"status": "ACTIVE"
}
],
"dateRange": {
"start": "2026-11-20T00:00:00.000Z",
"end": "2026-11-22T00:00:00.000Z",
"adId": "c3a1e2d4-0000-4000-8000-0000000000ad"
},
"metrics": {
"totalSpend": null,
"totalSpendByCurrency": { "USD": 18 },
"totalClicks": 42,
"totalImpressions": 4000,
"totalReach": 0,
"averageCTR": 1.05,
"averageFrequency": 0,
"cpm": 4.5,
"cpp": 0,
"cpc": 0.43,
"costPerResult": 0.43,
"byGoalType": {
"brand_awareness": {
"spend": 18,
"impressions": 4000,
"clicks": 42,
"reach": 0,
"count": 1,
"ctr": 1.05,
"cpm": 4.5,
"cpp": 0,
"cpc": 0.42857142857142855
}
},
"byGoalTitle": {},
"goalPerformance": {
"bestPerformingGoalType": { "type": "brand_awareness", "clicks": 42, "spend": 18, "ctr": 1.05 },
"mostEfficientGoalType": { "type": "brand_awareness", "cpc": 0.43, "spend": 18 }
},
"count": 1,
"firstDay": "2026-11-21T00:00:00.000Z",
"lastDay": "2026-11-21T00:00:00.000Z"
}
}
{
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
"details": "Invalid date format. Please use ISO 8601 format (YYYY-MM-DD)."
}
投稿をブーストで作成した Snapchat 広告の日別費用記録を取得します。
history の各エントリは 1 日分の 1 つの広告です。
- 履歴は Ayrshare による日別の費用記録のため、当日の費用はまだ表示されないことがあります。リアルタイムの数値には インサイトを使用してください。
- 広告は、Snapchat が統計を報告した日ごとに表示されます。Snapchat Ads Manager で作成した広告は含まれません。
- 日付範囲内に該当する日がない場合でも、レスポンスは成功です:
historyは空になり、warningsにコード401のエントリが 1 つ含まれます。 - 各日の
spendは広告アカウントの通貨で、currencyに示されます。totalSpendByCurrencyは通貨ごとの合計を示します。広告アカウントの通貨が異なる場合は、accountIdで絞り込んでください。 clicksはスワイプアップ数です。Snapchat は日別リーチを報告しないため、reach、frequency、cppは0です。spendUsdは、通貨が USD の場合はその日のspend、それ以外はnullです。totalSpendは常にnullです:totalSpendByCurrencyを使用してください。byGoalTypeとgoalPerformanceは、ブーストの目標 (brand_awareness、video_views、traffic) ごとに数値をまとめます。
ヘッダーパラメータ
クエリパラメータ
adId、postId、accountId、socialPostId のうち送るのは最大 1 つです。複数送った場合は、この順で最初のものが使われます。すべての Snapchat 広告を取得するには、すべて省略してください。
この Ayrshare の投稿 ID からブーストした広告のみ。
curl \
-H "Authorization: Bearer API_KEY" \
-X GET "https://api.ayrshare.com/api/ads/snapchat/history?adId=c3a1e2d4-0000-4000-8000-0000000000ad&startDate=2026-11-20&endDate=2026-11-22"
{
"status": "success",
"history": [
{
"accountId": "5a0d0000-0000-4000-8000-000000000003",
"adId": "c3a1e2d4-0000-4000-8000-0000000000ad",
"adName": "Acme - Snap - 2026-11-20T15:04",
"budgetDaily": 20,
"budgetType": "",
"currency": "USD",
"deliveryStatus": null,
"goal": { "type": "brand_awareness" },
"isActive": true,
"isComplete": false,
"metrics": {
"clicks": 42,
"cpc": 0.43,
"cpp": 0,
"cpm": 4.5,
"ctr": 1.05,
"frequency": 0,
"impressions": 4000,
"reach": 0
},
"network": "snapchat",
"postId": "DE6gpw8kxlonHy6eb7L1",
"snapchatSnapId": "6f1c2d3e-0000-4000-8000-00000000000a",
"socialPostId": "6f1c2d3e-0000-4000-8000-00000000000a",
"spend": 18,
"spendDate": "2026-11-21T00:00:00.000Z",
"spendUsd": 18,
"status": "ACTIVE"
}
],
"dateRange": {
"start": "2026-11-20T00:00:00.000Z",
"end": "2026-11-22T00:00:00.000Z",
"adId": "c3a1e2d4-0000-4000-8000-0000000000ad"
},
"metrics": {
"totalSpend": null,
"totalSpendByCurrency": { "USD": 18 },
"totalClicks": 42,
"totalImpressions": 4000,
"totalReach": 0,
"averageCTR": 1.05,
"averageFrequency": 0,
"cpm": 4.5,
"cpp": 0,
"cpc": 0.43,
"costPerResult": 0.43,
"byGoalType": {
"brand_awareness": {
"spend": 18,
"impressions": 4000,
"clicks": 42,
"reach": 0,
"count": 1,
"ctr": 1.05,
"cpm": 4.5,
"cpp": 0,
"cpc": 0.42857142857142855
}
},
"byGoalTitle": {},
"goalPerformance": {
"bestPerformingGoalType": { "type": "brand_awareness", "clicks": 42, "spend": 18, "ctr": 1.05 },
"mostEfficientGoalType": { "type": "brand_awareness", "cpc": 0.43, "spend": 18 }
},
"count": 1,
"firstDay": "2026-11-21T00:00:00.000Z",
"lastDay": "2026-11-21T00:00:00.000Z"
}
}
{
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
"details": "Invalid date format. Please use ISO 8601 format (YYYY-MM-DD)."
}