# TikTok Videos Scraper (`kaix/tiktok-videos-scraper`) Actor

🔥 ~$0.1/1K videos 🔥 Scrape the videos of TikTok profiles, hashtags, and sounds, or read any video by URL. Each video comes with its hashtags, author, music, video details, and stats (views, likes, comments, shares, saves). Reads the whole video list, or up to a limit you choose.

- **URL**: https://apify.com/kaix/tiktok-videos-scraper.md
- **Developed by:** [Kai](https://apify.com/kaix) (community)
- **Categories:** Social media, Videos
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 35.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.80 / 1,000 videos

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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 Videos Scraper - Video Lists and Stats

Get the videos of TikTok profiles, hashtags, and sounds with their stats. Every
public video is one item in the Dataset: description, hashtags, creation time,
author with follower counts, music, video details, and counts of views, likes,
comments, shares, and saves.

Read the whole video list of a profile, or only the first videos you need. Read
the videos of a hashtag or a sound. Add single video URLs to refresh the stats
of videos you already know. Run many sources in one run.

### Use cases

#### Creator and brand monitoring

Track what a creator posts and how each video performs. Run the same input on
an Apify schedule.

```json
{
  "profileUrls": ["https://www.tiktok.com/@nasa"],
  "videosPerProfile": 20
}
```

Use `videoId`, `createTime`, `desc`, `hashtags`, `stats.views`, `stats.likes`,
`stats.comments`, `stats.shares`, and `stats.saves`.

#### Content performance comparison

Compare how videos perform across creators, brands, or competitors.

```json
{
  "profileUrls": [
    "https://www.tiktok.com/@nasa",
    "https://www.tiktok.com/@mrbeast"
  ],
  "videosPerProfile": 50
}
```

Use `author.uniqueId`, `author.followers`, `stats.views`, `stats.likes`,
`stats.shares`, `stats.saves`, and `video.duration`.

#### Hashtag research

See which creators, sounds, and co-occurring hashtags go with a hashtag, and how
its videos perform.

```json
{
  "hashtagUrls": ["https://www.tiktok.com/tag/space"],
  "videosPerProfile": 100
}
```

Use `author.uniqueId`, `desc`, `hashtags`, `music.title`, `stats.views`, and
`stats.likes`.

#### Sound research

Find the videos that use a sound, and see which of them perform best.

```json
{
  "musicUrls": ["https://www.tiktok.com/music/original-sound-1234567890"],
  "videosPerProfile": 100
}
```

Copy the sound link from TikTok. Use `author.uniqueId`, `stats.views`,
`stats.likes`, and `createTime`.

#### Refresh the stats of known videos

Read the current counts of videos that you already track.

```json
{
  "videoUrls": ["https://www.tiktok.com/@nasa/video/7665075736742530317"]
}
```

Use `videoId`, `stats.views`, `stats.likes`, `stats.comments`, `stats.shares`,
and `stats.saves`.

#### Growth tracking

Run one profile on an Apify schedule. Join the runs on `videoId`, and watch
`stats.views`, `stats.likes`, and `stats.saves` move over time. A `videoId` that
the earlier run did not have is a new video. A `videoId` that the newer run does
not have is a video that is gone.

### Choose what to collect

| Starting point                  | Input                           | Use it for                                  |
| ------------------------------- | ------------------------------- | ------------------------------------------- |
| One or more profiles            | `profileUrls`                   | Collect every public video of each profile  |
| The first videos of each source | Any list and `videosPerProfile` | Sample a source, or keep a run short        |
| One or more hashtags            | `hashtagUrls`                   | Collect the videos of each hashtag          |
| One or more sounds              | `musicUrls`                     | Collect the videos that use each sound      |
| Videos that you already know    | `videoUrls`                     | Read the details and stats of each video    |
| Several of these                | Any mix of the inputs above     | Profiles, hashtags, sounds, then video URLs |

### What each video includes

- Video: ID, URL, description and its language, creation time, hashtags,
  mentions, and effects
- Video details: duration, size in pixels, format, bitrate, and cover links
- Author: handle, display name, bio, verified flag, avatar link, and follower,
  following, like, and video counts
- Stats: views, likes, comments, shares, saves, and reposts
- Music: ID, title, author, album, duration, and links
- Flags: ad, AI generated, pinned, and whether duets, stitches, and sharing are
  on
- Photo posts: the image links
- Source: the profile, hashtag, sound, or video URL from your input

### Read the videos of a profile

Start with a profile URL:

```json
{
  "profileUrls": ["https://www.tiktok.com/@nasa"]
}
```

The Actor saves every public video of the profile. Set `videosPerProfile` to
stop earlier:

```json
{
  "profileUrls": ["https://www.tiktok.com/@nasa"],
  "videosPerProfile": 20
}
```

The Actor saves up to 20 videos for each profile. A profile with fewer public
videos gives fewer items.

Add several profile URLs to read them in input order. A profile URL looks like
`https://www.tiktok.com/@handle`.

### Read the videos of hashtags and sounds

Add hashtag URLs, sound URLs, or both:

```json
{
  "hashtagUrls": ["https://www.tiktok.com/tag/space"],
  "musicUrls": ["https://www.tiktok.com/music/original-sound-1234567890"],
  "videosPerProfile": 30
}
```

The Actor saves up to 30 videos for each hashtag and for each sound. A hashtag
URL looks like `https://www.tiktok.com/tag/<name>`. A sound URL looks like
`https://www.tiktok.com/music/<name>-<ID>`.

A hashtag or a sound can have a very large number of videos. Set
`videosPerProfile` to keep the run short. The name of the field says "profile", but it works for hashtags
and sounds too.

A sound can give fewer videos than TikTok shows for it. One test sound gave 6
videos with no limit.

### Read single videos

```json
{
  "videoUrls": ["https://www.tiktok.com/@nasa/video/7665075736742530317"]
}
```

Each entry is a full video URL. It must contain `/video/` and the video ID. An
entry without them gives an error item. `videosPerProfile` does not apply to
`videoUrls`.

Some fields are filled only for a video URL. They are empty for a profile,
hashtag, or sound. See
[Which fields are empty for which input](#which-fields-are-empty-for-which-input).

### How results are ordered and limited

**Order.** The Actor handles all `profileUrls` first, then all `hashtagUrls`,
then all `musicUrls`, and last all `videoUrls`. Each group follows input order.
Inside a profile, items follow the profile order: a pinned video first, then the
newest videos. Inside a hashtag or a sound, items follow the order that TikTok gives.

**Limit.** `videosPerProfile` applies to each profile, each hashtag, and each
sound, not to the complete run. The Actor stops at exactly that number. On a
profile, a pinned video counts toward it.

**Same video twice.** A video appears once in one list. It appears again when it
is in another source, such as `videoUrls` and a profile, or a profile and a
hashtag. Its `inputUrl` tells you the source.

### Input

Provide at least one profile, hashtag, sound, or video URL.

<details>
<summary>Complete input example</summary>

This example uses every input field.

```json
{
  "profileUrls": [
    "https://www.tiktok.com/@nasa",
    "https://www.tiktok.com/@mrbeast"
  ],
  "hashtagUrls": ["https://www.tiktok.com/tag/space"],
  "musicUrls": ["https://www.tiktok.com/music/original-sound-1234567890"],
  "videoUrls": ["https://www.tiktok.com/@nasa/video/7665075736742530317"],
  "videosPerProfile": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

</details>

#### Input reference

| Parameter              | Type               | Default                  | Effect                                                                                       |
| ---------------------- | ------------------ | ------------------------ | -------------------------------------------------------------------------------------------- |
| **profileUrls**        | string\[]           | empty                    | TikTok profile URLs. The Actor reads the public videos of each profile.                      |
| **hashtagUrls**        | string\[]           | empty                    | TikTok hashtag URLs. The Actor reads the videos of each hashtag.                             |
| **musicUrls**          | string\[]           | empty                    | TikTok sound URLs. The Actor reads the videos that use each sound.                           |
| **videoUrls**          | string\[]           | empty                    | TikTok video URLs. The Actor saves one item for each URL. `videosPerProfile` does not apply. |
| **videosPerProfile**   | integer, 0 or more | `0`                      | Upper limit on saved videos for each profile, hashtag, and sound. `0` removes the limit.     |
| **proxyConfiguration** | object             | `{"useApifyProxy":true}` | Connection settings for the run. Keep the default.                                           |

- Use full URLs. A profile URL looks like `https://www.tiktok.com/@handle`. A
  video URL looks like `https://www.tiktok.com/@handle/video/<ID>`.
- A value that is not a URL stops the run before collection.
- Unknown input fields are ignored.

### Output

Each Dataset item is one video. An input URL that the Actor could not read
gives one error item in the Errors dataset, not in the Dataset. Every documented
video field is present in every video item. A value that is not available is `null`, an empty list, or `0` for a
count. The fields `author`, `stats`, `music`, and `video` are objects.

#### Sample video

This video is from `@nasa`, read from a video URL. The links are removed. It is
not a saved Dataset item.

<details>
<summary>Open the video JSON</summary>

```json
{
  "videoId": "7700397098994273549",
  "videoUrl": "https://www.tiktok.com/@nasa/video/7700397098994273549",
  "inputUrl": "https://www.tiktok.com/@nasa/video/7700397098994273549",
  "desc": "NASA 🤝 college football. We heard y’all like a good air show. Roll Tide!",
  "descLanguage": "en",
  "createTime": "1792888427",
  "locationCreated": "US",
  "categories": ["Traditional Sports", "Sports", "Sport & Outdoor"],
  "hashtags": [],
  "mentions": [],
  "effects": [],
  "isAd": false,
  "isAiGenerated": false,
  "isPinned": null,
  "duetEnabled": true,
  "stitchEnabled": true,
  "shareEnabled": true,
  "captionLanguages": ["eng-US"],
  "images": [],
  "video": {
    "duration": 16,
    "width": 720,
    "height": 1280,
    "ratio": "720p",
    "definition": "720p",
    "format": "mp4",
    "codec": "h264",
    "bitrate": 2969827,
    "size": null,
    "cover": "[link removed]",
    "originCover": "[link removed]",
    "dynamicCover": "[link removed]"
  },
  "author": {
    "id": "7664638705177150477",
    "uniqueId": "nasa",
    "nickname": "NASA",
    "verified": true,
    "signature": "Making the seemingly impossible, possible.✨",
    "createTime": "1784562949",
    "private": false,
    "seller": false,
    "avatar": "[link removed]",
    "followers": 2200000,
    "following": 23,
    "likes": 11500000,
    "videos": 62,
    "likesGiven": 362
  },
  "stats": {
    "views": 151900,
    "likes": 8855,
    "comments": 279,
    "shares": 273,
    "saves": 562,
    "reposts": 0
  },
  "music": {
    "id": "7700397137514793741",
    "title": "original sound - NASA",
    "author": "NASA",
    "album": null,
    "duration": 16,
    "playUrl": "[link removed]",
    "cover": "[link removed]"
  }
}
```

A video that comes from a profile, a hashtag, or a sound has the same fields.
Its `inputUrl` is the profile, hashtag, or sound URL from your input.

</details>

#### Field reference

| Field              | Type and contents                                                                                |
| ------------------ | ------------------------------------------------------------------------------------------------ |
| `videoId`          | string. The video ID.                                                                            |
| `videoUrl`         | string. The link to the video.                                                                   |
| `inputUrl`         | string. The URL from your input that gave this video.                                            |
| `desc`             | string. The description. It is empty when the video has none.                                    |
| `descLanguage`     | string or `null`. The language code of the description, such as `en`.                            |
| `createTime`       | string or `null`. The creation time in Unix seconds, such as `"1792888427"`.                     |
| `locationCreated`  | string or `null`. The country code where the video was made. Filled only for a video URL.        |
| `categories`       | string\[]. The topic labels of the video, such as `Sports`. Filled only for a video URL.          |
| `hashtags`         | string\[]. The hashtags of the description, without `#`.                                          |
| `mentions`         | string\[]. The accounts that the description mentions, without `@`.                               |
| `effects`          | string\[]. The names of the effects that the video uses. Empty for a profile.                     |
| `isAd`             | boolean or `null`. `true` for a paid ad.                                                         |
| `isAiGenerated`    | boolean or `null`. `true` when the video is marked as AI generated. Filled only for a video URL. |
| `isPinned`         | boolean or `null`. `true` for a video that the creator pinned. Filled only for a profile.        |
| `duetEnabled`      | boolean or `null`. Whether other users can make a duet with the video.                           |
| `stitchEnabled`    | boolean or `null`. Whether other users can stitch the video.                                     |
| `shareEnabled`     | boolean or `null`. Whether the video can be shared.                                              |
| `captionLanguages` | string\[]. The caption languages that the video offers, such as `eng-US`.                         |
| `images`           | string\[]. The image links of a photo post. Empty for a video.                                    |

**`video`**

| Field                | Type and contents                                                       |
| -------------------- | ----------------------------------------------------------------------- |
| `video.duration`     | number. The duration in seconds. It is `0` for a photo post.            |
| `video.width`        | number or `null`. The width in pixels.                                  |
| `video.height`       | number or `null`. The height in pixels.                                 |
| `video.ratio`        | string or `null`. The resolution label, such as `720p`.                 |
| `video.definition`   | string or `null`. The quality label, such as `720p`.                    |
| `video.format`       | string or `null`. The file format, such as `mp4`.                       |
| `video.codec`        | string or `null`. The video codec, such as `h264`.                      |
| `video.bitrate`      | number or `null`. The bitrate in bits per second.                       |
| `video.size`         | number or `null`. The file size in bytes. It is `null` for a video URL. |
| `video.cover`        | string or `null`. A link to the cover image.                            |
| `video.originCover`  | string or `null`. A link to the original cover image.                   |
| `video.dynamicCover` | string or `null`. A link to the animated cover.                         |

**`author`**

| Field               | Type and contents                                                                         |
| ------------------- | ----------------------------------------------------------------------------------------- |
| `author.id`         | string. The account ID.                                                                   |
| `author.uniqueId`   | string. The handle, without `@`.                                                          |
| `author.nickname`   | string. The display name.                                                                 |
| `author.verified`   | boolean or `null`. Whether the account is verified.                                       |
| `author.signature`  | string or `null`. The bio.                                                                |
| `author.createTime` | string or `null`. The account creation time in Unix seconds. Filled only for a video URL. |
| `author.private`    | boolean or `null`. Whether the account is private.                                        |
| `author.seller`     | boolean or `null`. Whether the account sells in TikTok Shop. Filled only for a video URL. |
| `author.avatar`     | string or `null`. A link to the avatar image.                                             |
| `author.followers`  | number or `null`. The follower count.                                                     |
| `author.following`  | number or `null`. The count of accounts that the author follows.                          |
| `author.likes`      | number or `null`. The total likes that the account received.                              |
| `author.videos`     | number or `null`. The video count of the account.                                         |
| `author.likesGiven` | number or `null`. The count of videos that the account liked.                             |

**`stats`**

| Field            | Type and contents                               |
| ---------------- | ----------------------------------------------- |
| `stats.views`    | number. The play count.                         |
| `stats.likes`    | number. The like count.                         |
| `stats.comments` | number. The comment count.                      |
| `stats.shares`   | number. The share count.                        |
| `stats.saves`    | number. The count of users who saved the video. |
| `stats.reposts`  | number. The repost count.                       |

**`music`**

| Field            | Type and contents                                    |
| ---------------- | ---------------------------------------------------- |
| `music.id`       | string or `null`. The sound ID.                      |
| `music.title`    | string or `null`. The sound title.                   |
| `music.author`   | string or `null`. The name of the sound author.      |
| `music.album`    | string or `null`. The album, when the sound has one. |
| `music.duration` | number or `null`. The duration in seconds.           |
| `music.playUrl`  | string or `null`. A link to the audio file.          |
| `music.cover`    | string or `null`. A link to the sound cover image.   |

- The values in `stats` are the values at the time of the run. They change over
  time.
- TikTok rounds large counts, such as `followers` of `2200000`.
- Image links expire after about two days. Download the images soon after the
  run if you need them.

#### Which fields are empty for which input

Some fields are empty for some inputs. The Actor still saves the video and sets
the field to `null` or an empty list. A filled field can still be empty for one
video, for example when the video has no captions.

| Field                                                                                  | Profile           | Hashtag | Sound  | Video URL |
| -------------------------------------------------------------------------------------- | ----------------- | ------- | ------ | --------- |
| `locationCreated`, `categories`, `isAiGenerated`, `author.createTime`, `author.seller` | Empty             | Empty   | Empty  | Filled    |
| `isPinned`                                                                             | `true` or `false` | `null`  | `null` | `null`    |
| `effects`                                                                              | Empty             | Filled  | Filled | Filled    |
| `captionLanguages`                                                                     | Filled            | Filled  | Empty  | Filled    |
| `video.size`                                                                           | Filled            | Filled  | Filled | `null`    |

`hashtags` and `mentions` are filled for every input type.

#### Error items

An input URL that the Actor cannot read gives one error item in the Errors
dataset. The Dataset holds only videos. The run goes on with the next URL.

```json
{
  "inputUrl": "https://www.tiktok.com/@nasa/video/7000000000000000001",
  "error": "The video is removed or private.",
  "errorCode": "VIDEO_UNAVAILABLE"
}
```

An error item has three fields:

| Field       | Type and contents                                   |
| ----------- | --------------------------------------------------- |
| `inputUrl`  | string. The entry from your input.                  |
| `error`     | string. A short sentence that says what went wrong. |
| `errorCode` | string. One of the codes below.                     |

| `errorCode`           | Meaning                                                                   |
| --------------------- | ------------------------------------------------------------------------- |
| `NOT_A_VIDEO_URL`     | The entry of `videoUrls` has no `/video/` and video ID.                   |
| `VIDEO_UNAVAILABLE`   | The video is removed or private.                                          |
| `PROFILE_UNAVAILABLE` | The profile does not exist or is not available.                           |
| `READ_FAILED`         | The profile, hashtag, sound, or video could not be read. Try again later. |

### Limits and field notes

#### How many videos can I collect?

`videosPerProfile` is an upper limit for each profile, hashtag, and sound, not a
required result count. The Actor can save fewer videos, for example when a
profile has fewer public videos. Set it to `0` to remove the limit.

A profile with no public videos succeeds with an empty Dataset.

#### Which videos are available?

The Actor reads public data only. Private profiles and age-gated videos are not
available.

#### Are the hashtag videos recent?

Not always. TikTok picks the videos of a hashtag, and many of them are old. Use
`createTime` to see the age of each video.

#### Why are some fields empty?

Not every video has every field, and some fields are empty for some inputs. The
Actor still saves the video. See
[Which fields are empty for which input](#which-fields-are-empty-for-which-input).

#### What happens when a source or video fails?

The Actor gives an error item, writes a warning to the log, and continues with
the next entry. The videos that it already saved stay in the Dataset. A profile
that does not exist gives its error item in seconds. A hashtag or sound that
does not exist can take several minutes before it gives its error item.

If no profile, hashtag, sound, and video can be read, the run fails with the
message "No video or profile could be read. Check the URLs and try again." The
error items stay in the Errors dataset. A profile with no public videos is not a
failure. Invalid input also fails the run with a message that names the problem.

#### Can a video disappear after I collect it?

Yes. A creator can delete a video or make it private at any time. Compare runs
of the same input to find the videos that are gone.

### Similar Actors

- [TikTok Video Comments Scraper](https://apify.com/kaix/tiktok-comments-scraper).
  The comments of TikTok videos, with replies and video stats.
- [TikTok Shop Scraper](https://apify.com/kaix/tiktok-shop-scraper). TikTok Shop
  product, seller, offer, delivery, and review data.
- [Instagram Scraper](https://apify.com/kaix/instagram-scraper). Public
  Instagram profiles, posts, reels, comments, and places.
- [YouTube Scraper](https://apify.com/kaix/youtube-scraper). YouTube videos,
  channels, playlists, comments, captions, and live chat.

# Actor input Schema

## `profileUrls` (type: `array`):

List of TikTok profile URLs, for example https://www.tiktok.com/@nasa. Every public video of each profile is collected.

## `hashtagUrls` (type: `array`):

List of TikTok hashtag URLs, for example https://www.tiktok.com/tag/space. Videos of each hashtag are collected.

## `musicUrls` (type: `array`):

List of TikTok sound or music page URLs, for example https://www.tiktok.com/music/original-sound-1234567890. Videos using each sound are collected.

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

List of TikTok video URLs. The details of each video are collected.

## `videosPerProfile` (type: `integer`):

Maximum number of videos to read per profile, hashtag, or sound. Set to 0 for no limit (every public video). It does not apply to video URLs.

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

Connection settings. The default works for most runs.

## Actor input object example

```json
{
  "profileUrls": [
    "https://www.tiktok.com/@nasa"
  ],
  "hashtagUrls": [],
  "musicUrls": [],
  "videoUrls": [],
  "videosPerProfile": 10,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `videos` (type: `string`):

No description

## `errors` (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 = {
    "profileUrls": [
        "https://www.tiktok.com/@nasa"
    ],
    "hashtagUrls": [],
    "musicUrls": [],
    "videoUrls": [],
    "videosPerProfile": 10,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("kaix/tiktok-videos-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 = {
    "profileUrls": ["https://www.tiktok.com/@nasa"],
    "hashtagUrls": [],
    "musicUrls": [],
    "videoUrls": [],
    "videosPerProfile": 10,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("kaix/tiktok-videos-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 '{
  "profileUrls": [
    "https://www.tiktok.com/@nasa"
  ],
  "hashtagUrls": [],
  "musicUrls": [],
  "videoUrls": [],
  "videosPerProfile": 10,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call kaix/tiktok-videos-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kaix/tiktok-videos-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/u8octtziqacrxZlou/builds/mMxx4ZatRzUSXGMul/openapi.json
