Russell-Newton / TikTokPy

Extract data from TikTok without needing any login information or API keys.
https://pypi.org/project/tiktokapipy/
MIT License
214 stars 28 forks source link

New "creator" API for user post extraction #62

Open antiops opened 1 year ago

antiops commented 1 year ago

There is a new API that was added that currently doesn't require any signatures to get user posts.

It was recently implemented and tested in the TTUser yt-dlp plugin (Implementation: tt_user.py) with some extra notes available in Issue 1

The bare minimum parameters are:

Examples:

Latest: https://www.tiktok.com/api/creator/item_list/?aid=1988&type=1&count=15&cursor=1689909282235&secUid=MS4wLjABAAAAys5jIEEWJXF-bCt11wTP363Xvnma4SAex4cTxY-EDrUe2CPXUr1rh-tZtqa5Src&verifyFp=verify

Next Page: https://www.tiktok.com/api/creator/item_list/?aid=1988&type=1&count=15&cursor=1677186594000&secUid=MS4wLjABAAAAys5jIEEWJXF-bCt11wTP363Xvnma4SAex4cTxY-EDrUe2CPXUr1rh-tZtqa5Src&verifyFp=verify

Russell-Newton commented 1 year ago

TikTokPy currently uses the /post/item_list/ endpoint, which seems to be incredibly similar to this endpoint, just with the extra need for an X-Bogus parameter (it also lets me grab 30 at a time). I'll keep an eye out to see if the endpoint I'm currently using stops working, but at the moment I'm not sure it's worth switching over.