# 搜视频号视频

`POST /api/wechat-search/fetch_search_video`

- 专搜视频号视频（video 垂类），并支持搜索结果页里的「时长」「不限/最新/最热」排序与「时间」下拉。
- 等同于综合搜索 /fetch_search（business_type=video）再叠加筛选，筛选项均实测有效。

:::highlight yellow 💡
由于微信服务器原因，本接口响应较慢，请将客户端请求超时（timeout）设置为 30 秒；timeout 设置过小会造成已扣费但收不到响应的情况。
:::

## 鉴权

源接口未声明鉴权要求，请结合接入指南确认。

## 请求参数



| 字段 | 位置 | 类型 | 必填 | 说明 |
| --- | --- | --- | --- | --- |
| Authorization | header | string | 是 | 在 Header 添加参数 Authorization，其值为在 Bearer 之后拼接 apikey · default: "Bearer YOUR_API_KEY" |
| Content-Type | header | string | 是 |  · default: "application/json" |

## 请求体 · application/json



| 字段 | 位置 | 类型 | 必填 | 说明 |
| --- | --- | --- | --- | --- |
| keyword | body | string | 是 |  |
| duration | body | integer | 否 | 可选，默认 all。时长档（video 垂类专属）—— 不限 all/0 / 短(<5min) short/1 / 中(5-10min) medium/2 / 长(20min+) long/3，字符串值或整数均可 |
| sort | body | integer | 否 | 可选，默认 default。排序 —— 不限(相关性) default/0 / 最新(发布时间降序) latest/1 / 最热(点赞降序) hot/2，字符串值或整数均可 |
| publish_time | body | integer | 否 | 可选，默认 all。发布时间 —— 不限 all/0 / 最近一天 day/1 / 最近七天 week/2 / 最近半年 half_year/3，字符串值或整数均可 |
| offset | body | integer | 否 | 可选，默认 0（>=0）。翻页游标。首页传 0；翻页时把上一页响应里返回的 offset 传回（配合 continue_flag 判断是否还有下一页）。 |
| raw | body | boolean | 否 | 可选，默认 false。true=原始；false=精简解析。 |

```json
{
  "type" : "object",
  "properties" : {
    "keyword" : {
      "type" : "string",
      "title" : "关键词"
    },
    "duration" : {
      "type" : "integer",
      "description" : "可选，默认 all。时长档（video 垂类专属）—— 不限 all/0 / 短(<5min) short/1 / 中(5-10min) medium/2 / 长(20min+) long/3，字符串值或整数均可"
    },
    "sort" : {
      "type" : "integer",
      "description" : "可选，默认 default。排序 —— 不限(相关性) default/0 / 最新(发布时间降序) latest/1 / 最热(点赞降序) hot/2，字符串值或整数均可"
    },
    "publish_time" : {
      "type" : "integer",
      "description" : "可选，默认 all。发布时间 —— 不限 all/0 / 最近一天 day/1 / 最近七天 week/2 / 最近半年 half_year/3，字符串值或整数均可"
    },
    "offset" : {
      "type" : "integer",
      "description" : "可选，默认 0（>=0）。翻页游标。首页传 0；翻页时把上一页响应里返回的 offset 传回（配合 continue_flag 判断是否还有下一页）。"
    },
    "raw" : {
      "type" : "boolean",
      "description" : "可选，默认 false。true=原始；false=精简解析。"
    }
  },
  "required" : [ "keyword" ]
}
```

```json
{
  "keyword" : "罗永浩",
  "duration" : 0,
  "sort" : 0,
  "publish_time" : 0,
  "offset" : 0,
  "raw" : false
}
```

## 响应 200 · application/json



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

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

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

## cURL

```sh
curl --globoff --request POST 'https://api.getoneapi.com/api/wechat-search/fetch_search_video' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "keyword" : "罗永浩",
  "duration" : 0,
  "sort" : 0,
  "publish_time" : 0,
  "offset" : 0,
  "raw" : false
}'
```

