# TikTok All-in-One Scraper (`qaseemiqbal/tiktok-all-in-one-scraper`) Actor

Collect TikTok posts, profiles, hashtags, music metadata, media references, and structured diagnostics.

- **URL**: https://apify.com/qaseemiqbal/tiktok-all-in-one-scraper.md
- **Developed by:** [Muhammad Qaseem Iqbal](https://apify.com/qaseemiqbal) (community)
- **Categories:** Social media, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 post results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## TikTok All-in-One Scraper

### What does TikTok All-in-One Scraper do?

TikTok All-in-One Scraper helps you collect public TikTok data from posts, profiles, hashtags, search terms, comments, followers, following lists, music pages, and media links.

Use it to research creators, monitor trends, collect public engagement metrics, analyze comments, build influencer lists, or export TikTok data into spreadsheets, dashboards, databases, and AI workflows.

You can start with a single TikTok URL, a username, a hashtag, or a keyword. The Actor will detect the target type, collect the public data that is available, and return clean, organized results.

### What can you scrape?

TikTok All-in-One Scraper can collect public data from:

| Target | What you can get |
| --- | --- |
| TikTok videos | Caption, video ID, author, hashtags, views, likes, shares, comments count, music, cover image, video URL |
| TikTok profiles | Username, display name, bio, profile URL, avatar, verification status, follower/following counts when available |
| Hashtags | Hashtag metadata and public post data when TikTok exposes it |
| Keyword searches | Matching public posts and profiles when available |
| Comments | Public comments and basic engagement data when TikTok allows access |
| Comment replies | Public replies to collected comments when available |
| Followers and following | Public follower/following records when TikTok exposes the relationship endpoint |
| Music/sounds | Music ID, title, author, cover, play URL, and related video data when available |
| Media assets | Video links, covers, avatars, music covers, and optional file downloads |

### Why use this Actor?

- Scrape multiple TikTok data types with one Actor.
- Paste TikTok URLs, usernames, hashtags, or keywords.
- No TikTok account setup is required for public pages.
- Get clean datasets that are easy to export.
- Separate posts, profiles, comments, connections, media, and errors into dedicated datasets.
- Keep a mirrored default dataset for quick viewing in Apify Console.
- Use structured error records so failed or blocked targets are easy to understand.
- Run manually, on a schedule, through the API, or as part of an automation workflow.
- Use the output with spreadsheets, BI tools, data warehouses, or AI agents.

### How to scrape TikTok data

1. Open TikTok All-in-One Scraper on Apify.
2. Add TikTok video URLs, profile usernames, hashtags, or keywords in the Form tab.
3. Choose what you want to extract in the **Operations** field.
4. Set result limits if needed.
5. Click **Start**.
6. Open the **Output** or **Storage** tab to view your results.
7. Download the dataset in JSON, CSV, Excel, XML, HTML, or RSS.

For a simple first run, paste a TikTok video URL and keep the default settings.

### Input options

You can use one or more of these input fields:

| Input field | Use it for |
| --- | --- |
| `startUrls` | TikTok video, profile, hashtag, search, or music URLs |
| `postURLs` | Direct TikTok video URLs |
| `profiles` | TikTok usernames or profile URLs |
| `hashtags` | Hashtags with or without `#` |
| `keywords` | TikTok search terms |
| `operations` | Select what data to collect, such as posts, profiles, comments, followers, or media |
| `resultsLimit` | Limit the total number of main results |
| `resultsPerTarget` | Limit results for each URL, profile, hashtag, or keyword |
| `commentsPerPost` | Limit public comments collected per video |
| `maxRepliesPerComment` | Limit replies collected for each comment |
| `maxFollowersPerProfile` | Limit follower records per profile |
| `maxFollowingPerProfile` | Limit following records per profile |
| `download` | Choose whether to download videos, covers, avatars, subtitles, slideshow images, or music covers |
| `datasetMode` | Choose where results are saved. Most users should keep the default: separate datasets plus a default mirror |
| `fieldPreset` | Choose compact, standard, or full records |

Supported URL examples:

| URL type | Example |
| --- | --- |
| Video | `https://www.tiktok.com/@apifytech/video/7398101551744552225` |
| Profile | `https://www.tiktok.com/@apifytech` |
| Hashtag | `https://www.tiktok.com/tag/webscraping` |
| Search | `https://www.tiktok.com/search?q=webscraping` |
| Music | TikTok music or sound URLs when public data is available |

### Input examples

#### Scrape one video

```json
{
  "postURLs": [
    "https://www.tiktok.com/@apifytech/video/7398101551744552225"
  ],
  "operations": ["posts", "profiles"],
  "resultsLimit": 1
}
````

#### Research hashtags

```json
{
  "hashtags": ["webscraping", "automation"],
  "operations": ["posts", "profiles", "hashtagStats"],
  "resultsPerTarget": 100
}
```

#### Collect comments and replies

```json
{
  "postURLs": [
    "https://www.tiktok.com/@apifytech/video/7398101551744552225"
  ],
  "operations": ["posts", "profiles", "comments", "commentReplies"],
  "commentsPerPost": 100,
  "maxRepliesPerComment": 5
}
```

#### Extract followers and following

```json
{
  "profiles": ["apifytech"],
  "operations": ["profiles", "followers", "following"],
  "maxFollowersPerProfile": 100,
  "maxFollowingPerProfile": 100
}
```

#### Save media references

```json
{
  "postURLs": [
    "https://www.tiktok.com/@apifytech/video/7398101551744552225"
  ],
  "operations": ["posts", "media"],
  "download": {
    "covers": true,
    "videos": false
  }
}
```

### Output

By default, the Actor writes results to separate datasets and also mirrors them to the default dataset, so you can see results immediately in the Apify Console Output tab.

After the run finishes, you can find results in two places:

| Apify tab | What to use it for |
| --- | --- |
| Output | Quick preview of the combined default dataset |
| Storage | Separate datasets for posts, profiles, comments, followers/following, media, errors, and run reports |

Available datasets:

| Dataset | Contains |
| --- | --- |
| `posts` | TikTok video/post records |
| `profiles` | Creator profile records |
| `comments` | Comment and reply records |
| `connections` | Follower and following records |
| `hashtagStats` | Hashtag metadata |
| `music` | Music and sound metadata |
| `media` | Media links and downloaded file references |
| `errors` | Clear error records for targets that could not be scraped |

The key-value store also contains:

| Key | Meaning |
| --- | --- |
| `OUTPUT` | Run summary, totals, settings, and planned versus actual event counts |
| `REPORT.md` | A short human-readable run report |
| `media/...` | Downloaded media files when media downloads are enabled |

### Which dataset mode should you use?

For most users, keep the default option in the Form tab: **Separate plus default mirror**.

In JSON, that means:

```json
{
  "datasetMode": "auto"
}
```

| Mode | Best for |
| --- | --- |
| `auto` | Recommended. Saves organized datasets and also mirrors results to the default Output tab |
| `separate` | Saves only the organized datasets. Useful for larger automated jobs |
| `single` | Saves everything into the default dataset only |

If you are browsing results in Apify Console, `auto` is the easiest choice.

### Example output

#### Post record

```json
{
  "recordType": "post",
  "id": "7398101551744552225",
  "text": "Example caption #webscraping",
  "playCount": 589,
  "diggCount": 20,
  "shareCount": 1,
  "commentCount": 0,
  "authorMeta": {
    "name": "apifytech",
    "profileUrl": "https://www.tiktok.com/@apifytech"
  },
  "webVideoUrl": "https://www.tiktok.com/@apifytech/video/7398101551744552225",
  "retrievedAt": "2026-06-11T18:55:22.458Z"
}
```

#### Profile record

```json
{
  "recordType": "profile",
  "username": "apifytech",
  "nickname": "apifytech",
  "profileUrl": "https://www.tiktok.com/@apifytech",
  "verified": false,
  "retrievedAt": "2026-06-11T18:55:22.458Z"
}
```

#### Error record

```json
{
  "recordType": "error",
  "input": "webscraping",
  "targetType": "hashtag",
  "errorCode": "NO_RESULTS",
  "error": "The hashtag target produced no records.",
  "isRetryable": false
}
```

### What are error records?

TikTok does not always show the same data to every visitor. Some pages may be private, deleted, empty, region-limited, temporarily unavailable, or hidden behind a login or anti-bot check.

When that happens, the Actor does not silently skip the target. It writes an error item explaining what happened.

Common error codes:

| Error code | Meaning |
| --- | --- |
| `EMPTY_PAYLOAD` | TikTok loaded the page but did not expose usable public data |
| `NO_RESULTS` | No matching public records were found |
| `PUBLIC_API_BLOCKED` | TikTok blocked or withheld data from a public API endpoint |
| `CONTENT_UNAVAILABLE` | The target was not accessible |
| `FETCH_FAILED` | The request failed after retries |
| `OPERATION_UNAVAILABLE` | The selected operation is not available for that target |

Error records are useful for monitoring large jobs because they show exactly which inputs failed and why.

### How can you use the data?

TikTok All-in-One Scraper is useful for:

- Finding creators for influencer campaigns.
- Monitoring brand mentions and hashtag campaigns.
- Tracking public engagement on TikTok videos.
- Collecting comments for sentiment analysis.
- Researching viral products, niches, and content formats.
- Building lead lists from public creator profiles.
- Exporting TikTok data to Google Sheets, Excel, databases, or dashboards.
- Feeding structured TikTok data into AI agents and analysis workflows.

### Export and integrations

You can export results from Apify in common formats:

- JSON
- CSV
- Excel
- XML
- HTML
- RSS

You can also connect the Actor to:

- Apify API for custom apps and scripts
- Webhooks for notifications and follow-up actions
- Schedules for daily, weekly, or recurring monitoring
- Google Sheets
- Google Drive
- Make
- Zapier
- Slack
- GitHub
- Airbyte
- n8n
- Apify MCP server
- Python and Node.js scripts using Apify SDKs

This makes it possible to send TikTok data into spreadsheets, dashboards, data warehouses, alerts, or AI workflows without manually downloading files after every run.

### Pricing and cost control

The exact price depends on the pricing shown on the Actor's **Pricing** tab in Apify Store.

To keep runs predictable:

- Start with a small test run before scraping many targets.
- Use `resultsLimit` and `resultsPerTarget` to cap the number of main results.
- Use `commentsPerPost`, `maxFollowersPerProfile`, and `maxFollowingPerProfile` when collecting larger lists.
- Enable media downloads only when you need the actual files.
- Check the `OUTPUT` key after a run to see the run summary and planned versus actual charge-event counts.

### Tips for best results

- Start with direct TikTok video URLs when testing.
- Keep limits small for your first run.
- Use Apify Proxy for production runs.
- Use `datasetMode: "auto"` if you want results in the default Output tab and separate datasets.
- Enable media downloads only when you need the files, because downloading videos can increase runtime and storage use.
- If a profile, hashtag, comment list, or follower list returns an error, try again later or with a smaller input batch. TikTok access can vary by region, target, and session.

### Troubleshooting common issues

| Issue | What to try |
| --- | --- |
| No results in the Output tab | Keep `datasetMode` set to `auto`, then check the default dataset and the separate datasets in Storage |
| Fewer results than expected | Increase `resultsLimit` or `resultsPerTarget`, and check whether the target has enough public data |
| Comments are missing | Make sure `comments` is selected in `operations` and set `commentsPerPost` above 0 |
| Followers or following are missing | Make sure `followers` or `following` is selected and set the related limit above 0 |
| Media files are not saved | Select the `media` operation and turn on the specific download options you need |
| Some targets show errors | Open the `errors` dataset. It will show whether TikTok returned no public data, blocked the request, or made the target unavailable |
| Run failed quickly | Check the Apify Log tab and test again with one direct TikTok video URL |

### FAQ

#### Do I need a TikTok account?

No. This Actor works with public TikTok pages and does not require your TikTok login.

#### Can it scrape private TikTok profiles?

No. The Actor only collects public data. It does not bypass private accounts, login walls, or access restrictions.

#### Can it scrape comments?

Yes, it attempts to collect public comments and replies when TikTok exposes them. TikTok may block or limit comment access for some videos, regions, or sessions. When that happens, the Actor returns a structured error record.

#### Can it scrape followers and following lists?

Yes, it attempts to collect public followers and following records when TikTok exposes the relationship endpoint. Access can be limited, so some targets may return `PUBLIC_API_BLOCKED` or `NO_RESULTS`.

#### Can it download TikTok videos?

Yes. Enable the `media` operation and set the relevant `download` options. Downloaded files are stored in the key-value store and referenced from the output.

#### How much does it cost?

Check the Actor's **Pricing** tab in Apify Store for the current price. You can control the size of each run with result limits, comment limits, follower/following limits, and media download settings.

#### Can I run it on a schedule?

Yes. Use Apify schedules to run the Actor repeatedly, for example daily or weekly.

#### Can I use it with the Apify API?

Yes. You can run the Actor through the Apify API, integrate it with webhooks, or use Apify SDKs for Python and Node.js.

#### Can I use it with AI agents?

Yes. The Actor is designed to produce clean, structured records that are easy to use with the Apify MCP server, AI agents, and analysis workflows.

#### Why do I sometimes get error records?

TikTok frequently changes what public data is available. Some targets may be private, deleted, empty, region-limited, or temporarily blocked. Error records make those cases visible instead of hiding them.

#### Is scraping TikTok legal?

This Actor is intended for public data only. It does not collect private data or bypass access controls. You are responsible for making sure your use of the data complies with applicable laws, privacy rules, and TikTok's terms. If you are unsure, consult a legal professional.

### Support

If a run does not return the data you expected:

1. Check the `errors` dataset.
2. Try a smaller input batch.
3. Test with a direct TikTok video URL.
4. Lower comment, follower, or media download limits.
5. Enable `debugMode` if you need raw diagnostic pages in the key-value store.

If you believe the Actor is not working correctly, open an issue from the Actor page on Apify.

# Actor input Schema

## `startUrls` (type: `array`):

TikTok video, profile, hashtag, search, music, or location URLs.

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

TikTok usernames or profile URLs.

## `hashtags` (type: `array`):

Hashtags with or without #.

## `keywords` (type: `array`):

Search terms for TikTok discovery.

## `postURLs` (type: `array`):

Direct TikTok video/post URLs.

## `operations` (type: `array`):

Select the public data surfaces to extract.

## `resultsLimit` (type: `integer`):

Maximum total primary records across posts, profiles, hashtag stats, and music.

## `resultsPerTarget` (type: `integer`):

Maximum post/profile records extracted per target.

## `commentsPerPost` (type: `integer`):

Maximum public comments to request per video. Leave 0 to use a conservative results-per-target default when the comments operation is selected.

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

Maximum public replies to request for each collected comment.

## `maxFollowersPerProfile` (type: `integer`):

Maximum public follower records to request per profile when TikTok exposes the relationship endpoint.

## `maxFollowingPerProfile` (type: `integer`):

Maximum public following records to request per profile when TikTok exposes the relationship endpoint.

## `maxProfilesPerQuery` (type: `integer`):

Maximum profile records to keep from a keyword search.

## `searchSection` (type: `string`):

Preferred search section.

## `sortType` (type: `string`):

Preferred search/profile sort type where supported by public payloads.

## `profileScrapeSections` (type: `array`):

Profile sections to request when TikTok exposes them.

## `profileSorting` (type: `string`):

Preferred profile post ordering where supported by TikTok payloads.

## `excludePinnedPosts` (type: `boolean`):

Skip pinned posts when processing profile post payloads.

## `scrapeRelatedVideos` (type: `boolean`):

Attempt to keep additional related post records when they are present in a video page payload.

## `includeSearchKeywords` (type: `boolean`):

Preserve keyword provenance on search-derived records.

## `locationCountryCode` (type: `string`):

Optional two-letter country hint copied into run configuration.

## `filters` (type: `object`):

Optional metric, date, and creator filters.

## `download` (type: `object`):

Optional media download switches. Files are saved to the key-value store when available.

## `datasetMode` (type: `string`):

Use separate typed datasets and mirror to the default dataset, or choose a single/separate-only output mode.

## `fieldPreset` (type: `string`):

Choose compact, standard, or full records. Full includes raw payload fragments.

## `dedupe` (type: `boolean`):

Skip duplicate canonical IDs within the run.

## `incrementalMode` (type: `boolean`):

Persist seen IDs in a key-value store and skip them in later runs.

## `stateKey` (type: `string`):

Optional named key-value store for incremental state.

## `maxConcurrency` (type: `integer`):

Maximum number of TikTok targets processed at the same time.

## `requestRetryLimit` (type: `integer`):

How many times to retry failed target requests before writing a structured error.

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

Proxy settings. Apify Proxy is recommended for TikTok.

## `debugMode` (type: `boolean`):

Store raw HTML pages in the key-value store for diagnostics.

## `saveRawItems` (type: `boolean`):

Include raw TikTok payload fragments in full output records and store raw pages.

## `campaignId` (type: `string`):

Optional provenance tag copied to every output record.

## `clientId` (type: `string`):

Optional provenance tag copied to every output record.

## `labels` (type: `array`):

Optional provenance labels copied to every output record.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.tiktok.com/@apifytech/video/7398101551744552225"
    }
  ],
  "operations": [
    "posts",
    "profiles"
  ],
  "resultsLimit": 100,
  "resultsPerTarget": 100,
  "commentsPerPost": 0,
  "maxRepliesPerComment": 0,
  "maxFollowersPerProfile": 0,
  "maxFollowingPerProfile": 0,
  "maxProfilesPerQuery": 50,
  "searchSection": "videos",
  "sortType": "relevance",
  "profileScrapeSections": [
    "videos"
  ],
  "profileSorting": "latest",
  "excludePinnedPosts": true,
  "scrapeRelatedVideos": false,
  "includeSearchKeywords": true,
  "filters": {
    "verifiedOnly": false
  },
  "download": {
    "videos": false,
    "covers": false,
    "avatars": false,
    "subtitles": false,
    "slideshowImages": false,
    "musicCovers": false
  },
  "datasetMode": "auto",
  "fieldPreset": "standard",
  "dedupe": true,
  "incrementalMode": false,
  "maxConcurrency": 4,
  "requestRetryLimit": 2,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "debugMode": false,
  "saveRawItems": false
}
```

# Actor output Schema

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

Combined default dataset. In the default dataset mode, this mirrors posts, profiles, comments, connections, music, media, hashtag stats, and errors.

## `posts` (type: `string`):

TikTok post and video records, including captions, metrics, author data, music metadata, and URLs.

## `profiles` (type: `string`):

Creator profile records, including usernames, display names, profile URLs, verification status, bios, avatars, and public counters when available.

## `comments` (type: `string`):

Public comments and comment replies collected from TikTok videos when available.

## `connections` (type: `string`):

Public follower and following records collected from profile relationship endpoints when TikTok exposes them.

## `hashtagStats` (type: `string`):

Hashtag metadata and related public counts when TikTok exposes them.

## `music` (type: `string`):

TikTok music and sound metadata, including IDs, titles, authors, covers, and play URLs when available.

## `media` (type: `string`):

Media links and downloaded file references for videos, covers, avatars, subtitles, slideshow images, and music covers.

## `errors` (type: `string`):

Structured diagnostics for targets that were unavailable, blocked, empty, private, deleted, or otherwise could not be scraped.

## `runSummary` (type: `string`):

JSON summary with run settings, result counts, skipped items, and planned versus actual charge-event counts.

## `report` (type: `string`):

Human-readable Markdown report saved after each run.

## `keyValueStore` (type: `string`):

Key-value store keys, including downloaded media files when media downloads or debug output are enabled.

# 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 = {
    "startUrls": [
        {
            "url": "https://www.tiktok.com/@apifytech/video/7398101551744552225"
        }
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("qaseemiqbal/tiktok-all-in-one-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 = {
    "startUrls": [{ "url": "https://www.tiktok.com/@apifytech/video/7398101551744552225" }],
    "proxyConfiguration": { "useApifyProxy": True },
}

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

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

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

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://www.tiktok.com/@apifytech/video/7398101551744552225"
    }
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call qaseemiqbal/tiktok-all-in-one-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=qaseemiqbal/tiktok-all-in-one-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "TikTok All-in-One Scraper",
        "description": "Collect TikTok posts, profiles, hashtags, music metadata, media references, and structured diagnostics.",
        "version": "0.1",
        "x-build-id": "e40jZKSWuMGUDgzY6"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/qaseemiqbal~tiktok-all-in-one-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-qaseemiqbal-tiktok-all-in-one-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/qaseemiqbal~tiktok-all-in-one-scraper/runs": {
            "post": {
                "operationId": "runs-sync-qaseemiqbal-tiktok-all-in-one-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/qaseemiqbal~tiktok-all-in-one-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-qaseemiqbal-tiktok-all-in-one-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "startUrls": {
                        "title": "Start URLs",
                        "type": "array",
                        "description": "TikTok video, profile, hashtag, search, music, or location URLs.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "profiles": {
                        "title": "Profiles",
                        "type": "array",
                        "description": "TikTok usernames or profile URLs.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "hashtags": {
                        "title": "Hashtags",
                        "type": "array",
                        "description": "Hashtags with or without #.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "keywords": {
                        "title": "Keywords",
                        "type": "array",
                        "description": "Search terms for TikTok discovery.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "postURLs": {
                        "title": "Post URLs",
                        "type": "array",
                        "description": "Direct TikTok video/post URLs.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "operations": {
                        "title": "Operations",
                        "type": "array",
                        "description": "Select the public data surfaces to extract.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "posts",
                                "profiles",
                                "comments",
                                "commentReplies",
                                "followers",
                                "following",
                                "relatedVideos",
                                "hashtagStats",
                                "music",
                                "media"
                            ],
                            "enumTitles": [
                                "Posts",
                                "Profiles",
                                "Comments",
                                "Comment replies",
                                "Followers",
                                "Following",
                                "Related videos",
                                "Hashtag stats",
                                "Music",
                                "Media"
                            ]
                        },
                        "default": [
                            "posts",
                            "profiles"
                        ]
                    },
                    "resultsLimit": {
                        "title": "Results limit",
                        "minimum": 0,
                        "maximum": 100000,
                        "type": "integer",
                        "description": "Maximum total primary records across posts, profiles, hashtag stats, and music.",
                        "default": 100
                    },
                    "resultsPerTarget": {
                        "title": "Results per target",
                        "minimum": 0,
                        "maximum": 50000,
                        "type": "integer",
                        "description": "Maximum post/profile records extracted per target.",
                        "default": 100
                    },
                    "commentsPerPost": {
                        "title": "Comments per post",
                        "minimum": 0,
                        "maximum": 50000,
                        "type": "integer",
                        "description": "Maximum public comments to request per video. Leave 0 to use a conservative results-per-target default when the comments operation is selected.",
                        "default": 0
                    },
                    "maxRepliesPerComment": {
                        "title": "Replies per comment",
                        "minimum": 0,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum public replies to request for each collected comment.",
                        "default": 0
                    },
                    "maxFollowersPerProfile": {
                        "title": "Followers per profile",
                        "minimum": 0,
                        "maximum": 100000,
                        "type": "integer",
                        "description": "Maximum public follower records to request per profile when TikTok exposes the relationship endpoint.",
                        "default": 0
                    },
                    "maxFollowingPerProfile": {
                        "title": "Following per profile",
                        "minimum": 0,
                        "maximum": 100000,
                        "type": "integer",
                        "description": "Maximum public following records to request per profile when TikTok exposes the relationship endpoint.",
                        "default": 0
                    },
                    "maxProfilesPerQuery": {
                        "title": "Profiles per query",
                        "minimum": 0,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Maximum profile records to keep from a keyword search.",
                        "default": 50
                    },
                    "searchSection": {
                        "title": "Search section",
                        "enum": [
                            "videos",
                            "profiles",
                            "top"
                        ],
                        "type": "string",
                        "description": "Preferred search section.",
                        "default": "videos"
                    },
                    "sortType": {
                        "title": "Sort type",
                        "enum": [
                            "relevance",
                            "mostLiked",
                            "datePosted"
                        ],
                        "type": "string",
                        "description": "Preferred search/profile sort type where supported by public payloads.",
                        "default": "relevance"
                    },
                    "profileScrapeSections": {
                        "title": "Profile sections",
                        "type": "array",
                        "description": "Profile sections to request when TikTok exposes them.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "videos",
                                "liked",
                                "playlists"
                            ],
                            "enumTitles": [
                                "Videos",
                                "Liked",
                                "Playlists"
                            ]
                        },
                        "default": [
                            "videos"
                        ]
                    },
                    "profileSorting": {
                        "title": "Profile sorting",
                        "enum": [
                            "latest",
                            "popular",
                            "oldest"
                        ],
                        "type": "string",
                        "description": "Preferred profile post ordering where supported by TikTok payloads.",
                        "default": "latest"
                    },
                    "excludePinnedPosts": {
                        "title": "Exclude pinned posts",
                        "type": "boolean",
                        "description": "Skip pinned posts when processing profile post payloads.",
                        "default": true
                    },
                    "scrapeRelatedVideos": {
                        "title": "Scrape related videos",
                        "type": "boolean",
                        "description": "Attempt to keep additional related post records when they are present in a video page payload.",
                        "default": false
                    },
                    "includeSearchKeywords": {
                        "title": "Include search keywords",
                        "type": "boolean",
                        "description": "Preserve keyword provenance on search-derived records.",
                        "default": true
                    },
                    "locationCountryCode": {
                        "title": "Location country code",
                        "type": "string",
                        "description": "Optional two-letter country hint copied into run configuration."
                    },
                    "filters": {
                        "title": "Filters",
                        "type": "object",
                        "description": "Optional metric, date, and creator filters.",
                        "default": {
                            "verifiedOnly": false
                        }
                    },
                    "download": {
                        "title": "Download media",
                        "type": "object",
                        "description": "Optional media download switches. Files are saved to the key-value store when available.",
                        "default": {
                            "videos": false,
                            "covers": false,
                            "avatars": false,
                            "subtitles": false,
                            "slideshowImages": false,
                            "musicCovers": false
                        }
                    },
                    "datasetMode": {
                        "title": "Dataset mode",
                        "enum": [
                            "auto",
                            "separate",
                            "single"
                        ],
                        "type": "string",
                        "description": "Use separate typed datasets and mirror to the default dataset, or choose a single/separate-only output mode.",
                        "default": "auto"
                    },
                    "fieldPreset": {
                        "title": "Field preset",
                        "enum": [
                            "compact",
                            "standard",
                            "full"
                        ],
                        "type": "string",
                        "description": "Choose compact, standard, or full records. Full includes raw payload fragments.",
                        "default": "standard"
                    },
                    "dedupe": {
                        "title": "Deduplicate records",
                        "type": "boolean",
                        "description": "Skip duplicate canonical IDs within the run.",
                        "default": true
                    },
                    "incrementalMode": {
                        "title": "Incremental mode",
                        "type": "boolean",
                        "description": "Persist seen IDs in a key-value store and skip them in later runs.",
                        "default": false
                    },
                    "stateKey": {
                        "title": "State store name",
                        "type": "string",
                        "description": "Optional named key-value store for incremental state."
                    },
                    "maxConcurrency": {
                        "title": "Max concurrency",
                        "minimum": 1,
                        "maximum": 32,
                        "type": "integer",
                        "description": "Maximum number of TikTok targets processed at the same time.",
                        "default": 4
                    },
                    "requestRetryLimit": {
                        "title": "Request retry limit",
                        "minimum": 0,
                        "maximum": 10,
                        "type": "integer",
                        "description": "How many times to retry failed target requests before writing a structured error.",
                        "default": 2
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Proxy settings. Apify Proxy is recommended for TikTok."
                    },
                    "debugMode": {
                        "title": "Debug mode",
                        "type": "boolean",
                        "description": "Store raw HTML pages in the key-value store for diagnostics.",
                        "default": false
                    },
                    "saveRawItems": {
                        "title": "Save raw items",
                        "type": "boolean",
                        "description": "Include raw TikTok payload fragments in full output records and store raw pages.",
                        "default": false
                    },
                    "campaignId": {
                        "title": "Campaign ID",
                        "type": "string",
                        "description": "Optional provenance tag copied to every output record."
                    },
                    "clientId": {
                        "title": "Client ID",
                        "type": "string",
                        "description": "Optional provenance tag copied to every output record."
                    },
                    "labels": {
                        "title": "Labels",
                        "type": "array",
                        "description": "Optional provenance labels copied to every output record.",
                        "items": {
                            "type": "string"
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
