TokInsight is a powerful TikTok API platform that provides comprehensive data insights and original data for TikTok content creators, marketers, and businesses. Our platform offers real-time access to TikTok's vast data ecosystem through a robust REST API. Including :
You can get cursor and history_comment_cursor value.
If you want to keep getting the next message in the live stream, use the cursor vaule from the previous webcast_room_msg_fetch response.
If you want to keep getting the history messages in the live stream. The first time, you can get history_comment_cursor value from the first response of webcast_room_msg_fetch api, then the next history message, you should get history_comment_cursor value from api webcast_room_history_msg_fetch
6. Get Live Room History Messages
GET /tok/v1/webcast_room_history_msg_fetch/
Get live room history messages, including welcome messages, chat messages, gift message, member messages, game messages, link messages etc.
Get up to 10 messages each time
๐ Parameters
Parameter
Type
Required
Description
room_id
string
โ
the live room id
history_comment_cursor
string
โ
message cursor, first time 0, next time get from resp
{"messages":[{"method":"WebcastChatMessage","payload":{"common":{"method":"WebcastChatMessage","msgId":"7540357990382111501","roomId":"7540298176301894422","createTime":"1755626418239","isShowMsg":true,"foldType":"2","anchorFoldType":"2","fromIdc":"useast5","anchorPriorityScore":"1000","roomMessageHeatLevel":"1","foldTypeForWeb":"2","anchorFoldTypeForWeb":"2","clientSendTime":"1755626417603"},"user":{"id":"7040115635246941189","nickname":"Zafiro Oropeza-Galva","avatarThumb":{"urlList":["https://p19-pu-sign-useast8.tiktokcdn-us.com/tos-useast8-avt-0068-tx2/e549abefaa5611ceb0de8b7aa0cc578b~tplv-tiktokx-cropcenter:100:100.webp?dr=9640&refresh_token=6ca52f18&x-expires=1755799200&x-signature=YOYm9mA4%2BbVO%2BOxr1gxbAWo%2B1fI%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=fdd36af4&idc=useast5","https://p16-pu-sign-useast8.tiktokcdn-us.com/tos-useast8-avt-0068-tx2/e549abefaa5611ceb0de8b7aa0cc578b~tplv-tiktokx-cropcenter:100:100.webp?dr=9640&refresh_token=601b17a5&x-expires=1755799200&x-signature=iiWSD15cJHYfiCB8%2Fb%2FhcL2efd4%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=fdd36af4&idc=useast5","https://p19-pu-sign-useast8.tiktokcdn-us.com/tos-useast8-avt-0068-tx2/e549abefaa5611ceb0de8b7aa0cc578b~tplv-tiktokx-cropcenter:100:100.jpeg?dr=9640&refresh_token=467b8da0&x-expires=1755799200&x-signature=QRt8v2WukJNxrg2GU6W0ZsSZ%2Fmo%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=fdd36af4&idc=useast5"],"uri":"100x100/tos-useast8-avt-0068-tx2/e549abefaa5611ceb0de8b7aa0cc578b"},"followInfo":{"followingCount":"461","followerCount":"268","followStatus":"2"},"payGrade":{},"userAttr":{},"displayId":"zafirobebe","secUid":"MS4wLjABAAAAE6r9Dzwd_HZh_ZrtvZd04otwAFHoNQFiysvfs_r0v_Pea-sAAk-_6EkaI5yMOCl3"},"content":"Any big ring on sale ( ring) ๐ณ ๐๐๐","contentLanguage":"en","userIdentity":{"isMutualFollowingWithAnchor":true,"isFollowerOfAnchor":true},"commentQualityScores":[{"version":"user_type_rule","score":"300000"},{"version":"community-flagged","score":"-1"},{"version":"commentator_id","score":"7040115635246941189"},{"version":"default","score":"1755626418174000"},{"version":"default_app","score":"10000"},{"version":"rankV3","score":"1755626418175000"},{"version":"ttp_rule_rerank","score":"1755626418175000"},{"version":"timestamp_desc","score":"98244373581825000"},{"version":"tikcast_community_comment_18866_v7_r655069","score":"1755626418175000"},{"version":"tikcast_community_comment_18866_v7_r655069_desc","score":"1755626418175000"},{"version":"idc_rule_rerank","score":"1755626418175000"},{"version":"v13_r712088","score":"1755626418175000"},{"version":"v12_r702075","score":"1755626418175000"}],"commentTag":["COMMENT_TAG_NORMAL"],"publicAreaMessageCommon":{"creatorSuccessInfo":{"tags":[{"tagType":"TAG_TYPE_CREATOR_CRM_TAG_TYPE_ECOMMERCE_TAG","tagText":{"key":"BADGE_FOLLOWER","defaultPattern":"Follower ยท Followed for 530 days","pieces":[{"type":1,"stringValue":"Follower"},{"type":1,"stringValue":"Followed for 530 days"}]}}]},"portraitInfo":{}},"signature":"45f13d2c739ea07a064162b5dcce1d5f","signatureVersion":"v1"},"msg_id":7540357990382112000,"is_history":true},....],"cursor":"1755626467063_7540358255462062135_1_1_1755626451824_0","fetch_interval":1000,"now":1755626467063,"internal_ext":"fetch_time:1755626467063|start_time:0|ack_ids:,,|flag:0|seq:1|next_cursor:1755626467063_7540358255462062135_1_1_1755626451824_0|wss_info:1-1755626467063-0-1","is_first":true,"history_comment_cursor":"7540357990382111501"}
/tok/v1/webcast_room_history_msg_fetch/ resp:
{"messages":[{"method":"WebcastChatMessage","payload":{"common":{"method":"WebcastChatMessage","msgId":"7540355812308372246","roomId":"7540315749735254806","createTime":"1755625906553","isShowMsg":true,"foldType":"2","anchorFoldType":"2","fromIdc":"no1a","roomMessageHeatLevel":"3","foldTypeForWeb":"2","anchorFoldTypeForWeb":"2","clientSendTime":"1755625906041"},"user":{"id":"7505343803353400342","nickname":"Live Deals","avatarThumb":{"urlList":["https://p16-sign-va.tiktokcdn.com/musically-maliva-obj/1594805258216454~tplv-tiktokx-cropcenter:100:100.webp?dr=10399&refresh_token=d1ea03a0&x-expires=1755795600&x-signature=gECUmeentyyd9YtFWAfY8l8q05w%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=fdd36af4&idc=no1a","https://p77-sign-va.tiktokcdn.com/musically-maliva-obj/1594805258216454~tplv-tiktokx-cropcenter:100:100.webp?dr=10399&refresh_token=2114a64c&x-expires=1755795600&x-signature=sBM4MpyuuNDf8EON%2BzNAcWFlJVM%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=fdd36af4&idc=no1a","https://p16-sign-va.tiktokcdn.com/musically-maliva-obj/1594805258216454~tplv-tiktokx-cropcenter:100:100.jpeg?dr=10399&refresh_token=326a51a7&x-expires=1755795600&x-signature=kyVaUOO%2BRtCbG4cDnopVYQpYi2o%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=fdd36af4&idc=no1a","https://p16-common-sign-va.tiktokcdn-us.com/musically-maliva-obj/1594805258216454~tplv-tiktokx-cropcenter:100:100.webp?dr=13166&refresh_token=4694ce8d&x-expires=1755795600&x-signature=nOFOUdgyykP5OJnLufR7ahje9V0%3D&t=4d5b0474&ps=ae600521&shp=a5d48078&shcp=fdd36af4&idc=no1a","https://p19-common-sign-va.tiktokcdn-us.com/musically-maliva-obj/1594805258216454~tplv-tiktokx-cropcenter:100:100.webp?dr=13166&refresh_token=b45f8d2c&x-expires=1755795600&x-signature=ftCbYn8kCH635907Tp0iP4UFTdo%3D&t=4d5b0474&ps=ae600521&shp=a5d48078&shcp=fdd36af4&idc=no1a","https://p16-common-sign-va.tiktokcdn-us.com/musically-maliva-obj/1594805258216454~tplv-tiktokx-cropcenter:100:100.jpeg?dr=13166&refresh_token=1e9e5830&x-expires=1755795600&x-signature=A7wyd46MYMMNIPJUObMH9EMyEgQ%3D&t=4d5b0474&ps=ae600521&shp=a5d48078&shcp=fdd36af4&idc=no1a"],"uri":"100x100/musically-maliva-obj/1594805258216454"},"badgeImageList":[{"urlList":["https://p16-webcast.tiktokcdn.com/webcast-sg/new_top_gifter_version_2.png~tplv-obj.image","https://p19-webcast.tiktokcdn.com/webcast-sg/new_top_gifter_version_2.png~tplv-obj.image"],"uri":"webcast-sg/new_top_gifter_version_2.png","imageType":31}],"followInfo":{"followingCount":"1","followerCount":"4"},"payGrade":{},"userAttr":{},"displayId":"live.deals1","secUid":"MS4wLjABAAAASm6KmJIWu-Qt-zKPukIDd7j1kYTpZgOQpXJsXVWUVpfGhn9mqqZStZgBduM2mH3x","badgeList":[{"displayType":"BadgeDisplayType_Image","priorityType":"BadgePriorityType_RankList","sceneType":"BadgeSceneType_Ranklist","position":"PositionRight","OpenWebURL":"sslocal://webcast_webview_popup?url=https%3A%2F%2Finapp.tiktokv.com%2Flive%2Fmonetization%2Franking%2Ftopview%2Ffaq-new&web_bg_color=FFFFFF&gravity=bottom&height=60%25&show_mask=1&mask_bg_color=000000b3&radius=8&use_spark=1&rank=1&score=55","privilegeLogExtra":{"dataVersion":"0","privilegeId":"0","privilegeVersion":"0","Level":"0"},"image":{"displayType":"BadgeDisplayType_Image","image":{"urlList":["https://p16-webcast.tiktokcdn.com/webcast-sg/new_top_gifter_version_2.png~tplv-obj.image","https://p19-webcast.tiktokcdn.com/webcast-sg/new_top_gifter_version_2.png~tplv-obj.image"],"uri":"webcast-sg/new_top_gifter_version_2.png","imageType":31}}},{"displayType":"BadgeDisplayType_Combine","priorityType":"BadgePriorityType_RankList","sceneType":"BadgeSceneType_Ranklist","position":"PositionRight","OpenWebURL":"sslocal://webcast_webview_popup?url=https%3A%2F%2Finapp.tiktokv.com%2Flive%2Fmonetization%2Franking%2Ftopview%2Ffaq-new&web_bg_color=FFFFFF&gravity=bottom&height=60%25&show_mask=1&mask_bg_color=000000b3&radius=8&use_spark=1&rank=1&score=55","display":true,"privilegeLogExtra":{"dataVersion":"0","privilegeId":"0","privilegeVersion":"0","Level":"0"},"combine":{"displayType":"BadgeDisplayType_Combine","icon":{"urlList":["https://p16-webcast.tiktokcdn.com/webcast-sg/new_top_gifter_version_2.png~tplv-obj.image","https://p19-webcast.tiktokcdn.com/webcast-sg/new_top_gifter_version_2.png~tplv-obj.image"],"uri":"webcast-sg/new_top_gifter_version_2.png","imageType":31,"openWebUrl":"sslocal://webcast_webview_popup?url=https%3A%2F%2Finapp.tiktokv.com%2Flive%2Fmonetization%2Franking%2Ftopview%2Ffaq-new&web_bg_color=FFFFFF&gravity=bottom&height=60%25&show_mask=1&mask_bg_color=000000b3&radius=8&use_spark=1&rank=1&score=55"},"text":{"key":"pm_mt_badeg_notes_profile1","defaultPattern":"No. 1"},"background":{"image":{},"backgroundColorCode":"#66FE2C55"},"backgroundDarkMode":{"image":{},"backgroundColorCode":"#66FE2C55"},"publicScreenShowStyle":14,"personalCardShowStyle":15,"ranklistOnlineAudienceShowStyle":14,"multiGuestShowStyle":14}}]},"content":"84 rolls for ยฃ25.99","contentLanguage":"en","userIdentity":{},"commentQualityScores":[{"version":"user_type_rule","score":"100000"},{"version":"community-flagged","score":"7710515"},{"version":"commentator_id","score":"7505343803353400342"},{"version":"default","score":"1755625907020000"},{"version":"default_app","score":"10000"},{"version":"rankV3","score":"1755625910000099"},{"version":"ttp_rule_rerank","score":"1755625916496000"},{"version":"timestamp_desc","score":"98244374093504000"},{"version":"tikcast_community_comment_18866_v7_r655069","score":"1755625916496000"},{"version":"tikcast_community_comment_18866_v7_r655069_desc","score":"1755625916496000"},{"version":"idc_rule_rerank","score":"1755625956496000"},{"version":"v13_r712088","score":"1755625956496000"},{"version":"v12_r702075","score":"1755625956496000"},{"version":"batch_rank_v1","score":"1755625957020000"}],"commentTag":["COMMENT_TAG_NORMAL"],"publicAreaMessageCommon":{"creatorSuccessInfo":{},"portraitInfo":{}},"signature":"766204261f0f5d5efa99b5198394cb34","signatureVersion":"v1"},"msg_id":7540355812308372000},....],"now":1755628212644,"history_comment_cursor":"7540355409489103638"}
Top comments (0)
Subscribe
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Top comments (0)