> ## 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 アカウント・動画にエンゲージした人、類似オーディエンス(lookalike)、独自の顧客リストが含まれます。[投稿をブースト](https://www.ayrshare.com/docs/apis/ads/instagram/boost-post.md#audiences)するときに、ID を `targeting.audiences` または `targeting.excludedAudiences` に指定します。

<ul>
  <li>Ayrshare で作成したものだけでなく、Meta Ads Manager で作成したオーディエンスも一覧に含まれます。</li>
  <li>Meta がオーディエンスを作成し終え、ブーストでターゲットにできるようになると、`status.ready` が `true` になります。新しいオーディエンスは、Meta が 100 人以上をマッチングするまで準備完了になりません。ウェブサイトまたはエンゲージメントのオーディエンスでは数時間、顧客リストでは最大 48 時間かかることがあります。</li>
  <li>`size` は Meta 独自の推定値で、下限と上限で示されます。Meta に推定値がない間、たとえばオーディエンスの作成中は `null` になります。</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 ページで返すオーディエンスの最大数(1〜1000)。デフォルトは 100 で、それより大きい数を指定すると 1000 件を返します。

**next** `string`

レスポンスに `meta.pagination.hasMore: true` が含まれる場合、その `meta.pagination.next` の値をここに送ると次のページを取得できます。他のパラメータは変更せずに送ってください。別のリクエストの `next` 値を使うと `code: 101` が返ります。

## レスポンス

各オーディエンスには次の項目があります。

<ul>
  <li>`id`: ブースト、人の追加、削除に使うオーディエンス ID。</li>
  <li>`name`: Ads Manager に表示される名前。</li>
  <li>`type`: `website`、`engagement`、`lookalike`、`customerList`、または Ayrshare が作成しない種類のオーディエンスの場合は `other`。</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.