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

# الجماهير

> اعرض شرائح الجمهور في حساب إعلاني على Snapchat، مع نوع كل منها وحجمها وما إذا كان التعزيز يستطيع استهدافها الآن.

اعرض شرائح الجمهور في حساب إعلاني على Snapchat: قوائم عملائك وزوار موقعك الذين رصدهم Snap Pixel والجماهير المشابهة (lookalikes). استخدم المعرّفات في `targeting.audiences` أو `targeting.excludedAudiences` عندما [تعزّز Snap](https://www.ayrshare.com/docs/apis/ads/snapchat/boost-post.md#audiences).

<ul>
  <li>تُعرض أيضًا الشرائح المُنشأة في Snapchat Ads Manager، وليس فقط تلك المُنشأة عبر Ayrshare.</li>
  <li>تكون قيمة `status.ready` هي `true` بمجرد أن يفيد Snapchat بأن التعزيز يستطيع استهداف الشريحة. الشريحة التي بها عدد قليل جدًا من الأشخاص المطابقين ليست جاهزة (`TOO_FEW_USERS`).</li>
  <li>`size` هو عدد الأشخاص المطابقين وفق Snapchat نفسه، ويُرسل في `lower` و`upper` معًا.</li>
  <li>لا تُخزَّن النتائج مؤقتًا: يتغير حجم الشريحة وجاهزيتها أثناء امتلائها.</li>
  <li>يحدد Snapchat حجم الصفحة بنفسه، لذا لا تأثير لـ `limit` هنا.</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`

## معاملات الاستعلام

**accountId** `string` *required*

معرّف حسابك الإعلاني على Snapchat الذي تريد عرض شرائحه، مثل `5a0d0000-0000-4000-8000-000000000003`.

**next** `string`

عندما تحتوي الاستجابة على `meta.pagination.hasMore: true`، أرسل هنا قيمة `meta.pagination.next` منها للحصول على الصفحة التالية. أرسل المعاملات الأخرى دون تغيير: قيمة `next` من طلب مختلف تُعيد `code: 101`.

## الاستجابة

يحتوي كل جمهور على:

<ul>
  <li>`id`: معرّف الشريحة الذي تستخدمه عند التعزيز أو إضافة الأشخاص أو الحذف.</li>
  <li>`name`: الاسم المعروض في Ads Manager.</li>
  <li>`type`: `customerList` أو `website` أو `lookalike`، أو `other` لنوع شريحة لا ينشئه Ayrshare.</li>
  <li>`size`: `{ lower, upper }`، وكلاهما عدد Snapchat، أو `null` عندما لا يُبلغ Snapchat عن أي عدد.</li>
  <li>`status`: `{ ready, code, description }`. تكون `ready` هي `true` عندما يستطيع التعزيز استهداف الشريحة الآن. تكون `code` دائمًا `null`. `description` هي حالة Snapchat: `READY` أو `NOT_READY` أو `TOO_FEW_USERS`.</li>
  <li>`created`: وقت إنشاء الشريحة بتنسيق ISO 8601، أو `null`.</li>
</ul>

```bash cURL theme={"system"}
curl \
-H "Authorization: Bearer API_KEY" \
-X GET "https://api.ayrshare.com/api/ads/snapchat/audiences?accountId=5a0d1b2c-0000-4000-8000-000000000003"
```

```javascript JavaScript theme={"system"}
const API_KEY = "API_KEY";

fetch("https://api.ayrshare.com/api/ads/snapchat/audiences?accountId=5a0d1b2c-0000-4000-8000-000000000003", {
      method: "GET",
      headers: {
        "Authorization": `Bearer ${API_KEY}`
      }
    })
      .then((res) => res.json())
      .then((json) => console.log(json))
      .catch(console.error);
```

```python Python theme={"system"}
import requests

headers = {'Authorization': 'Bearer API_KEY'}

r = requests.get('https://api.ayrshare.com/api/ads/snapchat/audiences?accountId=5a0d1b2c-0000-4000-8000-000000000003', headers=headers)

print(r.json())
```

```json 200: Success theme={"system"}
{
  "status": "success",
  "audiences": [
    {
      "id": "8c1e2f3a-0000-4000-8000-000000000101",
      "name": "Newsletter subscribers",
      "type": "customerList",
      "size": { "lower": 12000, "upper": 12000 },
      "status": { "ready": true, "code": null, "description": "READY" },
      "created": "2026-11-20T09:12:00.000Z"
    },
    {
      "id": "8c1e2f3a-0000-4000-8000-000000000102",
      "name": "Like my subscribers",
      "type": "lookalike",
      "size": { "lower": 0, "upper": 0 },
      "status": { "ready": false, "code": null, "description": "NOT_READY" },
      "created": "2026-12-01T16:40:00.000Z"
    }
  ],
  "meta": { "pagination": { "hasMore": false } }
}
```

```json 400: Missing account 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": "accountId is required."
}
```

```json 400: Snapchat refused the request theme={"system"}
{
  "action": "ads",
  "status": "error",
  "code": 370,
  "message": "Error getting audiences. Please try again.",
  "details": "Snapchat's reason"
}
```


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