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

# الجماهير

> اعرض الجماهير المخصصة في حساب إعلاني على Instagram، مع نوع كل منها وحجمه وما إذا كان التعزيز يستطيع استهدافه الآن.

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

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

الحساب الإعلاني الذي تريد عرض جماهيره، من [الحسابات الإعلانية](https://www.ayrshare.com/docs/apis/ads/instagram/get-ad-accounts.md)، مع البادئة `act_` أو بدونها.

**limit** `number`

أقصى عدد من الجماهير في الصفحة الواحدة، من 1 إلى 1000. القيمة الافتراضية 100؛ والرقم الأكبر يُرجع 1000.

**next** `string`

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

## الاستجابة

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

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

عند وجود مزيد من الجماهير، تكون `meta.pagination.hasMore` هي `true` وتُعيَّن `meta.pagination.next`. أرسل الطلب نفسه مرة أخرى مع تعيين `next` إلى تلك القيمة للحصول على الصفحة التالية.

```bash cURL theme={"system"}
curl \
-H "Authorization: Bearer API_KEY" \
-X GET "https://api.ayrshare.com/api/ads/instagram/audiences?accountId=1234567890"
```

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

fetch("https://api.ayrshare.com/api/ads/instagram/audiences?accountId=1234567890", {
      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/instagram/audiences?accountId=1234567890', headers=headers)

print(r.json())
```

```json 200: Success theme={"system"}
{
  "status": "success",
  "audiences": [
    {
      "id": "23851234567890123",
      "name": "Site visitors 30d",
      "type": "website",
      "size": { "lower": 12000, "upper": 14100 },
      "status": { "ready": true, "code": 200, "description": "This audience is ready for use." },
      "created": "2026-10-20T09:12:00.000Z"
    },
    {
      "id": "23851234567890456",
      "name": "Like site visitors",
      "type": "lookalike",
      "size": null,
      "status": { "ready": false, "code": 300, "description": "This audience is still being populated." },
      "created": "2026-10-28T16: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: Meta refused the request theme={"system"}
{
  "action": "ads",
  "status": "error",
  "code": 370,
  "message": "Error getting audiences. Please try again.",
  "details": "Meta's reason"
}
```


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