# Douyin/抖音 - 搜索用户

所属目录：Douyin/抖音

文档地址：https://doc.getoneapi.com/349232824e0

`POST https://api.getoneapi.com/api/douyin/search_user`

## 鉴权

在请求头中传递 Authorization: Bearer YOUR_API_KEY（必填）

## 请求参数

### Header 参数

| 字段 | 类型 | 必填 | 说明 |
| --- | --- | --- | --- |
| Authorization | string | 是 | 在 Header 添加参数 Authorization，其值为在 Bearer 之后拼接 apikey<br><br>默认值： Bearer YOUR_API_KEY |
| Content-Type | string | 是 | 默认值： application/json |

### Body 参数 · application/json

| 字段 | 类型 | 必填 | 说明 |
| --- | --- | --- | --- |
| keyword | string | 是 | 关键词<br> |
| count | number | 是 | 返回的数量，建议10<br><br>默认值： 10 |
| cursor | string | 是 | 翻页参数<br>返回内容的cursor值<br><br>默认值： 0 |
| douyin_user_type | enum&lt;string&gt; | 是 | 用户类型<br>枚举值： 0 不限<br>common_user 普通用户<br>enterprise_user 企业认证<br>personal_user 个人认证 |
| douyin_user_fans | enum&lt;string&gt; | 是 | 粉丝数量<br>枚举值： 0 不限<br>0_1k 0-1k<br>1k_1w 1k-1w<br>1w_10w 1w-10w<br>10w_100w 10w-100w<br>100w_ 100w以上<br><br>默认值： 0 |
| search_id | string | 否 | 翻页时为保证数据连续性，请填入第一页返回的logid字段值 |

#### JSON Schema

```json
{
  "type" : "object",
  "properties" : {
    "keyword" : {
      "type" : "string",
      "title" : "关键词"
    },
    "count" : {
      "type" : "number",
      "description" : "返回的数量，建议10",
      "default" : 10
    },
    "cursor" : {
      "type" : "string",
      "description" : "返回内容的cursor值",
      "default" : "0",
      "title" : "翻页参数"
    },
    "douyin_user_type" : {
      "type" : "string",
      "title" : "用户类型",
      "enum" : [ "0", "common_user", "enterprise_user", "personal_user" ],
      "enumDescriptions" : {
        "0" : "不限",
        "common_user" : "普通用户",
        "enterprise_user" : "企业认证",
        "personal_user" : "个人认证"
      }
    },
    "douyin_user_fans" : {
      "type" : "string",
      "title" : "粉丝数量",
      "enum" : [ "0", "0_1k", "1k_1w", "1w_10w", "10w_100w", "100w_" ],
      "default" : "0",
      "enumDescriptions" : {
        "0" : "不限",
        "0_1k" : "0-1k",
        "1k_1w" : "1k-1w",
        "1w_10w" : "1w-10w",
        "10w_100w" : "10w-100w",
        "100w_" : "100w以上"
      }
    },
    "search_id" : {
      "type" : "string",
      "description" : "翻页时为保证数据连续性，请填入第一页返回的logid字段值"
    }
  },
  "required" : [ "keyword", "count", "douyin_user_type", "cursor", "douyin_user_fans" ]
}
```

#### 示例

```json
{
  "keyword" : "",
  "count" : 10,
  "cursor" : "0",
  "douyin_user_type" : "0",
  "douyin_user_fans" : "0",
  "search_id" : ""
}
```

## 返回响应

### 响应 200 · application/json

| 字段 | 类型 | 必填 | 说明 |
| --- | --- | --- | --- |
| code | integer | 是 |  |
| message | string | 是 |  |
| data | object | 是 |  |

#### JSON Schema

```json
{
  "type" : "object",
  "properties" : {
    "code" : {
      "type" : "integer"
    },
    "message" : {
      "type" : "string"
    },
    "data" : {
      "type" : "object",
      "properties" : { }
    }
  },
  "required" : [ "code", "message", "data" ]
}
```

#### 示例

```json
{
  "code" : 200,
  "message" : "success",
  "data" : { }
}
```

## 请求示例代码

```sh
curl --globoff --request POST 'https://api.getoneapi.com/api/douyin/search_user' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "keyword" : "",
  "count" : 10,
  "cursor" : "0",
  "douyin_user_type" : "0",
  "douyin_user_fans" : "0",
  "search_id" : ""
}'
```

