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

# 興趣

> 依名稱搜尋 Reddit 廣告興趣（最多 25 筆），取得推廣 Reddit 貼文時在 targeting.interests 中傳送的興趣 ID。

尋找要鎖定的 Reddit 興趣。[推廣貼文](https://www.ayrshare.com/docs/apis/ads/reddit/boost-post.md)時，請在 `targeting.interests` 中傳送您所選每個興趣的 `id`。

<ul>
  <li>`search` 會比對興趣名稱中的任何部分，不區分大小寫。</li>
  <li>最多返回 25 個相符結果，全部在同一頁中。`meta.pagination.hasMore` 一律為 `false`。</li>
  <li>缺少 `search`、其值為空或超過 100 個字元時，將返回 `code: 101`。</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`

## 查詢參數

**search** `string` *required*

要在興趣名稱中搜尋的文字，1 到 100 個字元。

```bash cURL theme={"system"}
curl \
  -H "Authorization: Bearer API_KEY" \
  -X GET "https://api.ayrshare.com/api/ads/reddit/interests?search=tech"
```

```json 200: Success theme={"system"}
{
  "status": "success",
  "kind": "interests",
  "results": [
    { "id": "2707000000101", "name": "Technology", "kind": "interests" },
    { "id": "2707000000102", "name": "Tech News", "kind": "interests" }
  ],
  "meta": {
    "pagination": { "hasMore": false }
  }
}
```

```json 400: Missing search 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": "Targeting search needs a query of 1 to 100 characters."
}
```


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