# TikTok Profile Scraper - Followers, Bio, Stats & Videos (`socialscrapers/tiktok-profile-scraper`) Actor

TikTok profile scraper: get any public TikTok profile's followers, following, total likes, video count, bio, bio link and verified badge, plus its latest videos with views, likes, shares and saves. No login, no cookies. JSON, CSV, Excel. $0.10 per 1,000 profiles, $0.28 per 1,000 videos.

- **URL**: https://apify.com/socialscrapers/tiktok-profile-scraper.md
- **Developed by:** [Social Scrapers](https://apify.com/socialscrapers) (community)
- **Categories:** Social media, Lead generation, Marketing
- **Features:** Limited permissions
- **Stats:** 13 total users, 4 monthly users, 99.8% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.22 / 1,000 videos

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

**TikTok Profile Scraper** gets public TikTok profiles without logging in: each account's **followers, following, total likes, number of videos, bio, bio link, verified badge and avatar**, followed by its **latest videos** with their views, likes, shares, saves and comment counts. Paste usernames or profile links and download the results as JSON, CSV or Excel. No TikTok account, no cookies, no API key. Profiles cost **$0.10 per 1,000** and videos **$0.28 per 1,000**.

> 💡 **Need a feature that isn't here? Just ask.** Open an issue on the **Issues** tab and tell us what you need: a new field, filter, input type or output format. We build requested features fast, usually within 24 hours, at no extra cost.

> ⭐ **Found it useful?** A short review on the **Reviews** tab helps other people find this scraper, and tells us what to build next.

### What does TikTok Profile Scraper do?

TikTok Profile Scraper opens each profile the way a visitor who is not logged in sees it and saves what it shows. You can:

- 👤 **Scrape TikTok profiles in bulk**: as many usernames or profile URLs as you like, in one run.
- 📊 **Get exact profile stats**: followers, following, total likes and number of videos, as exact numbers, not "2.2M".
- 🎬 **Get each profile's latest videos**: views, likes, comments, shares, saves, caption, hashtags, music and duration, newest first. Pick how many, or `0` for every video the profile shows.
- ⚡ **Profile details only**: switch on **Profile details only** to check thousands of accounts quickly, without their videos.
- 📅 **Only new videos**: keep videos newer than a date or an age such as `7 days`, and schedule the run.
- 💬 **Comments too, if you want them**: switch on comments and replies for each video.
- 💸 **Pay only for results**: profiles that do not exist cost nothing, and private profiles give their details but no videos.

Everything the Apify platform offers comes with it: the API, scheduled runs, webhooks, integrations with Make, Zapier, n8n and Google Sheets, and datasets you can download in any format.

### What data can you extract from TikTok profiles?

| Profile field | What it is |
|---|---|
| `username`, `nickname`, `url` | The handle, display name and profile link |
| `followers`, `following`, `likes`, `videos`, `friends` | Exact counts |
| `bio`, `bioLink` | The bio text and the link in it |
| `verified`, `isPrivate` | Verified badge, private account |
| `avatarUrl` | Profile picture |
| `isOrganization`, `isBusiness`, `isSeller` | Account type, as TikTok shows it |
| `id`, `secUid`, `language`, `region` | TikTok's account ids and settings |

Each video comes with `url`, `text` (caption), `createTimeISO`, `playCount`, `diggCount` (likes), `commentCount`, `shareCount`, `collectCount` (saves), `duration`, `hashtags`, `mentions`, `music`, `coverUrl`, `playUrl`, `downloadUrl`, `subtitles`, `isPinned`, `isSlideshow` and `images` for photo posts, and its `author` with the creator's counts.

The **Profiles** view of the dataset shows one row per profile; the **Videos** view shows the videos.

### How to scrape TikTok profiles

1. Click **Try for free** to open TikTok Profile Scraper.
2. Add usernames (`nasa`, `@nasa`) or profile URLs (`https://www.tiktok.com/@nasa`) to **Profiles**, one per line.
3. Set **Videos per profile**, or switch on **Profile details only**.
4. Click **Start**. Profiles and videos appear in the dataset as they are read.
5. Download them as CSV, Excel, JSON or HTML, or read them through the API.

### How much does it cost to scrape TikTok profiles?

You pay for what is saved, with platform usage and proxies included: **$0.10 per 1,000 profiles** and **$0.28 per 1,000 videos**, plus **$0.28 per 1,000 comments** when you ask for comments.

| Your Apify plan | Per 1,000 profiles | Per 1,000 videos | Per 1,000 comments |
| --- | --- | --- | --- |
| Free and Starter (Bronze) | **$0.10** | **$0.28** | **$0.28** |
| Scale (Silver) | $0.09 (−10%) | $0.252 | $0.252 |
| Business (Gold), Platinum, Diamond | $0.08 (−20%) | $0.224 | $0.224 |

Each run also carries Apify's standard start charge of $0.0005, one per GB of memory (one at the default 512 MB).

Examples:

- **1,000 profiles, details only**: **$0.10**.
- **100 profiles with their latest 30 videos each**: 100 profiles + 3,000 videos = $0.01 + $0.84 = **$0.85**.
- **One creator's last 500 videos**: **$0.14** (+ $0.0001 for the profile).

Profiles that do not exist cost nothing. Apify's free plan comes with $5 of platform credit every month, enough for about 50,000 profiles or about 17,000 videos. To cap a run's cost, set **Maximum cost per run** in the run options: the scraper stops cleanly before the first result that would go over it and keeps everything saved so far.

### Input example

```json
{
  "profiles": ["nasa", "@natgeo", "https://www.tiktok.com/@cbsnews"],
  "maxVideosPerProfile": 30,
  "onlyPostsNewerThan": "30 days"
}
```

| Field | Type | Description |
|---|---|---|
| `profiles` | array of strings, required | Usernames, `@usernames`, profile URLs or short share links from the app. Duplicates are read once. |
| `maxVideosPerProfile` | integer, default `20` | Latest videos per profile, newest first. `0` = every video the profile shows. |
| `profileDetailsOnly` | boolean, default `false` | Save only the profile details, no videos. |
| `onlyPostsNewerThan` | string, optional | Skip older videos: a date (`2026-01-31`, `31/01/2026`, `Jan 31 2026`) or an age (`7 days`, `2w`, `3 months`). |
| `includeComments` | boolean, default `false` | Also save each video's comments. |
| `maxCommentsPerVideo` | integer, default `100` | Top-level comments per video. `0` = all TikTok shows. |
| `includeReplies` | boolean, default `false` | Also save the replies to each comment. |
| `maxRepliesPerComment` | integer, default `20` | Replies per comment. `0` = all TikTok shows. |
| `proxyConfiguration` | object | Apify Proxy in the United States by default. TikTok shows each country its own version of the site, so pick another country for another region. Your own proxy URLs are used as given. |

### Output example

Each item has a `dataType`: `profile`, `video` or `comment`. A value TikTok does not show is `null`.

A profile (from a test run on 12 November 2026):

```json
{
  "dataType": "profile",
  "id": "7664638705177150477",
  "secUid": "MS4wLjABAAAAU9BRVzC8oCaegVnia8IbqWhPb_-dbU7s00Y3wS1_Nx8g5RUaYvyXrpejgjdxTwd6",
  "username": "nasa",
  "nickname": "NASA",
  "url": "https://www.tiktok.com/@nasa",
  "bio": "Making the seemingly impossible, possible.✨",
  "bioLink": "science.nasa.gov/feature/artemis-ii-preliminary-lunar-science-report",
  "verified": true,
  "isPrivate": false,
  "avatarUrl": "https://p19-common-sign.tiktokcdn-us.com/...",
  "followers": 2176683,
  "following": 23,
  "likes": 11669352,
  "videos": 65,
  "friends": 17,
  "language": "en",
  "region": null,
  "isOrganization": true,
  "isSeller": false,
  "isBusiness": false,
  "input": "nasa",
  "scrapedAt": "2026-11-12T22:25:11.134Z"
}
```

Its newest video (long media links shortened, some fields left out):

```json
{
  "dataType": "video",
  "id": "7706264639297850637",
  "url": "https://www.tiktok.com/@nasa/video/7706264639297850637",
  "text": "This is what American ambition looks like. 🇺🇸🚀",
  "textLanguage": "en",
  "createTimeISO": "2026-11-09T20:03:07.000Z",
  "playCount": 83000,
  "diggCount": 9467,
  "shareCount": 407,
  "commentCount": 234,
  "collectCount": 982,
  "duration": 86,
  "isPinned": false,
  "isSlideshow": false,
  "coverUrl": "https://p19-common-sign.tiktokcdn-us.com/...",
  "downloadUrl": "https://v16-webapp-prime.us.tiktok.com/video/...",
  "subtitles": [{ "language": "eng-US", "format": "webvtt", "url": "https://v16m-webapp.tiktokcdn-us.com/...", "isAutoGenerated": true }],
  "music": { "id": "7706264754948098830", "title": "original sound - NASA", "authorName": "NASA", "isOriginal": false, "duration": 86 },
  "author": { "username": "nasa", "nickname": "NASA", "verified": true, "followers": 2200000, "likes": 11700000, "videos": 65 },
  "source": "profile",
  "sourceInput": "nasa"
}
```

Every item of a type has the same fields in the same order, so CSV and Excel exports line up.

### Use cases

- **Influencer vetting**: check a creator's followers, likes and how their recent videos perform before you reach out.
- **Lead lists**: collect bios, bio links and account types of the creators and brands in your niche.
- **Competitor tracking**: follow what competing brands post and how each video does, with a scheduled run and a date filter.
- **Account monitoring**: record follower and like counts of a list of accounts every day or week.
- **Research and AI datasets**: profiles with their captions and stats, ready for analysis, training or retrieval.

### Use it via API, Python, JavaScript and integrations

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("socialscrapers/tiktok-profile-scraper").call(
    run_input={"profiles": ["nasa", "natgeo"], "maxVideosPerProfile": 20}
)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    if item["dataType"] == "profile":
        print(item["username"], item["followers"], item["likes"])
```

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('socialscrapers/tiktok-profile-scraper').call({ profiles: ['nasa'], profileDetailsOnly: true });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

You can also schedule runs, get a webhook when a run finishes, send results to Google Sheets, Slack or a database with [Apify integrations](https://docs.apify.com/integrations), connect it to Make, Zapier or n8n, or let AI agents run it through the [Apify MCP server](https://docs.apify.com/mcp).

### Limits

- **Public profiles only.** The scraper never logs in. Private accounts give their profile details but no videos; accounts that do not exist or are banned are skipped and cost nothing.
- **The videos a profile shows**: some accounts show visitors fewer videos than their total count.
- **Media links expire** after some hours: download covers and video files soon after the run.
- **Numbers**: profile items carry exact counts; the creator's counts inside video items are TikTok's rounded ones.
- Not included: follower and following lists, stories, live streams and reposts.
- **Time limit**: if the run's timeout comes first, the scraper stops a little before it, keeps everything saved so far and the run still succeeds, with a status message saying so.
- **A run with 0 results still succeeds, and no results are charged.** When a profile does not exist, the run ends as Succeeded with a status message naming it. When no entry is usable at all, the run ends as Succeeded at once, with a status message that starts "Nothing to scrape:", says how to fix the input and ends "No results were charged."

### FAQ

**Do I need a TikTok account or cookies?**
No. Add usernames or profile links and start the run. The scraper never logs in.

**How do I get only the profile stats?**
Switch on **Profile details only**. You pay $0.10 per 1,000 profiles and no videos are read.

**How do I get every video of a profile?**
Set **Videos per profile** to `0`. You get every video the profile shows to a visitor.

**Is it legal to scrape TikTok profiles?**
The scraper collects only public data that anyone can see without logging in. Profiles can contain personal data, which laws such as the GDPR protect: collect only what you need, have a legitimate reason for it, and follow TikTok's terms and the laws that apply to you.

**Why are some fields null?**
TikTok does not show every field for every account or video (for example, a bio link or a location). A missing value is `null`, so every row keeps the same columns.

### Other scrapers by Social Scrapers

| Scraper | What it gets |
| --- | --- |
| [TikTok API](https://apify.com/socialscrapers/tiktok-api) | Profiles, Videos and Comments |
| [TikTok Comments Scraper](https://apify.com/socialscrapers/tiktok-comments-scraper) | Comments, Replies and Likes |
| [TikTok Hashtag Scraper](https://apify.com/socialscrapers/tiktok-hashtag-scraper) | Top Videos, Views and Likes |
| [TikTok Scraper](https://apify.com/socialscrapers/tiktok-scraper) | Videos, Profiles, Hashtags and Comments |
| [TikTok Sound Scraper](https://apify.com/socialscrapers/tiktok-sound-scraper) | Videos Using a Sound and Music Info |
| [TikTok Video Scraper](https://apify.com/socialscrapers/tiktok-video-scraper) | Views, Likes, Captions and Comments |
| [Instagram API](https://apify.com/socialscrapers/instagram-api) | Profiles, Posts, Reels, Comments and Hashtags |
| [Instagram Comments Scraper](https://apify.com/socialscrapers/instagram-comments-scraper) | Comments, Likes and Reply Counts |
| [Instagram Hashtag Scraper](https://apify.com/socialscrapers/instagram-hashtag-scraper) | Reels and Keyword Search |
| [Instagram Post Details Scraper](https://apify.com/socialscrapers/instagram-post-details-scraper) | Likes, Comments, Views and Media |
| [Instagram Post Scraper](https://apify.com/socialscrapers/instagram-post-scraper) | Posts, Reels and Comments |
| [Instagram Profile Scraper](https://apify.com/socialscrapers/instagram-profile-scraper) | Followers, Bio, Posts and Reels |
| [Instagram Reels Scraper](https://apify.com/socialscrapers/instagram-reels-scraper) | Reels, Plays, Likes and Comments |
| [Instagram Reels Transcript Scraper](https://apify.com/socialscrapers/instagram-reels-transcript-scraper) | Speech to Text and Captions |
| [Instagram Scraper](https://apify.com/socialscrapers/instagram-scraper) | Posts, Profiles, Reels, Comments and Hashtags |
| [YouTube API](https://apify.com/socialscrapers/youtube-api) | Videos, Transcripts, Search, Channels and Comments |
| [YouTube Channel Scraper](https://apify.com/socialscrapers/youtube-channel-scraper) | Videos, Shorts, Subscribers and About |
| [YouTube Comments Scraper](https://apify.com/socialscrapers/youtube-comments-scraper) | Comments, Replies and Likes |
| [YouTube Scraper](https://apify.com/socialscrapers/youtube-scraper) | Videos, Shorts, Channels and Comments |
| [YouTube Search Scraper](https://apify.com/socialscrapers/youtube-search-scraper) | Videos, Channels, Views and Filters |
| [YouTube Shorts Scraper](https://apify.com/socialscrapers/youtube-shorts-scraper) | Shorts, Views, Likes and Search |
| [YouTube Transcript Scraper](https://apify.com/socialscrapers/youtube-transcript-scraper) | Subtitles, Captions and SRT |
| [YouTube Video Details Scraper](https://apify.com/socialscrapers/youtube-video-details-scraper) | Stats, Subtitles and Comments |
| [Facebook Ads Library Scraper](https://apify.com/socialscrapers/facebook-ads-library-scraper) | Meta Ad Library and Spend |
| [Facebook Comments Scraper](https://apify.com/socialscrapers/facebook-comments-scraper) | Posts, Reels, Videos and Replies |
| [Facebook Groups Scraper](https://apify.com/socialscrapers/facebook-groups-scraper) | Public Group Posts and Reactions |
| [Facebook Marketplace Scraper](https://apify.com/socialscrapers/facebook-marketplace-scraper) | Prices, Locations and Sellers |
| [Facebook Page Contact Info Scraper](https://apify.com/socialscrapers/facebook-page-contact-scraper) | Email, Phone and WhatsApp |
| [Facebook Posts Scraper](https://apify.com/socialscrapers/facebook-profile-posts-scraper) | Pages, Profiles and Timelines |
| [Facebook Pages Scraper](https://apify.com/socialscrapers/facebook-profile-scraper) | Profiles, Contact Info and Reviews |
| [Facebook Reels Scraper](https://apify.com/socialscrapers/facebook-reels-scraper) | Reels, Videos, Plays and Captions |
| [X (Twitter) Profile Scraper](https://apify.com/socialscrapers/x-profile-scraper) | Followers, Bio and Tweets |
| [X (Twitter) Tweet Scraper](https://apify.com/socialscrapers/x-tweet-scraper) | Latest Posts by Profile |
| [Threads Profile Scraper](https://apify.com/socialscrapers/threads-profile-scraper) | Followers, Bio, Links and Posts |
| [Threads Replies Scraper](https://apify.com/socialscrapers/threads-replies-scraper) | Comments, Authors, Likes and Media |
| [Threads Scraper](https://apify.com/socialscrapers/threads-scraper) | Posts, Profiles, Replies and Search |
| [Threads Search Scraper](https://apify.com/socialscrapers/threads-search-scraper) | Keywords, Hashtags, Top and Recent Posts |
| [Reddit Comments Scraper](https://apify.com/socialscrapers/reddit-comments-scraper) | Threads, Replies, Votes and Authors |
| [Reddit Scraper](https://apify.com/socialscrapers/reddit-scraper) | Posts, Comments, Subreddits, Users and Search |
| [Reddit Search Scraper](https://apify.com/socialscrapers/reddit-search-scraper) | Posts by Keyword, Subreddit and Date |
| [Reddit User Scraper](https://apify.com/socialscrapers/reddit-user-scraper) | Profiles, Karma, Posts and Comments |
| [Subreddit Scraper](https://apify.com/socialscrapers/subreddit-scraper) | Hot, New and Top Posts with Comments |
| [Quora Scraper](https://apify.com/socialscrapers/quora-scraper) | Answers, Questions, Profiles and Topic Search |
| [LinkedIn Ad Library Scraper](https://apify.com/socialscrapers/linkedin-ad-library-scraper) | Ads, Advertisers and Impressions |
| [LinkedIn Job Search Scraper](https://apify.com/socialscrapers/linkedin-job-search-scraper) | Filters, Salaries and New Jobs |
| [LinkedIn Jobs Scraper](https://apify.com/socialscrapers/linkedin-jobs-scraper) | Job Listings, Salaries and Companies |
| [Google Maps Email Extractor](https://apify.com/socialscrapers/google-maps-email-extractor) | Emails, Phones and Social Links |
| [Google Maps Scraper](https://apify.com/socialscrapers/google-maps-scraper) | Places, Phones, Websites, Ratings and Hours |
| [Google News Scraper](https://apify.com/socialscrapers/google-news-scraper) | Headlines, Articles and Search |
| [Google Ads Transparency Scraper](https://apify.com/socialscrapers/google-ads-transparency-scraper) | Ad Creatives and Advertisers |
| [Amazon Product Scraper](https://apify.com/socialscrapers/amazon-product-scraper) | Search Results, Prices, Ratings, ASINs |
| [Indeed Jobs Scraper](https://apify.com/socialscrapers/indeed-jobs-scraper) | Salaries, Full Descriptions, Company Data |
| [Contact Details Scraper](https://apify.com/socialscrapers/contact-details-scraper) | Emails, Phones and Social Links |
| [Telegram Channel Scraper](https://apify.com/socialscrapers/telegram-channel-scraper) | Posts, Views and Media |
| [Doximity Scraper](https://apify.com/socialscrapers/doximity-physician-scraper) | Physician Profiles and Doctor Directory |
| [KevinMD Scraper](https://apify.com/socialscrapers/kevinmd-articles-scraper) | Physician Articles and Author Specialties |
| [Op-Med Scraper](https://apify.com/socialscrapers/opmed-articles-scraper) | Physician Essays and Doctor Profiles |
| [Career Site Jobs Scraper](https://apify.com/socialscrapers/career-site-jobs-scraper) | Greenhouse, Lever, Ashby and Workday |
| [Google Trends Scraper](https://apify.com/socialscrapers/google-trends-scraper) | Interest Over Time, Regions and Queries |

# Actor input Schema

## `profiles` (type: `array`):

TikTok usernames (<code>nasa</code> or <code>@nasa</code>) or profile URLs (<code>https://www.tiktok.com/@nasa</code>), one per line. Short share links from the app (<code>https://vm.tiktok.com/…</code>) work too, and several profiles in one entry (<code>nasa, natgeo</code>) are read one by one. Profiles that do not exist are skipped and never charged; private profiles give their details but no videos.

## `maxVideosPerProfile` (type: `integer`):

How many of each profile's latest videos to save, newest first. Set <code>0</code> for every video the profile shows. Example: <code>50</code>.

## `profileDetailsOnly` (type: `boolean`):

Save only each profile's details (followers, following, likes, videos count, bio), no videos: the quickest way to check many accounts.

## `onlyPostsNewerThan` (type: `string`):

Leave out videos posted before this. Pick a date or an age, or type one: a date (<code>2026-01-31</code>, <code>31/01/2026</code>, <code>Jan 31 2026</code>; a UTC day), an ISO date-time through the API (<code>2026-01-31T18:00:00Z</code>), or an age such as <code>7 days</code>, <code>2w</code>, <code>3 months</code> or <code>yesterday</code>. Each profile stops reading as soon as it passes the date. Leave empty for no limit.

## `includeComments` (type: `boolean`):

Save each video's comments as separate items: text, likes, reply count, date, author, and whether the creator liked or pinned it.

## `maxCommentsPerVideo` (type: `integer`):

How many top-level comments to save for each video. Set <code>0</code> for every comment TikTok shows. Example: <code>500</code>.

## `includeReplies` (type: `boolean`):

Also save the replies to each comment, right after it, with <code>parentId</code> set to the comment they answer.

## `maxRepliesPerComment` (type: `integer`):

How many replies to save under each comment. Set <code>0</code> for every reply TikTok shows.

## `includeProfileInfo` (type: `boolean`):

Always on in this scraper: one profile item per profile.

## `proxyConfiguration` (type: `object`):

The scraper picks Apify Proxy's tier itself: datacenter first, residential only when TikTok refuses a request. Any Apify Proxy choice (RESIDENTIAL included) works this way, in the country you pick (the United States by default; TikTok shows each country its own version of the site). Your own proxy URLs are used exactly as given. Without a proxy, requests leave from the server's own country, and TikTok blocks some countries.

## Actor input object example

```json
{
  "profiles": [
    "nasa"
  ],
  "maxVideosPerProfile": 10,
  "profileDetailsOnly": false,
  "includeComments": false,
  "maxCommentsPerVideo": 100,
  "includeReplies": false,
  "maxRepliesPerComment": 20,
  "includeProfileInfo": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "profiles": [
        "nasa"
    ],
    "maxVideosPerProfile": 10,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("socialscrapers/tiktok-profile-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "profiles": ["nasa"],
    "maxVideosPerProfile": 10,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("socialscrapers/tiktok-profile-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "profiles": [
    "nasa"
  ],
  "maxVideosPerProfile": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyCountry": "US"
  }
}' |
apify call socialscrapers/tiktok-profile-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,socialscrapers/tiktok-profile-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/F4iow3UWbJtUJblwE/builds/KnCfUc8IDaa2GP4fV/openapi.json
