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

# 已推廣廣告

> 依廣告、貼文、Snap、廣告活動或廣告帳戶取得透過 Ayrshare 推廣的 Snapchat 廣告及其狀態和審核。

取得你透過[推廣貼文](https://www.ayrshare.com/docs/apis/ads/snapchat/boost-post.md)建立的 Snapchat 廣告，以及每個廣告的狀態和 Snapchat 的審核結果。

<ul>
  <li>傳送 `postId`、`socialPostId`、`adId`、`accountId` 或 `campaignId` 之一。如果傳送多個，依此順序使用第一個。</li>
  <li>僅列出透過 Ayrshare 為此個人檔案推廣的廣告。在 Snapchat Ads Manager 中建立的廣告不包含在內。</li>
  <li>`review` 是 Snapchat 對廣告的審核：Snapchat 回報的 `status`，例如審核期間為 `PENDING`，通過後為 `APPROVED`；以及包含 Snapchat 說明的 `reasons`。當 Snapchat 未回報審核時，`review` 為 `null`。</li>
  <li>每個廣告都列出其 `adSquadId`：在 Snapchat 上，預算和鎖定條件設定在 ad squad 上。</li>
  <li>此端點不回傳花費或成效數據。即時數據請使用[洞察](https://www.ayrshare.com/docs/apis/ads/snapchat/get-ad-insights.md)，每日花費請使用[歷史記錄](https://www.ayrshare.com/docs/apis/ads/snapchat/get-ad-history.md)。</li>
  <li>若要暫停或恢復廣告，請使用[更新廣告](https://www.ayrshare.com/docs/apis/ads/snapchat/put-ad-update.md)。</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`

## 查詢參數

**postId** `string`

你推廣的 Ayrshare [貼文 ID](https://www.ayrshare.com/docs/apis/overview.md#ayrshare-post-id)。回傳從該貼文推廣的廣告。

**socialPostId** `string`

你推廣的 Snap 的 ID：貼文的 Snapchat 結果中的 `mediaId`。回傳從該 Snap 推廣的廣告。`snapchatSnapId` 也可作為同一參數。

**adId** `string`

Snapchat 廣告 ID，即[推廣貼文](https://www.ayrshare.com/docs/apis/ads/snapchat/boost-post.md)回傳的 `id`。

**accountId** `string`

Snapchat 廣告帳戶 ID。回傳你在該帳戶中推廣的廣告。

**campaignId** `string`

Snapchat 廣告活動 ID，來自推廣回應中的 `platformIds.campaignId`。

**status** `string`

僅回傳此狀態的廣告：`active` 或 `paused`。省略則回傳所有狀態。使用 `adId`、`postId` 或 `socialPostId` 時，即使狀態不相符也可能回傳廣告，因此請檢查其 `adStatus`。

**limit** `number` (default: 25)

要回傳的廣告數量。最大值為 300；更大的值會被限制為 300。傳送 `limit` 時，回應中的廣告可能比你傳送的數量多一個。

```bash cURL theme={"system"}
curl \
-H "Authorization: Bearer API_KEY" \
-X GET "https://api.ayrshare.com/api/ads/snapchat/ads?adId=c3a1e2d4-0000-4000-8000-0000000000ad"
```

```json 200: Success theme={"system"}
{
  "status": "success",
  "ads": [
    {
      "postId": "DE6gpw8kxlonHy6eb7L1",
      "ad": {
        "adId": "c3a1e2d4-0000-4000-8000-0000000000ad",
        "campaignId": "d4c3b2a1-0000-4000-8000-0000000000ca",
        "adSquadId": "e5f6a7b8-0000-4000-8000-0000000000sq",
        "platform": "snapchat",
        "adStatus": "ACTIVE",
        "creativeId": "a1b2c3d4-0000-4000-8000-0000000000cr",
        "created": "2026-11-20T15:04:05.123Z",
        "review": { "status": "APPROVED", "reasons": [] },
        "snapchatSnapId": "6f1c2d3e-0000-4000-8000-00000000000a",
        "socialPostId": "6f1c2d3e-0000-4000-8000-00000000000a"
      }
    }
  ],
  "count": 1,
  "lastUpdated": "2026-11-21T09:30:00.000Z",
  "nextUpdate": "2026-11-21T09:41:00.000Z"
}
```

```json 400: No lookup parameter 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": "At least one of campaignId, accountId, adId, postId, or snapchatSnapId is required."
}
```

```json 400: Not yours theme={"system"}
{
  "action": "ads",
  "status": "error",
  "code": 400,
  "message": "The ad is not found or not authorized."
}
```


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