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

# Zielgruppen

> Listet die Custom Audiences eines Instagram-Werbekontos mit Typ, Größe und der Angabe, ob ein Boost sie bereits ansprechen kann.

Listet die Custom Audiences eines Instagram-Werbekontos: Websitebesucher, Personen, die mit einer Seite, einem Instagram-Konto oder einem Video interagiert haben, Lookalikes und Ihre eigenen Kundenlisten. Verwenden Sie die IDs in `targeting.audiences` oder `targeting.excludedAudiences`, wenn Sie [einen Beitrag boosten](https://www.ayrshare.com/docs/apis/ads/instagram/boost-post.md#audiences).

<ul>
  <li>Auch in Meta Ads Manager erstellte Zielgruppen werden aufgelistet, nicht nur die über Ayrshare erstellten.</li>
  <li>`status.ready` ist `true`, sobald Meta die Zielgruppe gefüllt hat und ein Boost sie ansprechen kann. Eine neue Zielgruppe ist erst bereit, wenn Meta mindestens 100 Personen zugeordnet hat. Das kann bei einer Website- oder Interaktions-Zielgruppe einige Stunden und bei einer Kundenliste bis zu 48 Stunden dauern.</li>
  <li>`size` ist Metas eigene Schätzung als Unter- und Obergrenze. Der Wert ist `null`, solange Meta keine Schätzung hat, zum Beispiel während sich die Zielgruppe noch füllt.</li>
  <li>Die Ergebnisse werden nicht zwischengespeichert: Größe und Bereitschaft einer Zielgruppe ändern sich, während sie sich füllt.</li>
</ul>

## Header-Parameter

**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`

## Query-Parameter

**accountId** `string` *required*

Das Werbekonto, dessen Zielgruppen aufgelistet werden, aus den [Werbekonten](https://www.ayrshare.com/docs/apis/ads/instagram/get-ad-accounts.md), mit oder ohne das Präfix `act_`.

**limit** `number`

Die maximale Anzahl an Zielgruppen pro Seite, von 1 bis 1000. Standard ist 100; eine größere Zahl liefert 1000.

**next** `string`

Wenn die Antwort `meta.pagination.hasMore: true` enthält, senden Sie hier ihren Wert `meta.pagination.next`, um die nächste Seite abzurufen. Senden Sie die übrigen Parameter unverändert: Ein `next`-Wert aus einer anderen Anfrage liefert `code: 101`.

## Antwort

Jede Zielgruppe enthält:

<ul>
  <li>`id`: die Zielgruppen-ID zum Boosten, Hinzufügen von Personen oder Löschen.</li>
  <li>`name`: der in Ads Manager angezeigte Name.</li>
  <li>`type`: `website`, `engagement`, `lookalike`, `customerList` oder `other` für eine Zielgruppenart, die Ayrshare nicht erstellt.</li>
  <li>`size`: `{ lower, upper }`, Metas Schätzung, oder `null`.</li>
  <li>`status`: `{ ready, code, description }`. `ready` ist `true`, wenn ein Boost die Zielgruppe jetzt ansprechen kann; `code` und `description` sind Metas Auslieferungsstatus.</li>
  <li>`created`: wann die Zielgruppe erstellt wurde, im ISO-8601-Format, oder `null`.</li>
</ul>

Gibt es weitere Zielgruppen, ist `meta.pagination.hasMore` `true` und `meta.pagination.next` gesetzt. Senden Sie dieselbe Anfrage erneut mit `next` auf diesen Wert, um die nächste Seite abzurufen.

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