Sand AISand AI MAGI-2MAGI-2 現已登上 SandBase:支援原生音訊的 1080p 影片立即試用

TikTok Search

API 文件
https://api.sandbase.ai/v1/api/tiktok/app-v3/general-search-result

Search TikTok by keyword across videos and users (Top tab). Returns videos with descriptions, authors and play, like, comment and share counts, with sort and publish-time filters.

價格
$0.001美元/次呼叫
方法
POST
回應
JSON
參數
1 個必填 · 4 個選填
每天 100 次免費呼叫每天前 100 次呼叫免費(按組織共用)· 於 UTC 00:00 重設。之後按次收費。

Playground

輸入
Keyword
Number
Offset
0-Unlimited, 1-Last day, 7-Last week, 30-Last month, 90-Last three months, 180-Last half year
0-Relatedness, 1-Most likes
輸出範例
回應outputs · 7.2 KB · 209 行
[
  {
    "data": {
      "ad_info": {},
      "backtrace": "ad_cursor%3D2%3Bcurrent_page%3D1",
      "components": null,
      "cursor": 10,
      "data": [
        {
          "aweme_info": {
            "added_sound_music_info": {
              "album": "",
              "allow_offline_music_to_detail_page": false,
              "artists": "… 0 items in the full response",
              "audition_duration": 8,
              "author": "Shaalaye Shaalaytu",
              "author_deleted": false,
              "author_position": null,
              "avatar_medium": "…",
              "avatar_thumb": "…",
              "binded_challenge_id": 0,
              "can_be_stitched": true,
              "can_not_reuse": false,
              "collect_stat": 0,
              "commercial_right_type": 2,
              "cover_large": "…",
              "cover_medium": "…",
              "cover_thumb": "…",
              "create_time": 1791140539,
              "dmv_auto_show": false,
              "duration": 8,
              "duration_high_precision": "…",
              "external_song_info": "… 0 items in the full response",
              "extra": "{\"amplitude_peak\":0,\"beats\":{},\"can_read\":true,\"can_reuse\":true,\"erase_type\":0,\"erase_uid\":0,\"extract_item_id\":7692889952505335053,\"from_user_id\":0,\"full_song_beat_info\":{},\"full_song_beats\":{},\"has_e…",
              "has_commerce_right": true,
              "has_commerce_right_strict": true,
              "…": "43 more fields in the full response"
            },
            "ai_remix_info": {
              "has_entrance": false
            },
            "aigc_info": {
              "aigc_label_type": 0,
              "created_by_ai": false
            },
            "anchors": null,
            "anchors_extras": "",
            "animated_image_info": {
              "effect": 0,
              "type": 0
            },
            "author": {
              "accept_private_policy": false,
              "account_labels": null,
              "ad_cover_url": null,
              "advance_feature_item_order": null,
              "advanced_feature_info": null,
              "authority_status": 0,
              "avatar_168x168": "…",
              "avatar_300x300": "…",
              "avatar_larger": "…",
              "avatar_medium": "…",
              "avatar_thumb": "…",
              "avatar_uri": "tos-useast5-avt-0068-tx/6b38490674b02cb0dfe82f15cddaf594",
              "aweme_count": 0,
              "bold_fields": null,
              "can_message_follow_status_list": null,
              "can_set_geofencing": null,
              "cha_list": null,
              "comment_filter_status": 0,
              "comment_setting": 0,
              "commerce_user_level": 0,
              "cover_url": null,
              "custom_verify": "",
              "cv_level": "",
              "download_prompt_ts": 1750625881,
              "enabled_filter_all_comments": false,
              "…": "69 more fields in the full response"
            },
            "author_user_id": 7276602929624483000,
            "aweme_acl": {
              "download_general": "…",
              "download_mask_panel": "…",
              "platform_list": null,
              "press_action_list": null,
              "share_action_list": null,
              "share_general": "…",
              "share_list_status": 0
            },
            "aweme_id": "7692889952505335053",
            "aweme_type": 0,
            "banners": [
              "…"
            ],
            "behind_the_song_music_ids": null,
            "behind_the_song_video_music_ids": null,
            "bodydance_score": 0,
            "bottom_products": null,
            "branded_content_accounts": null,
            "cc_template_info": {
              "author_name": "",
              "clip_count": 0,
              "desc": "",
              "duration_milliseconds": 0,
              "related_music_id": "",
              "template_id": ""
            },
            "cha_list": [
              "…"
            ],
            "challenge_position": null,
            "cmt_swt": false,
            "collect_stat": 0,
            "comment_at_tako_info": {
              "show_tako_account": 0
            },
            "comment_config": {
              "comment_panel_show_tab_config": "…",
              "comment_top_bar_component": "… 1 items in the full response",
              "emoji_recommend_list": "… 11 items in the full response",
              "long_press_recommend_list": null,
              "preload": "…",
              "quick_comment": "…",
              "quick_comment_emoji_recommend_list": null,
              "social_quick_comment": "…"
            },
            "comment_topbar_info": null,
            "…": "116 more fields in the full response"
          },
          "card_profile": {},
          "doc_id": 7692889952505335000,
          "doc_type": 183,
          "feedback_type": "video",
          "preload_img": {
            "urls": [
              "https://p19-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/6b38490674b02cb0dfe82f15cddaf594~tplv-tiktokx-cropcenter:100:100.webp?biz_tag=musically_general.video_user_cover&dr=9640&idc=useast8&ps…",
              "… 1 more items in the full response"
            ]
          },
          "provider_doc_id_str": "7692889952505335053",
          "search_aweme_info": {
            "has_creation_intention": false
          },
          "type": 1
        },
        "… 1 more items in the full response"
      ],
      "extra": {
        "dc": "useast8",
        "logid": "202610050952570A9009CD8E66AE752B82",
        "now": 1791193977858,
        "search_id": "202610050952570A9009CD8E66AE752B82",
        "search_request_id": "",
        "server_stream_time": 787
      },
      "global_doodle_config": {
        "ab_params": {
          "user_relation_ship": "1"
        },
        "can_pull_refresh": true,
        "disable_reorder": 0,
        "display_filter_bar": 1,
        "ecom_api_version": "",
        "ecom_search_info": {
          "query_addr_intent": {
            "query_addr_intent": false,
            "query_addr_intent_creator": false,
            "query_addr_intent_shop": false
          }
        },
        "enable_multi_search": false,
        "feedback_survey": [
          {
            "feedback_type": "activity_banner",
            "long_stress_info": null,
            "multiple_choices": [
              "…",
              "… 4 more items in the full response"
            ],
            "send_us_multiple_choices": null
          },
          "… 18 more items in the full response"
        ],
        "has_ecom_intent": true,
        "hide_results": false,
        "hit_dolphin": false,
        "hit_shark": false,
        "keyword": "faith sweatshirt",
        "new_source": "recom_search",
        "original_ecom_intent": 3,
        "prefetch_degrade_level": 1,
        "search_channel": "musically_general",
        "search_intent": {},
        "show_video_research_tab_list": false,
        "tns_search_result": "Pass"
      },
      "has_more": false,
      "headers": [],
      "log_pb": {
        "impr_id": "202610050952570A9009CD8E66AE752B82"
      },
      "prefer_layout": "double_column",
      "qc": "",
      "result_status": 4,
      "status_code": 0,
      "version": "v1"
    }
  }
]

範例

選擇一個範例,將其輸入與結果載入 playground。

API README

TikTok Search API

Searches TikTok's Top tab for a keyword and returns a mixed list of results, including user cards with sample videos and videos with play, like, comment and share counts. It needs one input, keyword. You can also sort by relevance or likes and filter by publish time.

Use cases

  • Find the accounts that rank first for a brand or product name such as openai.
  • Check which videos TikTok shows first for a keyword, sorted by sort_type of 1 for most likes.
  • Collect recent posts about a topic by setting publish_time to 7 or 30.
  • Spot AI-labelled videos in the results for a keyword using the aigc_info flags.

Request

curl -X POST "https://api.sandbase.ai/v1/api/tiktok/app-v3/general-search-result" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"keyword": "openai", "count": 5}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
keywordstringYesKeyword
countintegerNoNumber
offsetintegerNoOffset
publish_timeintegerNo0-Unlimited, 1-Last day, 7-Last week, 30-Last month, 90-Last three months, 180-Last half year
sort_typeintegerNo0-Relatedness, 1-Most likes

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "ad_info": {},
  "backtrace": "ad_cursor%3D16%3Bcurrent_page%3D1",
  "components": null,
  "cursor": 10,
  "data": [
    {
      "card_profile": {
        "category_tag_list": [
          1
        ]
      },
      "card_title": "Users",
      "doc_id": 1,
      "doc_type": 180,
      "feedback_type": "user",
      "has_top_user": 0,
      "preload_img": {
        "urls": [
          "https://p16-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/d29bf4d0c36077c…"
        ]
      },
      "provider_doc_id_str": "1",
      "type": 4,
      "user_list": [
        {
          "challenges": null,
          "effects": null,
          "horizontal_data": {
            "backtrace": "{\"cache_key\":\"loadmore_v1:202611030743526A582DF2CDFA6E018899|user_video_subcard|…",
            "card_list": null,
            "common_data": {
              "horizontal_has_more": true
            }
          },
          "items": [
            {
              "added_sound_music_info": {
                "album": "",
                "allow_offline_music_to_detail_page": false,
                "artists": [],
                "audition_duration": 64,
                "author": "OpenAI",
                "author_deleted": false,
                "author_position": null,
                "avatar_medium": {
                  "height": 720,
                  "uri": "tos-useast5-avt-0068-tx/d29bf4d0c36077c6aace74b1dd3c8204",
                  "url_list": [
                    "https://p19-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/d29bf4d0c36077c…"
                  ],
                  "url_prefix": null,
                  "width": 720
                }
              },
              "ai_remix_info": {
                "has_entrance": false
              },
              "aigc_info": {
                "aigc_label_type": 0,
                "created_by_ai": false
              },
              "anchors": null,
              "anchors_extras": "",
              "animated_image_info": {
                "effect": 0,
                "type": 0
              },
              "author": {
                "accept_private_policy": false,
                "account_labels": null,
                "ad_cover_url": null,
                "advance_feature_item_order": null,
                "advanced_feature_info": null,
                "authority_status": 0,
                "avatar_168x168": {
                  "height": 720,
                  "uri": "tos-useast5-avt-0068-tx/d29bf4d0c36077c6aace74b1dd3c8204",
                  "url_list": [
                    "https://p16-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/d29bf4d0c36077c…"
                  ],
                  "url_prefix": null,
                  "width": 720
                },
                "avatar_300x300": {
                  "height": 720,
                  "uri": "tos-useast5-avt-0068-tx/d29bf4d0c36077c6aace74b1dd3c8204",
                  "url_list": [
                    "https://p16-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/d29bf4d0c36077c…"
                  ],
                  "url_prefix": null,
                  "width": 720
                }
              },
              "author_user_id": 7256178298626032683
            }
          ],
          "mix_cursor": 3,
          "mix_has_more": 0,
          "mix_list": [
            {
              "create_time": 1733529383,
              "extra": "{}",
              "ids": null,
              "mix_id": "7445448327224724267",
              "mix_name": "12 Days of OpenAI",
              "mix_type": 1,
              "name": "12 Days of OpenAI",
              "status": {
                "status": 1
              }
            }
          ],
          "musics": null
        }
      ],
      "view_more": true
    }
  ],
  "extra": {
    "dc": "useast8",
    "logid": "202611030743526A582DF2CDFA6E018899",
    "now": 1793691833542,
    "search_id": "202611030743526A582DF2CDFA6E018899",
    "search_request_id": "",
    "server_stream_time": 925
  },
  "global_doodle_config": {
    "ab_params": {
      "user_relation_ship": "1"
    },
    "can_pull_refresh": true,
    "disable_reorder": 0,
    "display_filter_bar": 1,
    "ecom_api_version": "",
    "ecom_search_info": {
      "query_addr_intent": {
        "query_addr_intent": false,
        "query_addr_intent_creator": false,
        "query_addr_intent_shop": false
      }
    },
    "enable_multi_search": false,
    "feedback_survey": [
      {
        "feedback_type": "activity_banner",
        "long_stress_info": null,
        "multiple_choices": [
          {
            "key": "Unrelated content",
            "value": "Unrelated content"
          }
        ],
        "send_us_multiple_choices": null
      }
    ],
    "has_ecom_intent": false,
    "hide_results": false,
    "hit_dolphin": false,
    "hit_shark": false
  },
  "has_more": true,
  "headers": [],
  "log_pb": {
    "impr_id": "202611030743526A582DF2CDFA6E018899"
  },
  "prefer_layout": "double_column",
  "qc": ""
}

Response fields

FieldMeaning
cursorCursor value for the returned page. The request used count 5 and the response returned 10.
data[].card_title / data[].feedback_typeLabel of the result block. A user block has card_title set to Users and feedback_type set to user.
data[].user_list[].items[].authorProfile of the account that posted the video. It includes avatar images in several sizes, such as avatar_168x168 and avatar_300x300, each with a url_list.
data[].user_list[].items[].author_user_idNumeric ID of the account that posted the video.
data[].user_list[].items[].aigc_info.created_by_aiBoolean flag. It is true when the video is labelled as AI-generated. aigc_label_type holds the label code.
data[].user_list[].items[].added_sound_music_info.author / albumName of the sound's author and its album. Either can be an empty string.
data[].user_list[].mix_list[].mix_id / mix_nameID and title of a playlist (mix) that belongs to the matched user, such as 12 Days of OpenAI.
data[].user_list[].mix_list[].create_timeUnix timestamp in seconds for when the mix was created.
data[].user_list[].horizontal_data.common_data.horizontal_has_moreBoolean flag. It is true when the user card has more horizontal items to load.
data[].preload_img.urlsImage URLs for previewing the result card.

Notes

  • Use count and offset to page through results. sort_type takes 0 (relevance) or 1 (most likes). publish_time takes 0, 1, 7, 30, 90 or 180.
  • One response can mix user cards and videos, so check data[].card_title or data[].feedback_type before you read a result.
  • To search only videos, call TikTok Video Keyword Search. To search only accounts, call TikTok User Search Results.
  • To get full details for a video from the results, call TikTok Video Details (V3).

Pricing

$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

探索更多

相關 APIs

所有 APIs
API價格回應
TikTok每次呼叫 $0.001JSON
TikTok每次呼叫 $0.001JSON
TikTok每次呼叫 $0.01JSON
TikTok每次呼叫 $0.001JSON
TikTok每次呼叫 $0.001JSON
TikTok每次呼叫 $0.001JSON

指南:TikTok API pricing: official access vs per-call dataBest TikTok API in 2026: Pricing Compared

問題

常見問題

我要如何使用 TikTok Search API?

使用 POST 請求將您的 SandBase API 金鑰放在 Authorization 標頭(Bearer)中,並以 JSON 主體傳入參數,即可呼叫 https://api.sandbase.ai/v1/api/tiktok/app-v3/general-search-result。您也可以直接在本頁的 Playground 試用,不必撰寫程式碼。

TikTok Search API 的費用是多少?

每次 $0.001。每個組織每個 UTC 日可免費呼叫 100 次,並可在包含此 API 在內的所有符合資格之 SandBase APIs 間共用;超過後,每次呼叫都會從您的 SandBase 餘額中以此價格計費。沒有訂閱方案。

TikTok Search API 接受哪些參數?

必要:keyword (string)。 選填:count (integer), offset (integer), publish_time (integer) 和 sort_type (integer)。 本頁的 Parameters 表格與 Playground 會列出每個欄位。

TikTok Search API 會回傳什麼?

在同一個 HTTP 請求中回傳的 JSON 回應(同步)。 本頁的 README 包含範例回應。

我需要 TikTok 開發者帳號或 API 金鑰嗎?

不需要。TikTok Search 是透過 SandBase 運作,因此一組 SandBase API 金鑰即可使用此端點以及目錄中的其他所有 API 和模型。您不需要另外申請 TikTok API 存取權。