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

# Audiences

> Snapchat ad account के audience segments सूचीबद्ध करें, हर एक के type, size और इस जानकारी के साथ कि कोई boost उसे अभी target कर सकता है या नहीं।

Snapchat ad account के audience segments सूचीबद्ध करें: आपकी customer lists, आपके Snap Pixel द्वारा देखे गए website visitors, और lookalikes। जब आप [Snap boost करें](https://www.ayrshare.com/docs/apis/ads/snapchat/boost-post.md#audiences), तो ids को `targeting.audiences` या `targeting.excludedAudiences` में उपयोग करें।

<ul>
  <li>Snapchat Ads Manager में बने segments भी सूचीबद्ध होते हैं, सिर्फ़ Ayrshare के ज़रिए बने segments नहीं।</li>
  <li>जब Snapchat बताता है कि कोई boost segment को target कर सकता है, तब `status.ready` `true` होता है। बहुत कम matched लोगों वाला segment ready नहीं होता (`TOO_FEW_USERS`)।</li>
  <li>`size` Snapchat की अपनी matched लोगों की गिनती है, जो `lower` और `upper` दोनों के रूप में भेजी जाती है।</li>
  <li>परिणाम cache नहीं किए जाते: segment के भरते समय उसका size और readiness बदलते रहते हैं।</li>
  <li>Snapchat अपना page size खुद तय करता है, इसलिए यहाँ `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 ad account का ID जिसके segments सूचीबद्ध करने हैं, उदाहरण के लिए `5a0d0000-0000-4000-8000-000000000003`।

**next** `string`

जब response में `meta.pagination.hasMore: true` हो, तो अगला page पाने के लिए उसका `meta.pagination.next` मान यहाँ भेजें। बाकी parameters बिना बदलाव के भेजें: किसी दूसरे request का `next` मान `code: 101` लौटाता है।

## Response

हर audience में होता है:

<ul>
  <li>`id`: boost करने, लोगों को जोड़ने या हटाने के लिए segment id।</li>
  <li>`name`: Ads Manager में दिखने वाला नाम।</li>
  <li>`type`: `customerList`, `website`, `lookalike`, या ऐसे segment के लिए `other` जिसे Ayrshare नहीं बनाता।</li>
  <li>`size`: `{ lower, upper }`, दोनों Snapchat की गिनती, या `null` जब Snapchat कोई गिनती नहीं बताता।</li>
  <li>`status`: `{ ready, code, description }`। जब कोई boost अभी segment को target कर सकता है, तब `ready` `true` होता है। `code` हमेशा `null` होता है। `description` Snapchat का status है: `READY`, `NOT_READY` या `TOO_FEW_USERS`।</li>
  <li>`created`: segment कब बना, 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.