{"id":13988778,"url":"https://github.com/avilash/TikTokAPI-Python","last_synced_at":"2025-07-22T09:31:29.618Z","repository":{"id":38847237,"uuid":"274794502","full_name":"avilash/TikTokAPI-Python","owner":"avilash","description":"TikTok API Python Wrapper","archived":false,"fork":false,"pushed_at":"2023-04-13T18:17:01.000Z","size":112,"stargazers_count":478,"open_issues_count":60,"forks_count":118,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-06-22T00:42:38.578Z","etag":null,"topics":["musically","tiktok","tiktok-api","tiktok-bot","tiktok-downloader","tiktok-python","tiktok-scraper","tiktok-signature","tiktokapi"],"latest_commit_sha":null,"homepage":"http://avilashkumar.com/TikTokAPI-Python/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/avilash.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-06-25T00:09:06.000Z","updated_at":"2025-06-19T21:58:33.000Z","dependencies_parsed_at":"2023-08-27T13:18:29.636Z","dependency_job_id":null,"html_url":"https://github.com/avilash/TikTokAPI-Python","commit_stats":null,"previous_names":["avilash/tiktokapi"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/avilash/TikTokAPI-Python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avilash%2FTikTokAPI-Python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avilash%2FTikTokAPI-Python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avilash%2FTikTokAPI-Python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avilash%2FTikTokAPI-Python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avilash","download_url":"https://codeload.github.com/avilash/TikTokAPI-Python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avilash%2FTikTokAPI-Python/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266465083,"owners_count":23933059,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["musically","tiktok","tiktok-api","tiktok-bot","tiktok-downloader","tiktok-python","tiktok-scraper","tiktok-signature","tiktokapi"],"created_at":"2024-08-09T13:01:21.296Z","updated_at":"2025-07-22T09:31:29.164Z","avatar_url":"https://github.com/avilash.png","language":"Python","readme":"\n# Unofficial TikTok API Wrapper in Python\n\nThis is an unofficial TikTok Api python wrapper. I have an App using this API, and thus will constantly keep updating this wrapper  \nThis implementation is inspired by [TikTokApi](https://github.com/davidteather/TikTok-Api/), but runs faster.  \n\n\n## Table of Contents\n- [Getting Started](#getting-started)\n    - [Installing](#installing)\n- [Quick Start Guide](#quick-start-guide)\n- [Detailed Documentation](#detailed-documentation)\n    - [Methods](#methods)\n        - [TikTok Class](#tiktok-class)\n        - [Get Trending Videos](#get-trending-videos)\n        - [Get User](#get-user)\n        - [Get Videos By UserName](#get-videos-by-username)\n        - [Get Likes By UserName](#get-likes-by-username)\n        - [Get HashTag](#get-hashtag)\n        - [Get Videos By HashTag](#get-videos-by-hashtag)\n        - [Get Music](#get-music)\n        - [Get Videos By Music](#get-videos-by-music)\n        - [Get Video By Id](#get-video-by-id)\n        - [Download Video](#download-video)\n        - [Download Video no Watermark](#download-video-no-watermark)\n- [Built With](#built-with)\n- [Authors](#authors)\n- [License](#license)\n\n## Getting Started\n\nTo get started using this API, follow the instructions below.\n\n### Installing\nPip\n```\npip install PyTikTokAPI\n```\n\nInstall from source\n```\ngit clone https://github.com/avilash/TikTokAPI-Python.git\npython setup.py install\n```\n\n## Quick Start Guide\nImport\n```\nfrom TikTokAPI import TikTokAPI\n```\nGet your keys from Cookie. You can get them from the Applications tab in Chrome developer console.  \nBy default it used hardcoded values which may not work after some time.  \nThe keys to extract are `s_v_web_id` and `tt_webid`\n```\ncookie = {\n  \"s_v_web_id\": \"\u003cyour_key\u003e\",\n  \"tt_webid\": \"\u003cyour_key\u003e\"\n}\n```\nGet the most trending Videos on TikTok\n```\napi = TikTokAPI(cookie=cookie)\nretval = api.getTrending(count=5)\n```\nGet a user by name\n```\napi = TikTokAPI(cookie=cookie)\nuser_obj = api.getUserByName(\"fcbarcelona\")\n```\nGet videos of a user\n```\napi = TikTokAPI(cookie=cookie)\nuser_videos = api.getVideosByUserName(\"fcbarcelona\")\n```\nGet likes of a user\n```\napi = TikTokAPI(cookie=cookie)\nuser_videos = api.getLikesByUserName(\"fcbarcelona\")\n```\n\n## Detailed Documentation\nThis section contains details about the parameters of each function and what it returns\n\n### Methods\n\n#### Tiktok Class\nInputs\n* language - Self explanatory\n* region - Self explanatory\n* cookie - The TikTok Cookie containing the parameter \u003cem\u003es_v_web_id\u003c/em\u003e. If not provided, the parameter will be generated.\n\n```buildoutcfg\n__init__(self, language='en', region='IN', cookie=None)\n```\n\n#### Get Trending Videos\nInputs\n* count - Number of videos to fetch  \n\n```buildoutcfg\ngetTrending(self, count=30)\n```\n\n#### Get User\nInputs\n* user_name - Username, eg - \u003cem\u003efcbarcelona\u003c/em\u003e\n\n```buildoutcfg\ngetUserByName(self, user_name)\n```\n\n#### Get Videos By Username\nInputs\n* user_name - Username, eg - \u003cem\u003efcbarcelona\u003c/em\u003e\n* count - Number of videos to fetch\n\n```buildoutcfg\ngetVideosByUserName(self, user_name, count=30)\n```\n\n#### Get Likes By Username\nInputs\n* user_name - Username, eg - \u003cem\u003efcbarcelona\u003c/em\u003e\n* count - Number of videos to fetch\n\n```buildoutcfg\ngetLikesByUserName(self, user_name, count=30)\n```\n\n#### Get Hashtag\nInputs\n* hashTag - HashTag, eg - \u003cem\u003e#fcbarcelona\u003c/em\u003e\n\n```buildoutcfg\ngetHashTag(self, hashTag)\n```\n\n#### Get Videos By Hashtag\nInputs\n* hashTag - HashTag, eg - \u003cem\u003e#fcbarcelona\u003c/em\u003e\n* count - Number of videos to fetch\n\n```buildoutcfg\ngetVideosByHashTag(self, hashTag, count=30)\n```\n\n#### Get Music\nInputs\n* music_id - Music Id, eg - \u003cem\u003e6704854531001289474\u003c/em\u003e\n\n```buildoutcfg\ngetMusic(self, music_id)\n```\n\n#### Get Videos By Music\nInputs\n* music_id - Music Id, eg - \u003cem\u003e6704854531001289474\u003c/em\u003e\n* count - Number of videos to fetch\n\n```buildoutcfg\ngetVideosByMusic(self, music_id, count=30)\n```\n\n#### Get Video By Id\nInputs\n* video_id - Video Id, eg - \u003cem\u003e6843481669886954757\u003c/em\u003e\n\n```buildoutcfg\ngetVideoById(self, video_id)\n```\n\n#### Download Video\nInputs\n* video_id - Video Id, eg - \u003cem\u003e6843481669886954757\u003c/em\u003e\n* save_path - Path where the downloaded video should be saved\n\n```buildoutcfg\ndownloadVideoById(self, video_id, save_path)\n```\n\n#### Download Video No Watermark\nInputs\n* video_id - Video Id, eg - \u003cem\u003e6843481669886954757\u003c/em\u003e\n* save_path - Path where the downloaded video should be saved\n\n```buildoutcfg\ndownloadVideoByIdNoWatermark(self, video_id, save_path)\n```\n\n## Built With\n\n* [Python 3.7](https://www.python.org/)\n\n## Authors\n\n* **Avilash Kumar** - [avilash](https://github.com/avilash)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n\n[![Run on Repl.it](https://repl.it/badge/github/avilash/TikTokAPI-Python)](https://repl.it/github/avilash/TikTokAPI-Python)\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favilash%2FTikTokAPI-Python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favilash%2FTikTokAPI-Python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favilash%2FTikTokAPI-Python/lists"}