Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This is an example of a TikTok dictionary returned by davidteather/TikTok-Api
{
'id': '6818316025491246342',
'desc': 'My 2015 moves still play in 2020�😂 #quarantinelife #throwback',
'createTime': 1587512910,
'video': {
'height': 626,
'width': 470,
'duration': 11,
'ratio': '480p
'cover': 'https://p16.muscdn.com/obj/tos-maliva-p-0068/5951967888f341628c687b582f1970ac_1587512912',
'originCover': 'https://p16.muscdn.com/obj/tos-maliva-p-0068/bb62166cb2cd439280b2442610e6e132_1587512911',
'dynamicCover': 'https://p16.muscdn.com/obj/tos-maliva-p-0068/8e1c21cd695f408792967c8e80aa24af_1587512912',
'playAddr': 'https://v19.muscdn.com/8576a746718739ea54cdc70f4ecea640/5eb4ba8d/video/tos/useast2a/tos-useast2a-ve-0068c003/1a30febe68774731ab8fef60dc256e0d/?a=1233&br=1592&bt=796&cr=0&cs=0&dr=0&ds=2&er=&l=202005071948500101890370222F7959A4&lr=tiktok_m&qs=0&rc=anJlcXc1OmtydDMzNjczM0ApaDk6aGVpOmU0Nzg2OjQ5aWdhNHBmLjFzYGNfLS0vMTZzczQvMjRgNjMvLV5eMS8vNjE6Yw%3D%3D&vl=&vr=',
'downloadAddr': 'https://v19.muscdn.com/8576a746718739ea54cdc70f4ecea640/5eb4ba8d/video/tos/useast2a/tos-useast2a-ve-0068c003/1a30febe68774731ab8fef60dc256e0d/?a=1233&br=1592&bt=796&cr=0&cs=0&dr=0&ds=2&er=&l=202005071948500101890370222F7959A4&lr=tiktok_m&qs=0&rc=anJlcXc1OmtydDMzNjczM0ApaDk6aGVpOmU0Nzg2OjQ5aWdhNHBmLjFzYGNfLS0vMTZzczQvMjRgNjMvLV5eMS8vNjE6Yw%3D%3D&vl=&vr='
},
'author': {
'id': '6745191554350760966',
'uniqueId': 'therock',
'nickname': 'The Rock',
'avatarThumb': 'https://p16-va-default.akamaized.net/img/musically-maliva-obj/1647596478025734~c5_100x100.jpeg',
'avatarMedium': 'https://p16-va-default.akamaized.net/img/musically-maliva-obj/1647596478025734~c5_720x720.jpeg',
'avatarLarger': 'https://p16-va-default.akamaized.net/img/musically-maliva-obj/1647596478025734~c5_1080x1080.jpeg',
'signature': 'mana. gratitude. tequila.',
'verified': True,
'secUid': 'MS4wLjABAAAAM3R2BtjzVT-uAtstkl2iugMzC6AtnpkojJbjiOdDDrdsTiTR75-8lyWJCY5VvDrZ',
'relation': 0
},
'music': {
'id': '6800996740322297858',
'title': 'Savage',
'playUrl': 'https://sf16-sg.muscdn.com/obj/tiktok-obj/34615d801bb9a5feafe2005896c083a2.m4a',
'coverThumb': 'https://p16-sg.muscdn.com/aweme/100x100/tos-alisg-i-0000/7430b40854434b41acc0088c0b6d2e2e.jpeg',
'coverMedium': 'https://p16-sg.muscdn.com/aweme/200x200/tos-alisg-i-0000/7430b40854434b41acc0088c0b6d2e2e.jpeg',
'coverLarge': 'https://p16-sg.muscdn.com/aweme/720x720/tos-alisg-i-0000/7430b40854434b41acc0088c0b6d2e2e.jpeg',
'authorName': 'Megan Thee Stallion',
'original': False
},
'challenges': [{
'id': '1659671544096774',
'title': 'quarantinelife',
'desc': ''
}, {
'id': '6047',
'title': 'throwback',
'desc': '',
'profileThumb': 'https://p16-va-default.akamaized.net/obj/musically-maliva-obj/c0bb51a8f2f92179c7cc096ab720af3e',
'profileMedium': 'https://p16-va-default.akamaized.net/obj/musically-maliva-obj/c0bb51a8f2f92179c7cc096ab720af3e',
'profileLarger': 'https://p16-va-default.akamaized.net/obj/musically-maliva-obj/c0bb51a8f2f92179c7cc096ab720af3e'
}],
'stats': {
'diggCount': 3773532,
'shareCount': 33456,
'commentCount': 20166,
'playCount': 37825357
},
'originalItem': False,
'officalItem': False,
'textExtra': [{
'awemeId': '',
'start': 35,
'end': 50,
'hashtagName': 'quarantinelife',
'hashtagId': '',
'type': 1,
'userId': '',
'isCommerce': False
}, {
'awemeId': '',
'start': 51,
'end': 61,
'hashtagName': 'throwback',
'hashtagId': '',
'type': 1,
'userId': '',
'isCommerce': False
}],
'secret': False,
'forFriend': False,
'digged': False,
'itemCommentStatus': 0,
'showNotPass': False,
'vl1': False
}
@jdhask
Copy link

jdhask commented Dec 14, 2020

I'm wondering if we know the units for any of the time variables? I'm hoping there's an easy way to grab a timestamp as part of the returned dict values?

Loading

@mhabra
Copy link

mhabra commented Dec 28, 2020

I'm wondering if we know the units for any of the time variables? I'm hoping there's an easy way to grab a timestamp as part of the returned dict values?

It's in seconds. Specifically the createTime is in the Unix Timestamp. There are many converters between Unix time and our time.

Loading

@DevTobsterr
Copy link

DevTobsterr commented Jan 25, 2021

How do you use the def functions in python? I might be missing something here. Calling them dosent do anything. Thanks

Loading

@swimmwatch
Copy link

swimmwatch commented May 4, 2021

Hi! What is secUid? Where i can get it?

Loading

@Starguy-18
Copy link

Starguy-18 commented Sep 9, 2021

Is it possible to also get comment information? I know that's a lot of data, but there might be a way to compress the comments

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment