Tiktok API - cheaper version
收藏TikTok API - cheaper version 数据集概述
基本信息
- API名称:Tiktok API - cheaper version
- 类别:Social
- 提供者:Api-city
- 当前版本:1.0.0
- 订阅者数量:6
性能指标
- 受欢迎度:9.4
- 服务等级:96%
- 延迟:1947ms
- 测试通过率:100%
订阅计划与定价
- BASIC:$0.00 / 月
- PRO:$5.00 / 月
- ULTRA:$20.00 / 月
- MEGA:$45.00 / 月
API 概述
这是一个轻量级、快速且功能完整的 TikTok API。提供超过 30 个端点,涵盖关键功能,如帖子、搜索、用户、商店、广告和热门内容。端点持续维护和更新,以确保集成平稳运行。
主要端点列表 (HTTP GET 方法)
- get_api_shop_product
- get_api_trending_top_products_metrics
- get_api_trending_top_products
- get_api_post_discover
- get_api_trending_commercial_music_library
- get_api_trending_keyword_sentence
- get_api_user_story
- get_api_user_oldest_posts
- get_api_trending_commercial_music_library_playlist_detail
- get_api_trending_commercial_music_library_playlist
- get_api_user_repost
- get_api_trending_keyword_posts
- get_api_user_playlist
- get_api_trending_top_products_detail
- get_api_post_related
- get_api_search_others_searched_for
- get_api_trending_song
- get_api_post_trending
- get_api_user_followings
- get_api_post_explore
- get_api_music_posts
- get_api_user_info_by_id
- get_api_trending_keyword
- get_api_user_posts
- get_api_live_check_alive
- get_api_collection_posts
- get_api_user_liked_posts
- get_api_trending_video
- get_api_user_followers
- get_api_post_comments
- get_api_music_info
- get_api_post_detail
- get_api_download_video
- get_api_trending_ads
- get_api_music_unlimited_sounds
- get_api_download_music
- get_api_search_general
- get_api_search_account
- get_api_live_category
- get_api_collection_info
- get_api_user_info_with_region
- get_api_trending_hashtag
- get_api_search_video
- get_api_effect_posts
- get_api_trending_ads_detail
- get_api_trending_creator
- get_api_search_live
- get_api_live_stream
- get_api_place_posts
- get_api_challenge_info
- get_api_user_info
- get_api_post_comment_replies
- get_api_place_info
- get_api_user_popular_posts
- get_api_effect_info
- get_api_challenge_posts
分页机制说明
TikTok API 通常使用基于游标的分页系统来处理大型数据集。服务器在响应中提供一个游标值,用于指示下一组结果。
使用步骤
- 初始请求:发送初始 API 请求以获取第一页数据。首次请求时,
cursor值默认为0。响应通常包含结果列表和用于下一页的游标字段。 - 处理响应:从响应中获取
cursor字段值,用于下一次请求。 - 使用游标分页:要检索下一页结果,需在后续 API 请求中包含从前一个响应中获取的
cursor参数。 - 重复:继续使用每个响应中的新游标值发出请求,以遍历所有可用数据。
- 结果结束:当响应中不再包含游标字段,或其值为
null/空/-1时,表示已到达数据末尾,没有更多结果可获取。
示例 API 请求 (Python)
python import requests
url = "https://tiktok-api23.p.rapidapi.com/api/user/posts"
querystring = { "secUid":"MS4wLjABAAAAqB08cUbXaDWqbD6MCga2RbGTuhfO2EsHayBYx08NDrN7IE3jQuRDNNN6YwyfH6_6", "count":"35", "cursor":"0" }
headers = { "x-rapidapi-key": "YOUR_X_RAPIDAPI_KEY", "x-rapidapi-host": "tiktok-api23.p.rapidapi.com" }
response = requests.get(url, headers=headers, params=querystring) print(response.json())
示例响应结构
json { "data": { "cursor": "1729260489000", "extra": { "fatal_item_ids": [], "logid": "2025021310472335DA5E9DB25F2C2A587A", "now": 1739414843000 }, "hasMore": true, "itemList": [...], "log_pb": { "impr_id": "2025021310472335DA5E9DB25F2C2A587A" }, "statusCode": 0, "status_code": 0, "status_msg": "" } }



