> ## 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 لإعلانات Reddit المُعزَّزة، مع الإجماليات.

استرجع الإنفاق اليومي والأداء اللذين سجّلهما Ayrshare لإعلانات Reddit التي أنشأتها باستخدام [تعزيز المنشور](https://www.ayrshare.com/docs/apis/ads/reddit/boost-post.md). للحصول على أرقام مباشرة، استخدم [الرؤى](https://www.ayrshare.com/docs/apis/ads/reddit/get-ad-insights.md).

<ul>
  <li>يمثّل كل إدخال في `history` إعلانًا واحدًا في يوم واحد، الأحدث أولًا.</li>
  <li>عندما لا يُعثر على شيء، تظل الاستجابة ناجحة: تكون `history` فارغة، وتتضمن `warnings` إدخالًا واحدًا مع `code: 401`.</li>
  <li>يكون `spend` بعملة حساب الإعلانات، الموضّحة في `currency`. لا يتم تعيين `spendUsd` إلا عندما تكون هذه العملة USD، وتكون قيمته `null` في غير ذلك. تكون `totalSpend` دائمًا `null`: استخدم `totalSpendByCurrency`.</li>
  <li>لا يُبلغ Reddit عن مدى الوصول لهذه الأيام، لذا تكون `reach` و`frequency` و`cpp` مساوية لـ `0`.</li>
  <li>تُطبَّق عوامل التصفية بهذا الترتيب، ولا يُستخدم إلا أول عامل مُرسَل: `adId`، `postId`، `accountId`، `socialPostId`.</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** `string`

أيام إعلان Reddit هذا فقط.

**postId** `string`

أيام الإعلانات المُعزَّزة من [معرّف منشور](https://www.ayrshare.com/docs/apis/overview.md#ayrshare-post-id) Ayrshare هذا فقط.

**accountId** `string`

أيام الإعلانات في حساب إعلانات Reddit هذا فقط، على سبيل المثال `a2_abc123`.

**socialPostId** `string`

أيام الإعلانات التي تروّج لمنشور Reddit هذا فقط. أرسل المعرّف بدون `t3_`، وبأحرف صغيرة، على سبيل المثال `1abc27`. يُقبل `redditPostId` باعتباره الحقل نفسه.

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

أول يوم يُضمَّن، كتاريخ بتنسيق ISO 8601، على سبيل المثال `2026-11-01`.

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

آخر يوم يُضمَّن، كتاريخ بتنسيق ISO 8601. يجب ألا يسبق `startDate`.

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

أقصى عدد من الصفوف المُرجَعة، الأحدث أولًا. يمثّل كل صف إعلانًا واحدًا في يوم واحد، لذا مع عدة إعلانات يغطي ذلك أيامًا أقل من `limit`. تُخفَّض القيم التي تتجاوز 300 إلى 300. لا تجمع الإجماليات إلا الصفوف المُرجَعة: للحصول على النطاق الزمني كاملًا، ضيّق التواريخ أو ارفع `limit`.

```bash cURL theme={"system"}
curl \
  -H "Authorization: Bearer API_KEY" \
  -X GET "https://api.ayrshare.com/api/ads/reddit/history?adId=2707300000000000001&startDate=2026-11-20"
```

```json 200: Success theme={"system"}
{
  "status": "success",
  "history": [
    {
      "accountId": "a2_abc123",
      "adId": "2707300000000000001",
      "adName": "Spring sale",
      "budgetDaily": 50,
      "budgetType": "",
      "currency": "USD",
      "deliveryStatus": null,
      "goal": { "type": "website_visits" },
      "isActive": true,
      "isComplete": false,
      "metrics": {
        "clicks": 42,
        "cpc": 0.2,
        "cpp": 0,
        "cpm": 3.5,
        "ctr": 1.75,
        "frequency": 0,
        "impressions": 2400,
        "reach": 0
      },
      "network": "reddit",
      "postId": "DE6gpw8kxlonHy6eb721",
      "redditPostId": "1abc27",
      "socialPostId": "1abc27",
      "spend": 8.4,
      "spendDate": "2026-11-21T00:00:00.000Z",
      "spendUsd": 8.4,
      "status": "ACTIVE"
    }
  ],
  "dateRange": {
    "start": "2026-11-20T00:00:00.000Z",
    "end": "2026-12-02T10:15:00.000Z",
    "adId": "2707300000000000001"
  },
  "metrics": {
    "totalSpend": null,
    "totalSpendByCurrency": { "USD": 8.4 },
    "totalClicks": 42,
    "totalImpressions": 2400,
    "totalReach": 0,
    "averageCTR": 1.75,
    "averageFrequency": 0,
    "cpm": 3.5,
    "cpp": 0,
    "cpc": 0.2,
    "costPerResult": 0.2,
    "byGoalType": {
      "website_visits": {
        "spend": 8.4,
        "impressions": 2400,
        "clicks": 42,
        "reach": 0,
        "count": 1,
        "ctr": 1.75,
        "cpm": 3.5,
        "cpp": 0,
        "cpc": 0.2
      }
    },
    "byGoalTitle": {},
    "goalPerformance": {
      "bestPerformingGoalType": { "type": "website_visits", "clicks": 42, "spend": 8.4, "ctr": 1.75 },
      "mostEfficientGoalType": { "type": "website_visits", "cpc": 0.2, "spend": 8.4 }
    },
    "count": 1,
    "firstDay": "2026-11-21T00:00:00.000Z",
    "lastDay": "2026-11-21T00:00:00.000Z"
  }
}
```

```json 400: Bad dates 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": "Start date must be before end date."
}
```


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