获取综合搜索列表/Get general search list

TikTokapi

About

获取综合搜索列表/Get general search list

Documentation

获取综合搜索列表/Get general search list

[中文]

用途:

  • 获取综合搜索列表

参数:

  • keyword: 搜索关键词
  • offset: 翻页游标,第一次请求时为0,第二次请求时从上一次请求的返回响应中获取,一般这个值的关键字为offset或者cursor。
  • search_id: 搜索id,第一次请求时为空,第二次翻页时需要提供,需要从上一次请求的返回响应中获取。
    • 例如: search_id = "20240828035554C02011379EBB6A00E00B"
    • JSON Path-1 : $.data.extra.logid
    • JSON Path-2 : $.data.log_pb.impr_id
  • cookie: 用户cookie(如果你需要使用自己的账号搜索,或者遇到接口报错,可以自行提供cookie,默认不需要提供)

返回:

  • 综合搜索列表

备注:

  • 此接口返回的所有视频CDN链接均需要携带返回的 tt_chain_token 参数才能正常访问,否则会返回HTTP403错误。
  • 在访问视频CDN链接时,请务必在请求头中携带 Cookie: tt_chain_token={tt_chain_token},其中 {tt_chain_token} 替换为接口返回的 tt_chain_token 参数值。
  • 如果访问视频CDN链接时返回HTTP 403错误:
    1. 请使用接口响应中以 https://www.tiktok.com/aweme/v1/play/ 开头的视频链接(通常在响应数据的 video.playAddr 或类似字段中)
    2. 在请求该链接时,务必在请求头中添加 Cookie: tt_chain_token={tt_chain_token},其中 {tt_chain_token} 为接口返回的 tt_chain_token 参数值
    3. 示例请求头: Cookie: tt_chain_token=xxx
  • 如果需要绕过此限制获取可以直接访问的无水印视频CDN链接,请使用 TikTok APP V3 目录下的接口。

[English]

Purpose:

  • Get general search list

Parameters:

  • keyword: Search keyword
  • offset: Page cursor, 0 for the first request, need to provide for the second paging, generally the keyword of this value is offset or cursor.
  • search_id: Search id, empty for the first request, need to provide for the second paging, need to get it from the return response of the last request.
    • For example: search_id = "20240828035554C02011379EBB6A00E00B"
    • JSON Path-1 : $.data.extra.logid
    • JSON Path-2 : $.data.log_pb.impr_id
  • cookie: User cookie (If you need to search with your own account, or encounter an interface error, you can provide the cookie yourself, default is not required)

Return:

  • General search list

Note:

  • All video CDN links returned by this interface need to carry the returned tt_chain_token parameter to be accessed normally, otherwise HTTP 403 error will be returned.
  • When accessing the video CDN link, be sure to carry Cookie: tt_chain_token={tt_chain_token} in the request header, where {tt_chain_token} is replaced with the tt_chain_token parameter value returned by the interface.
  • If you receive HTTP 403 error when accessing video CDN links:
    1. Use the video link starting with https://www.tiktok.com/aweme/v1/play/ from the API response (usually found in video.playAddr or similar fields)
    2. When requesting this link, make sure to add Cookie: tt_chain_token={tt_chain_token} in the request header, where {tt_chain_token} is the value returned by the API
    3. Example request header: Cookie: tt_chain_token=xxx
  • If you need to bypass this restriction to get a watermark-free video CDN link that can be accessed directly, please use the interface under the TikTok APP V3 directory.

[示例/Example]

keyword = "TikTok" offset = 0 search_id = ""

Imported from a validated TikHub OpenAPI document. Pricing must be reviewed before enabling.

Try 获取综合搜索列表/Get general search list

Test this model in the Sandbase Playground with your own prompts.

Open in Playground

Related Models