{ "info": { "author": "David Teather", "author_email": "contact.davidteather@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Topic :: Software Development :: Build Tools" ], "description": "# Unoffical TikTok API in Python\n\nThis is an unoffical api wrapper for tiktok.com in python. With this api you are able to call most trending and fetch specific user information.\n\n [![GitHub release (latest by date)](https://img.shields.io/github/v/release/davidteather/TikTok-Api)](https://github.com/davidteather/TikTok-Api/releases) [![Build Status](https://travis-ci.com/davidteather/TikTok-Api.svg?branch=master)](https://travis-ci.com/davidteather/TikTok-Api) [![GitHub](https://img.shields.io/github/license/davidteather/TikTok-Api)](https://github.com/davidteather/TikTok-Api/blob/master/LICENSE) [![PyPI - Downloads](https://img.shields.io/pypi/dm/TikTokApi)](https://pypi.org/project/TikTokApi/)\n\n## Important Information\n* If this API stops working for any reason open an issue.\n* Feel free to mention @davidteather in an issue you open, because I might not see it otherwise.\n\n## Getting Started\n\nTo get started using this api follow the instructions below.\n\nIt is quite a long installation process just for a TikTok api, the first release can be found [here](https://github.com/davidteather/TikTok-Api/releases/edit/v1.0) and is not as suitable for long term projects, however it may be easier for a day of scraping TikTok, as the installation is much easier.\n\nDespite this, I **still recommend** you follow this process and use the latest version.\n\n### Installing\n\nIf you need help installing or run into some error, please open an issue. I will try to help out as much as I can.\n\nTested with python 3.7.3\n\n```\npip install TikTokApi\n```\n\nOr install directly from this GitHub repo.\n\n* You do need to have **java installed**\n* Download browsermob-proxy [here](https://bmp.lightbody.net/)\n* You must add **browsermob-proxy/bin** to your environment path.\n* **Firefox** must be installed.\n* You must download the latest **geckodriver** from [mozilla](https://github.com/mozilla/geckodriver/releases), and include the .exe in your path.\n\n## Quick Start Guide\n\nHere's a quick bit of code to get the most recent trending on TikTok\n\n```\nfrom tiktok import TikTokapi\n\napi = TikTokapi(path_to_browsermob_directory)\n# path_to_browsermob_directory - String - should be the path from the directory you are running from the code to the extracted zip file of [browsermob-proxy](https://bmp.lightbody.net/)\n# Will Get the 10 most recent trending on the tiktok trending page\napi.trending(10)\n```\n\n## Detailed Documentation\n\n##### The TikTok class\n\n```\n# Variable set like\napi = TikTokapi(path_to_browsermob_directory, headless=False)\n```\npath_to_browsermob_directory - String - should be the path from the directory you are running from the code to the extracted zip file of [browsermob-proxy](https://bmp.lightbody.net/)\nheadless - True/False - True means it will run a headless firefox browser, could be detected by TikTok, however it is more convienent. Default = False.\n\n\n##### The Trending Method\n\n```\n# Where count is how many result you want\n# Verbose is optional, default=0. Set it to 1 to get more information\napi.trending(count, verbose)\n```\n\nTrending returns an array of json objects. Example structure [here](https://gist.github.com/davidteather/0be2e495e2de54098e8f2a9594581d27)\n\nJSON object tree [here](https://gist.github.com/davidteather/bc4baef0edb621dd322c8ad128a31ac1)\n\n##### The userPosts Method\n\n```\n# Where count is how many results you want\n# Verbose is optional, default=0. Set it to 1 to get more information\n# userid is the tiktok userid, can be found through response json tree or in the tiktok url\napi.userPosts(userid, count, verbose)\n```\n\nSince this isn't an offical TikTok API the TikTok servers don't know what to do. This method specifically will throw a lot of errors if you have verbose on. It takes a lot longer than trending, however it will still end up working. Just give it a few minutes.\n\nTrending returns an array of json objects. Example structure [here](https://gist.github.com/davidteather/a5c1e54de353353f77a78139d2e5a9f9)\n\nIt has the same JSON object tree as trending. It's [here](https://gist.github.com/davidteather/bc4baef0edb621dd322c8ad128a31ac1) anyways.\n\n##### The search_by_hashtag Method\n\n```\napi.search_by_hashtag(hashtag, count=10)\n```\n\nhashtag - A string of the hashtag without the # mark. Ex: hashtag = \"funny\"\n\ncount - The number of results you want\n\nSince this isn't an offical TikTok API the TikTok servers don't know what to do with my bad solutions, this takes a bit longer as it needs to find the hashtagID and stuff.\n\nSearch by hashtag returns an array of json objects. Example structure [here](https://gist.github.com/davidteather/a5c1e54de353353f77a78139d2e5a9f9)\n\nIt has the same JSON object tree as trending. It's [here](https://gist.github.com/davidteather/bc4baef0edb621dd322c8ad128a31ac1) anyways.\n\n##### The get_Video_By_Url Method\n\n```\napi.get_Video_By_Url(video_url, return_bytes=0)\n```\n\nvideo_url - The video you want to get url.\n\nreturn_bytes - The default value is 0, when it is set to 1 the function instead returns the bytes from the video rather than just the direct url.\n\n##### The get_trending_hashtags Method\n\n```\napi.get_trending_hashtags()\n```\n\nThis returns the 4 displayed trending hashtags in an array, this does change on every new instance of the api as it changes on page refreshes. \n\n## Built With\n\n* [Python 3.7](https://www.python.org/) - The web framework used\n\n## Authors\n\n* **David Teather** - *Initial work* - [davidteather](https://github.com/davidteather)\n\nSee also the list of [contributors](https://github.com/davidteather/TikTok-Api/contributors) who participated in this project.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://github.com/davidteather/TikTok-Api/tarball/master", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/davidteather/tiktok-api", "keywords": "tiktok,python3,api,unofficial,tiktok-api", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "TikTokApi", "package_url": "https://pypi.org/project/TikTokApi/", "platform": "", "project_url": "https://pypi.org/project/TikTokApi/", "project_urls": { "Download": "https://github.com/davidteather/TikTok-Api/tarball/master", "Homepage": "https://github.com/davidteather/tiktok-api" }, "release_url": "https://pypi.org/project/TikTokApi/2.1.8/", "requires_dist": null, "requires_python": "", "summary": "The Unoffical TikTok API Wrapper in Python 3.", "version": "2.1.8" }, "last_serial": 5992852, "releases": { "2.1.3": [ { "comment_text": "", "digests": { "md5": "7df2f36023b47fb804836869dbaa8053", "sha256": "1c38ec41ecd1ee5915eb8e0a909d806dd55b0064ccd3230a0d171a55b9a45189" }, "downloads": -1, "filename": "TikTokApi-2.1.3.tar.gz", "has_sig": false, "md5_digest": "7df2f36023b47fb804836869dbaa8053", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2404, "upload_time": "2019-09-14T03:22:16", "url": "https://files.pythonhosted.org/packages/53/3d/d4737aebbf610dba16e08d1277469649b2046e35b62f730cbce5c95098f1/TikTokApi-2.1.3.tar.gz" } ], "2.1.4": [ { "comment_text": "", "digests": { "md5": "9de8f31c4eda9d7e7e9770990711534d", "sha256": "7c12b180e170fe59082ac22584678d645e9943ce217ba7a043c595eb76e2409d" }, "downloads": -1, "filename": "TikTokApi-2.1.4.tar.gz", "has_sig": false, "md5_digest": "9de8f31c4eda9d7e7e9770990711534d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2602, "upload_time": "2019-09-14T17:31:17", "url": "https://files.pythonhosted.org/packages/b6/2f/b6536b448299c8c52b05baaa01d749ce58a4e52c003cbb9481dcfa78cc74/TikTokApi-2.1.4.tar.gz" } ], "2.1.4.2": [ { "comment_text": "", "digests": { "md5": "5e8ce2c131f4d01d1f0a14b1164c1df5", "sha256": "6bbce3f9cf11bbf3c76fd728338171b4f19ed6515f212f56fd5057f1e32c55d5" }, "downloads": -1, "filename": "TikTokApi-2.1.4.2.tar.gz", "has_sig": false, "md5_digest": "5e8ce2c131f4d01d1f0a14b1164c1df5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4800, "upload_time": "2019-09-14T17:43:29", "url": "https://files.pythonhosted.org/packages/86/4e/50e38275a0cc6a333f53eb86be17e686c48af3a1838d192d894c4e28762f/TikTokApi-2.1.4.2.tar.gz" } ], "2.1.5": [ { "comment_text": "", "digests": { "md5": "2fe95611a2a6e9ecf4e8310d64844b21", "sha256": "0f43f523b302f09d41bf915abf6add96e51303a11acfbff4e594bf81155599ca" }, "downloads": -1, "filename": "TikTokApi-2.1.5.tar.gz", "has_sig": false, "md5_digest": "2fe95611a2a6e9ecf4e8310d64844b21", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5909, "upload_time": "2019-09-15T00:57:00", "url": "https://files.pythonhosted.org/packages/1b/cc/f4a537c78f0de4f2f27d380213d9dcf0db562e1f11ad8d1b3906fdcc5784/TikTokApi-2.1.5.tar.gz" } ], "2.1.6": [ { "comment_text": "", "digests": { "md5": "c0f79d617dd7861bcb5e079f488bd14d", "sha256": "b0641ad7bc39e40c24f76ba419cbe06abba8cf2a23e17baf7abe4986b54243f9" }, "downloads": -1, "filename": "TikTokApi-2.1.6.tar.gz", "has_sig": false, "md5_digest": "c0f79d617dd7861bcb5e079f488bd14d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7022, "upload_time": "2019-10-05T04:54:38", "url": "https://files.pythonhosted.org/packages/2b/44/d164cac8006e86b55434aa66e6fb5e9833b441c0d49559e158b1c7af2512/TikTokApi-2.1.6.tar.gz" } ], "2.1.7": [ { "comment_text": "", "digests": { "md5": "871efecd8df2266bbe1e76cd2a76c5d8", "sha256": "b5a97c9f4d8ca7b68ea408091f8013cad614ba7d6109baef193d13fbcd8f8cf7" }, "downloads": -1, "filename": "TikTokApi-2.1.7.tar.gz", "has_sig": false, "md5_digest": "871efecd8df2266bbe1e76cd2a76c5d8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7116, "upload_time": "2019-10-06T15:38:28", "url": "https://files.pythonhosted.org/packages/58/3f/e81a0327bcb8bfa499624c766da0e56a4bdb9081cd55d8dc6fb349ac7efd/TikTokApi-2.1.7.tar.gz" } ], "2.1.8": [ { "comment_text": "", "digests": { "md5": "ed6ed601ba73b29eb72c44979a4efa04", "sha256": "8661d43905e7bfab0047ec0f6755672c05a3b47cee420bc21e44f1f7f66f14a1" }, "downloads": -1, "filename": "TikTokApi-2.1.8.tar.gz", "has_sig": false, "md5_digest": "ed6ed601ba73b29eb72c44979a4efa04", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7340, "upload_time": "2019-10-17T23:53:22", "url": "https://files.pythonhosted.org/packages/0e/79/8e9ffc75f5ba9d71c97926159603c6b50112b6600e28bb4dc962cd31e722/TikTokApi-2.1.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ed6ed601ba73b29eb72c44979a4efa04", "sha256": "8661d43905e7bfab0047ec0f6755672c05a3b47cee420bc21e44f1f7f66f14a1" }, "downloads": -1, "filename": "TikTokApi-2.1.8.tar.gz", "has_sig": false, "md5_digest": "ed6ed601ba73b29eb72c44979a4efa04", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7340, "upload_time": "2019-10-17T23:53:22", "url": "https://files.pythonhosted.org/packages/0e/79/8e9ffc75f5ba9d71c97926159603c6b50112b6600e28bb4dc962cd31e722/TikTokApi-2.1.8.tar.gz" } ] }