> ## 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.

# History

> Get the daily spend and performance of the Snapchat ads you boosted through Ayrshare, with totals per currency and date filters.

Get the daily spend record of the Snapchat ads you created with [Boost Post](https://www.ayrshare.com/docs/apis/ads/snapchat/boost-post.md). Each entry in `history` is one ad on one day.

<ul>
  <li>History is Ayrshare's daily record of your spend, so today's spend may not show yet. For live numbers, use [Insights](https://www.ayrshare.com/docs/apis/ads/snapchat/get-ad-insights.md).</li>
  <li>An ad shows on each day Snapchat reports stats for it. Ads made in Snapchat Ads Manager are not included.</li>
  <li>When no days are found in the date range, the response is still a success: `history` is empty and `warnings` holds one entry with code `401`.</li>
  <li>Each day's `spend` is in the ad account's currency, shown in `currency`. `totalSpendByCurrency` gives the total in each currency. If your ad accounts use different currencies, filter by `accountId`.</li>
  <li>`clicks` counts swipe-ups. Snapchat does not report daily reach, so `reach`, `frequency` and `cpp` are `0`.</li>
  <li>`spendUsd` is the day's `spend` when the currency is USD, and `null` otherwise. `totalSpend` is always `null`: use `totalSpendByCurrency`.</li>
  <li>`byGoalType` and `goalPerformance` group the numbers by the boost's goal: `brand_awareness`, `video_views` or `traffic`.</li>
</ul>

## Header Parameters

**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`

## Query Parameters

Send at most one of `adId`, `postId`, `accountId` and `socialPostId`. If you send more than one, the first in that order is used. Leave them all out to get every Snapchat ad.

**adId** `string`

Only this Snapchat ad.

**postId** `string`

Only the ads boosted from this Ayrshare [post ID](https://www.ayrshare.com/docs/apis/overview.md#ayrshare-post-id).

**accountId** `string`

Only the ads in this Snapchat ad account.

**socialPostId** `string`

Only the ads boosted from this Snap: the `mediaId` in the post's Snapchat result. `snapchatSnapId` is accepted as the same parameter.

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

Start of the date range, in ISO 8601 format, for example `2026-11-01`.

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

End of the date range, in ISO 8601 format.

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

The most daily entries to return, newest first. Maximum is 300; higher values are capped at 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.