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