TikTok API
Our TikTok API gives you programmatic access to TikTok data that isn't available through any official API. Get data on hashtags, profiles, video URLs, shares, followers, hearts, video metadata, music data, and more. And the best part? You can try the TikTok API entirely for free, no credit card required..

Trusted by industry leaders all over the world
Integrate our TikTok API
Access the TikTok API using Python, JavaScript, CLI, cURL, OpenAPI, or MCP. Choose your preferred option and start extracting TikTok data in minutes.
Python
JavaScript
HTTP
MCP
1from apify_client import ApifyClient2
3# Initialize the ApifyClient with your Apify API token4# Replace '<YOUR_API_TOKEN>' with your token.5client = ApifyClient("<YOUR_API_TOKEN>")6
7# Prepare the Actor input8run_input = {9 "hashtags": ["fyp"],10 "resultsPerPage": 100,11 "proxyCountryCode": "None",12}13
14# Run the Actor and wait for it to finish15run = client.actor("clockworks/tiktok-scraper").call(run_input=run_input)16
17# Fetch and print Actor results from the run's dataset (if there are any)18print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])19for item in client.dataset(run["defaultDatasetId"]).iterate_items():20 print(item)21
22# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start
Get data with TikTok API
Extract TikTok data by providing hashtags, profile URLs, or specific video URLs as inputs. The TikTok Scraper returns structured JSON data with author metadata, video statistics, play counts, share counts, comment counts, music information, and timestamps.
Input
{ "hashtags": [ "bananas" ], "resultsPerPage": 100, "proxyCountryCode": "None", "shouldDownloadCovers": false, "shouldDownloadVideos": false, "shouldDownloadSubtitles": false, "shouldDownloadSlideshowImages": false}
Output
{ "text": "banana bananana funny cartoon 😂#foryou #foryoupage #funny #memes #funnynimations #viraltiktok #fyp #bts #Love #trend@TikTok @TikTok Bangladesh @funny animation @funny animation @funny animation ", "diggCount": 18400, "playCount": 722300, "shareCount": 1902, "webVideoUrl": "<https://www.tiktok.com/@funnyanimation242/video/7298624334447299858>", "collectCount": 1912, "commentCount": 257, "createTimeISO": "2023-11-07T07:50:05.000Z", "authorMeta.name": "funnyanimation242", "authorMeta.avatar": "<https://p16-sign-sg.tiktokcdn.com/aweme/720x720/tos-alisg-avt-0068/d0d51b24a15a39a40c5334139188a78a.jpeg?lk3s=a5d48078&nonce=45592&refresh_token=f827e0f5cd7a48c58837494cf2683cab&x-expires=1722942000&x-signature=alkielqA31AuKYfP%2BlVum5%2BoeAc%3D&shp=a5d48078&shcp=b59d6b55>", "videoMeta.duration": 17, "musicMeta.musicName": "original sound", "musicMeta.musicAuthor": "funny animation", "musicMeta.musicOriginal": true}
Sign up for Apify account01
Creating an account is quick and free — no credit card required. Your account gives you access to more than 5,000 scrapers and APIs.
Get your Apify API token02
Go to settings in the Apify console and navigate to the “API & Integrations” tab. There, create a new token and save it for later.
Integrate TikTok API03
Navigate to the TikTok API page and click on the API dropdown menu in the top right corner. In the dropdown menu, you can see API clients, API endpoints, and more.
Get your TikTok data via API04
Now, you can use the API and get the data you need from TikTok.

Why use Apify?
Never get blocked
Every plan (free included) comes with Apify Proxy, which is great for avoiding blocking and giving you access to geo-specific content.
Customers love us
We truly care about the satisfaction of our users and thanks to that we're one of the best-rated data extraction platforms on both G2 and Capterra.
Monitor your runs
With our latest monitoring features, you always have immediate access to valuable insights on the status of your web scraping tasks.
Export to various formats
Your datasets can be exported to any format that suits your data workflow, including Excel, CSV, JSON, XML, HTML table, JSONL, and RSS.
Integrate Apify to your workflow
You can integrate your Apify runs with platforms such as Zapier, Make, Keboola, Google Drive, or GitHub. Connect with practically any cloud service or web app.
Large developer community
Apify is built by developers, so you'll be in good hands if you have any technical questions. Our Discord server is always here to help!
Get AI-ready TikTok data via API
Connect to hundreds of apps right away using ready-made integrations, or set up your own with webhooks and our API.
TikTok does not provide an official public API for scraping video content, profiles, and hashtag data at scale. However, our TikTok Scraper serves as a powerful unofficial TikTok API that extracts publicly available data from the platform, giving you access to comprehensive TikTok data for your projects and business needs.
Yes! You can try our TikTok Scraper for free. Apify offers free tier usage with $5 in platform credits for new users. The scraper uses pay-per-event pricing: $0.03 per actor start, $0.004 per dataset item, with optional add-ons like video downloads for $0.001 each.
You can extract comprehensive TikTok data including author avatars and usernames, video text and descriptions, engagement metrics (likes, shares, comments, play counts), video duration and timestamps, music metadata (name, author, original status), profile information (followers, bio, verification status), hashtag performance data, and video URLs for download.
Yes, it is legal to scrape publicly available TikTok data. Our TikTok scrapers are ethical and do not extract private user data such as email addresses, gender, or location. They only collect information that users have chosen to share publicly. However, you should ensure you have legitimate reasons for data collection and comply with GDPR and other applicable privacy regulations.
Getting started is simple: 1) Create a free Apify account, 2) Open the TikTok Scraper actor, 3) Add hashtags, profile URLs, or video URLs you want to scrape, 4) Configure your settings like results per page (up to 100), 5) Click "Start" and wait for extraction to complete, 6) Download your data in JSON, CSV, Excel, XML, or HTML format.