> ## Documentation Index
> Fetch the complete documentation index at: https://www.ayrshare.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 履歴

> Ayrshare でブーストした Snapchat 広告の日別費用と成果を、通貨別合計と日付フィルター付きで取得します。

[投稿をブースト](https://www.ayrshare.com/docs/apis/ads/snapchat/boost-post.md)で作成した Snapchat 広告の日別費用記録を取得します。`history` の各エントリは 1 日分の 1 つの広告です。

<ul>
  <li>履歴は Ayrshare による日別の費用記録のため、当日の費用はまだ表示されないことがあります。リアルタイムの数値には [インサイト](https://www.ayrshare.com/docs/apis/ads/snapchat/get-ad-insights.md)を使用してください。</li>
  <li>広告は、Snapchat が統計を報告した日ごとに表示されます。Snapchat Ads Manager で作成した広告は含まれません。</li>
  <li>日付範囲内に該当する日がない場合でも、レスポンスは成功です: `history` は空になり、`warnings` にコード `401` のエントリが 1 つ含まれます。</li>
  <li>各日の `spend` は広告アカウントの通貨で、`currency` に示されます。`totalSpendByCurrency` は通貨ごとの合計を示します。広告アカウントの通貨が異なる場合は、`accountId` で絞り込んでください。</li>
  <li>`clicks` はスワイプアップ数です。Snapchat は日別リーチを報告しないため、`reach`、`frequency`、`cpp` は `0` です。</li>
  <li>`spendUsd` は、通貨が USD の場合はその日の `spend`、それ以外は `null` です。`totalSpend` は常に `null` です: `totalSpendByCurrency` を使用してください。</li>
  <li>`byGoalType` と `goalPerformance` は、ブーストの目標 (`brand_awareness`、`video_views`、`traffic`) ごとに数値をまとめます。</li>
</ul>

## ヘッダーパラメータ

**Authorization** `string` *required*

[API Key](https://www.ayrshare.com/docs/apis/overview.md#authorization) of the Primary Profile.

Format: `Authorization: Bearer API_KEY`
**Profile-Key** `string`

[Profile Key](https://www.ayrshare.com/docs/apis/overview.md#profile-key-format) of a User Profile.

Format: `Profile-Key: PROFILE_KEY`

## クエリパラメータ

`adId`、`postId`、`accountId`、`socialPostId` のうち送るのは最大 1 つです。複数送った場合は、この順で最初のものが使われます。すべての Snapchat 広告を取得するには、すべて省略してください。

**adId** `string`

この Snapchat 広告のみ。

**postId** `string`

この Ayrshare の[投稿 ID](https://www.ayrshare.com/docs/apis/overview.md#ayrshare-post-id) からブーストした広告のみ。

**accountId** `string`

この Snapchat 広告アカウント内の広告のみ。

**socialPostId** `string`

この Snap からブーストした広告のみ: 投稿の Snapchat 結果にある `mediaId`。`snapchatSnapId` も同じパラメータとして受け付けます。

**startDate** `string` (default: 30 days before endDate)

日付範囲の開始日。ISO 8601 形式。例: `2026-11-01`。

**endDate** `string` (default: now)

日付範囲の終了日。ISO 8601 形式。

**limit** `number` (default: 25)

返す日別エントリの最大数 (新しい順)。最大は 300 で、それより大きい値は 300 に制限されます。

```bash cURL theme={"system"}
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"
```

```json 200: Success theme={"system"}
{
  "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"
  }
}
```

```json 400: Bad date theme={"system"}
{
  "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)."
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.