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

# 兴趣

> 按关键词搜索 Snapchat 兴趣类别，获取可在 Snapchat 推广中定位的兴趣 ID。

按关键词搜索 Snapchat 兴趣类别。[推广 Snap](https://www.ayrshare.com/docs/apis/ads/snapchat/boost-post.md)时，将你想要的每个兴趣的 `id` 发送到 `targeting.interests` 中。

<ul>
  <li>Snapchat 的兴趣即其 Snap Lifestyle Categories，例如“Bargain Hunters”或“Beauty Mavens”。</li>
  <li>搜索会匹配名称中包含你的搜索词的任何兴趣。不区分大小写。</li>
  <li>响应最多返回 25 个匹配的兴趣，全部在一页中。请使用更具体的词来缩小列表。</li>
  <li>结果来自 Snapchat 的美国类别列表。</li>
  <li>每个结果都有 `id`、`name` 和 `path`。`path` 显示该兴趣在 Snapchat 类别树中的位置。</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 个字符。请在 URL 中对其编码，例如 `beauty%20mavens`。

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

```json 200: Success theme={"system"}
{
  "status": "success",
  "kind": "interests",
  "results": [
    {
      "id": "SLC_2",
      "name": "Beauty Mavens",
      "path": "/Beauty/Beauty Mavens",
      "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.