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
インサイト
Ayrshare でブーストした Snapchat 広告の日別リアルタイム指標 (費用、インプレッション、スワイプアップ、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 広告のリアルタイムの成果を広告ごと・日ごとに 1 行で取得します。
各行には、
- 数値は呼び出し時に Snapchat から読み取られます。日別の費用記録には 履歴を使用してください。
- Snapchat は広告単位でレポートするため、
level=adを送ってください。その他のレベルはcode: 101を返します。 - 日は広告アカウントのタイムゾーンでの日です。金額は広告アカウントの通貨で、各行の
currencyに返されます。 - 1 つのリクエストは 1 つの広告アカウントを対象とします。複数の広告アカウントの広告は
code: 101を返します。 - 別のプロフィール用に Ayrshare で作成した広告は
code: 400を返します。 - 各広告は範囲内の 31 日ごとに 1 回 Snapchat から読み取られ、1 つのリクエストで行える読み取りは最大 100 回です。たとえば 62 日間の 50 広告は 100 回の読み取りです。それより大きいリクエストは
code: 101を返します: 広告を減らすか、範囲を短くしてください。
ヘッダーパラメータ
クエリパラメータ
カンマ区切りの Snapchat 広告 ID。最大 50 件。
ids を省略して代わりに accountId を送ることもできます。その場合、その広告アカウントでこのプロフィールのために Ayrshare でブーストした広告がレポート対象になります。アカウントにあなたの広告が 50 件を超えてある場合、リクエストは code: 101 を返します: 代わりにそれらの ID を送ってください。見つからない場合、レポートは空になります。Snapchat 広告アカウントの ID。
ids を省略する場合は必須です。ids を送る場合、Ayrshare に記録のあるすべての広告がこのアカウントに含まれている必要があります。Ayrshare に記録のない ID は、それを含むあなたの広告アカウントから読み取られるため、accountId による制限は受けません。返す指標のカンマ区切りリスト。すべて取得するには省略します。指標を参照してください。
指標
| 指標 | 型 | 意味 |
|---|---|---|
spend | number | 費用 |
impressions | number | 広告が表示された回数 |
clicks | number | 広告のスワイプアップ数 |
cpm | number または null | 1,000 インプレッションあたりの費用。インプレッションのない日は null |
cpc | number または null | スワイプアップ 1 回あたりの費用。スワイプアップのない日は null |
ctr | number または null | インプレッションあたりのスワイプアップ率 (パーセント)。インプレッションのない日は null |
clicks と同じ数の swipes と、通貨が USD の場合は spend、それ以外は null となる spendUsd も含まれます。
Snapchat は reach、actions、conversionValue を日別に報告しません。これらを要求すると code: 101 が返されます。Snapchat には内訳もないため、breakdowns を送ると code: 101 が返されます。
ページング
すべての行が 1 つのレスポンスで返されるため、meta.pagination.hasMore は常に false です。
エラー
| Code | 発生条件 |
|---|---|
101 | パラメータが不足しているか誤っている、level が ad ではない、指標または内訳がサポートされていない、startDate が 37 か月より前、ID が 50 件を超えて送られた、accountId だけで 50 件を超える広告が対象になる、広告が複数の広告アカウントにまたがる、広告が accountId に含まれていない、またはリクエストに 100 回を超える読み取りが必要 |
400 | 広告があなたのものではない、または accountId が Ayrshare に記録されている広告の広告アカウントではない |
364 | Snapchat のレート制限に達しました。1 分待ってから再試行してください |
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."
}