# TikTok Scraper API: Videos, Profiles, Hashtags & Search (`sauliusautomatesit/tiktok-scraper-api`) Actor

TikTok scraper API for profiles, keyword and hashtag searches and video links: exact views, likes, comments, shares and saves, author followers, music, hashtags, caption links and post date. Profile details mode for influencer lists. $2 per 1,000 videos.

- **URL**: https://apify.com/sauliusautomatesit/tiktok-scraper-api.md
- **Developed by:** [Saulius AutomatesIT](https://apify.com/sauliusautomatesit) (community)
- **Categories:** Social media, Videos, AI
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.70 / 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 Scraper API: Videos, Profiles, Hashtags & Search

Scrape TikTok like an API. Give it **profiles** (`nasa`, `@espn`, profile links), **search queries and hashtags**
(`dentist tips`, `#booktok`) or **video links**, and get one row per video with exact views, likes, comments, shares
and saves, the caption, hashtags, mentions, post date, author and follower count, sound, duration, cover and caption
(subtitle) links. Switch on profile details to get one row per profile instead: followers, following, total likes,
video count, bio, bio link and verified badge, for influencer lists.

No TikTok account, no login, no cookies to paste.

### Price

| What | Price |
|---|---|
| Video or photo post (every field below) | **$2 per 1,000 videos** |
| Profile row (profile details mode) | **$2 per 1,000 profiles** |
| Actor start | $0.00005 |

Videos skipped by the date filter are free, and so are error rows (deleted video, private profile, no results).
Hashtags, music, author stats and caption links are included at no extra charge. Store discounts apply on higher
Apify plans.

### What you get

- **Counts, exact:** views (`playCount`), likes (`diggCount`), comments, shares, saves (`collectCount`) and reposts.
  TikTok shows rounded numbers (1.6M); this Actor returns the exact figure when TikTok has it.
- **Post:** caption text and language, post date, video link, hashtags, mentions, ad and AI generated labels, photo
  post (slideshow) flag and image count, location tag.
- **Author:** username, display name, verified, private, bio, avatar, followers, following, total likes, video count.
- **Sound:** name, artist, album, original sound flag, audio link.
- **Video:** duration, width, height, definition, cover image, play link, and links to TikTok's caption files
  (`videoMeta.subtitleLinks`, auto captions included) for transcripts.
- **Input:** which profile, search or link produced the row.

Field names follow the most used TikTok scraper on the Store (`authorMeta`, `musicMeta`, `videoMeta`, `diggCount`,
`webVideoUrl`), so existing pipelines switch without remapping.

### Input example

```json
{
  "profiles": ["nasa", "https://www.tiktok.com/@espn"],
  "resultsPerProfile": 100,
  "searchQueries": ["dentist tips", "#booktok"],
  "resultsPerSearch": 50,
  "videoUrls": ["https://www.tiktok.com/@nasa/video/7665075736742530317"],
  "newerThan": "30 days"
}
```

- `profiles`: usernames or links. Videos come newest first, pinned videos first.
- `searchQueries`: keywords or `#hashtags`, in TikTok search order. `resultsPerSearch` is at least 10.
- `videoUrls`: full links, `vm.tiktok.com` short links or bare video IDs. Good for tracking the counts of
  campaign posts every day.
- `profileDetailsOnly`: one row per profile instead of its videos.
- `newerThan`: a date (`2026-09-01`) or a period (`7 days`, `4 weeks`, `3 months`).
- `maxItems`: stop after this many charged rows in total.

### Output example

```json
{
  "type": "video",
  "id": "7694283957839400206",
  "webVideoUrl": "https://www.tiktok.com/@nasa/video/7694283957839400206",
  "text": "A LOT of Artemis II data just dropped! 814GB of observations. 996 new images. 521min of never-before-released crew audio.",
  "createTimeISO": "2026-10-08T13:12:22.000Z",
  "playCount": 118100,
  "diggCount": 20300,
  "commentCount": 266,
  "shareCount": 735,
  "collectCount": 1585,
  "hashtags": [],
  "authorMeta": { "name": "nasa", "nickName": "NASA", "verified": true, "fans": 2000000, "heart": 10600000, "video": 54 },
  "musicMeta": { "musicName": "original sound - NASA", "musicAuthor": "NASA", "musicOriginal": false },
  "videoMeta": { "duration": 89, "width": 576, "height": 1024, "coverUrl": "https://p16-common-sign.tiktokcdn-us.com/...", "subtitleLinks": [{ "language": "eng-US", "source": "MT", "format": "webvtt", "url": "https://v16m-webapp.tiktokcdn-us.com/..." }] },
  "input": "nasa",
  "inputType": "profile"
}
```

### Use it as an API

Run it from any language with the Apify API or client, or call it from an AI agent through Apify's MCP server
(`https://mcp.apify.com/?tools=sauliusautomatesit/tiktok-scraper-api`).

```bash
curl -X POST "https://api.apify.com/v2/acts/sauliusautomatesit~tiktok-scraper-api/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "content-type: application/json" \
  -d '{"searchQueries":["#booktok"],"resultsPerSearch":100}'
```

### Who uses it

- **Influencer marketing:** creator lists with followers, likes and average views, and every post of a campaign.
- **Brands and agencies:** track hashtags, competitors and campaign videos daily with exact counts.
- **Trend and social listening:** what is posted for a keyword or hashtag, by date, with sounds and captions.
- **Research and AI:** captions, transcripts links and engagement for datasets and agents.

### Good to know

- Only public data that any visitor sees is collected. Private profiles return a free `PROFILE_PRIVATE` row.
- TikTok search returns what TikTok ranks for the query, not every video ever posted with that hashtag.
- Profiles and video links are fast. Searches run a small browser to sign TikTok's requests; very large search jobs
  run faster with 1 GB of memory.
- Play and download links from TikTok expire after some hours; download media soon after the run if you need it.
- Run summary (rows per profile and search, failures) is saved as `OUTPUT` in the run's key-value store.

### Related Actors

- [YouTube Scraper API](https://apify.com/sauliusautomatesit/youtube-scraper-api): YouTube videos, channels and transcripts.
- [Pinterest Scraper API](https://apify.com/sauliusautomatesit/pinterest-scraper-api): pins, boards and profiles.
- [Contact Details Scraper API](https://apify.com/sauliusautomatesit/contact-details-scraper-api): emails and social profiles from any website, such as creators' bio links.

# Actor input Schema

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

TikTok usernames or profile links, for example nasa, @nasa or https://www.tiktok.com/@nasa. Returns each profile's videos, newest first (pinned videos first).

## `resultsPerProfile` (type: `integer`):

Most videos to return from each profile.

## `searchQueries` (type: `array`):

Keywords (dentist tips) or hashtags (#booktok). Returns the videos TikTok search shows for each, in TikTok's order.

## `resultsPerSearch` (type: `integer`):

Most videos to return from each search query or hashtag (at least 10).

## `videoUrls` (type: `array`):

TikTok video or photo post links (https://www.tiktok.com/@user/video/123..., vm.tiktok.com short links or bare video IDs). One row per video with current counts: good for tracking campaign posts.

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

Return one row per profile (followers, following, total likes, video count, bio, bio link, verified, private) instead of its videos. Charged per profile.

## `newerThan` (type: `string`):

Skip videos posted before this date: 2026-09-01, or a period such as 7 days, 4 weeks or 3 months. Skipped videos are free.

## `maxItems` (type: `integer`):

Stop after this many charged rows across all inputs. Empty means no total limit.

## Actor input object example

```json
{
  "profiles": [
    "nasa"
  ],
  "resultsPerProfile": 20,
  "resultsPerSearch": 30,
  "profileDetailsOnly": false
}
```

# Actor output Schema

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

One item per video or profile. Download as JSON, CSV or Excel, or read it from this API endpoint.

## `summary` (type: `string`):

Profiles, searches and video links with rows delivered and failures.

# 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"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("sauliusautomatesit/tiktok-scraper-api").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"] }

# Run the Actor and wait for it to finish
run = client.actor("sauliusautomatesit/tiktok-scraper-api").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"
  ]
}' |
apify call sauliusautomatesit/tiktok-scraper-api --silent --output-dataset

```

## MCP server setup

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

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/vgRnjv1RUqBSZRBtR/builds/rYKIqqzJhQYdBtAcq/openapi.json
