> ## 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 से boost किए गए Snapchat ads का दैनिक खर्च और प्रदर्शन पाएँ, हर currency के कुल योग और date filters के साथ।

[Boost Post](https://www.ayrshare.com/docs/apis/ads/snapchat/boost-post.md) से बनाए गए Snapchat ads का दैनिक खर्च रिकॉर्ड पाएँ। `history` की हर entry एक दिन का एक ad है।

<ul>
  <li>इतिहास आपके खर्च का Ayrshare का दैनिक रिकॉर्ड है, इसलिए आज का खर्च शायद अभी न दिखे। लाइव आँकड़ों के लिए [इनसाइट्स](https://www.ayrshare.com/docs/apis/ads/snapchat/get-ad-insights.md) का उपयोग करें।</li>
  <li>कोई ad हर उस दिन दिखता है जिसके लिए Snapchat उसके stats बताता है। Snapchat Ads Manager में बने ads शामिल नहीं होते।</li>
  <li>जब date range में कोई दिन नहीं मिलता, तब भी response success होता है: `history` खाली होता है और `warnings` में code `401` वाली एक entry होती है।</li>
  <li>हर दिन का `spend` ad account की currency में होता है, जो `currency` में दिखती है। `totalSpendByCurrency` हर currency में कुल योग देता है। अगर आपके ad accounts अलग-अलग currencies उपयोग करते हैं, तो `accountId` से filter करें।</li>
  <li>`clicks` swipe-ups गिनता है। Snapchat दैनिक reach नहीं बताता, इसलिए `reach`, `frequency` और `cpp` `0` होते हैं।</li>
  <li>जब currency USD हो तब `spendUsd` उस दिन का `spend` होता है, अन्यथा `null`। `totalSpend` हमेशा `null` होता है: `totalSpendByCurrency` का उपयोग करें।</li>
  <li>`byGoalType` और `goalPerformance` आँकड़ों को boost के goal के अनुसार समूहित करते हैं: `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` में से अधिकतम एक भेजें। अगर एक से ज़्यादा भेजते हैं, तो इसी क्रम में पहला उपयोग होता है। सभी Snapchat ads पाने के लिए सभी छोड़ दें।

**adId** `string`

केवल यह Snapchat ad।

**postId** `string`

केवल इस Ayrshare [post ID](https://www.ayrshare.com/docs/apis/overview.md#ayrshare-post-id) से boost किए गए ads।

**accountId** `string`

केवल इस Snapchat ad account के ads।

**socialPostId** `string`

केवल इस Snap से boost किए गए ads: post के Snapchat result में `mediaId`। `snapchatSnapId` को उसी parameter के रूप में स्वीकार किया जाता है।

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

Date range की शुरुआत, ISO 8601 format में, उदाहरण के लिए `2026-11-01`।

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

Date range का अंत, ISO 8601 format में।

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

लौटाई जाने वाली अधिकतम दैनिक entries, नवीनतम पहले। अधिकतम 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.