# TikTok Video Metadata Scraper (`w3crawler/tiktok-video-metadata-scraper`) Actor

Fetches public TikTok page state and oEmbed metadata for supplied video URLs. The current implementation does not expose or generate transcripts.

- **URL**: https://apify.com/w3crawler/tiktok-video-metadata-scraper.md
- **Developed by:** [w3crawler](https://apify.com/w3crawler) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 video metadata

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 Video Metadata Scraper

**TikTok Video Metadata Scraper** extracts source-backed metadata from public TikTok video pages for known video URLs. It resolves the canonical creator and video identity through the public page, oEmbed, or a bounded reader fallback, then writes normalized records with caption, media dimensions, engagement counts, sound, hashtags, and provenance. It does not log in, fetch private data, comments, or transcripts, or bypass access controls.

### Get started

1. Open the [Actor Store page](https://apify.com/w3crawler/tiktok-video-metadata-scraper) and select **Try for free** or open the **Input** tab.
2. Add canonical video URLs to `postUrls`. `maxPosts` defaults to 50 and caps how many pages are processed.
3. Keep the default timeout, retry, and delay for the first run.
4. Start the Actor, open the dataset, and export the saved records as JSON, CSV, or Excel. Open **Run summary** (`OUTPUT_SUMMARY`) to check the outcome and transport counts.

### Input

`postUrls` is required. Each entry is an object with a canonical `url`. Unsupported field names and out-of-range values are rejected before requests start.

| Field | Type | Required? | Default | Meaning |
| --- | --- | --- | --- | --- |
| `postUrls` | object array | Required | Not supplied | Public HTTPS TikTok video URLs, supplied as `[{ "url": "..." }]`. Duplicate URLs are removed. 1–50 items. |
| `maxPosts` | integer | Optional | `50` | Maximum unique post pages to process; the effective count is also limited by the number of `postUrls`. 1–50. |
| `requestTimeoutSecs` | integer | Optional | `15` | Timeout for each bounded direct, oEmbed, or reader-fallback request. 10–120 seconds. |
| `maxRequestRetries` | integer | Optional | `1` | Bounded retry count for direct page and oEmbed requests. The reader fallback is attempted once. 0–2. |
| `requestDelayMs` | integer | Optional | `250` | Delay between target pages; oEmbed fallback requests add a small bounded delay. 0–5000 ms. |
| `proxyConfiguration` | object | Optional | Not supplied | Optional Apify Proxy rotation or explicit HTTP(S) `proxyUrls`. The proxy is used for page and oEmbed requests and does not bypass access controls. |

Full default input:

```json
{
  "maxPosts": 50,
  "requestTimeoutSecs": 15,
  "maxRequestRetries": 1,
  "requestDelayMs": 250
}
```

The default input does not include required field `postUrls`; supply it before running.

The Actor reads public TikTok data. Optional `proxyConfiguration` uses standard Apify Proxy settings or explicit proxy URLs.

### Output

The dataset contains one row per saved public video. Optional information appears only when the source publishes it; missing values are omitted rather than inferred. No diagnostic or placeholder rows are written.

| Field | Type | Availability | Meaning |
| --- | --- | --- | --- |
| `recordType` | string | Always | Record discriminator; `tiktok_video_metadata` for normal rows. |
| `requestedUrl` | string | Always | Normalized video URL supplied in the input. |
| `postUrl` | string | Always | Canonical TikTok video URL when the creator identity is exposed; otherwise the requested URL. |
| `source` | string | Always | Source label; `tiktok.com`. |
| `sourcePageUrl` | string | Always | Public page URL used as provenance for the row. |
| `videoId` | string | Always | Numeric TikTok video identifier. |
| `pageTitle` | string | When published | Public page title. |
| `description` | string | When published | Public caption or video description. |
| `author` | string | When published | Creator display name or handle. |
| `authorId` | string | When published | Creator handle or identifier when exposed. |
| `authorUrl` | string | When published | Public creator profile URL as returned by the source. |
| `coverUrl` | string | When published | Public cover or thumbnail image URL. |
| `videoMediaUrl` | string | When published | Public media URL exposed by page state; it may expire. |
| `likeCount` | integer | When published | Public like count. |
| `commentCount` | integer | When published | Public comment count; comments themselves are not fetched. |
| `shareCount` | integer | When published | Public share count. |
| `playCount` | integer | When published | Public play/view count. |
| `durationSeconds` | integer | When published | Video duration in seconds. |
| `width` | integer | When published | Media width in pixels. |
| `height` | integer | When published | Media height in pixels. |
| `musicTitle` | string | When published | Public sound title. |
| `musicAuthor` | string | When published | Public sound author. |
| `musicUrl` | string | When published | Public TikTok sound URL as returned by the source. |
| `hashtags` | string array | When published | Up to 50 hashtags parsed from the caption or page state. |
| `commentsAvailable` | boolean | Always | `false`: this Actor does not expose a comments feed. |
| `commentsReason` | string | Always | Explanation of the comments limitation. |
| `extractionMethod` | string | Always | Route used, such as `page_state`, `page_state_plus_oembed`, `reader_page_plus_oembed`, `reader_markdown`, `oembed_only`, or `page_metadata`. |
| `scrapedAt` | string | Always | Time the row was saved, in ISO UTC. |

The example below is a real saved row from the 2026-10-24 run. Source-provided URLs are preserved exactly, including `http` links.

```json
{
  "recordType": "tiktok_video_metadata",
  "requestedUrl": "https://www.tiktok.com/@tiktok/video/6718335390845095173",
  "postUrl": "https://www.tiktok.com/@scout2015/video/6718335390845095173",
  "source": "tiktok.com",
  "sourcePageUrl": "https://www.tiktok.com/@scout2015/video/6718335390845095173",
  "videoId": "6718335390845095173",
  "pageTitle": "Scout, Suki & Stella on TikTok",
  "description": "Scramble up ur name & I’ll try to guess it😍❤️ #foryoupage#petsoftiktok#aesthetic",
  "author": "Scout, Suki & Stella",
  "authorId": "scout2015",
  "authorUrl": "http://www.tiktok.com/@scout2015",
  "coverUrl": "https://p19-common-sign.tiktokcdn-us.com/tos-maliva-p-0068/8ac0190d8ad54535bf823ed5f3202b6b~tplv-tiktokx-origin.image?dr=9636&x-expires=1793026800&x-signature=Hbsmwk9zgt2Ve0UQXgQGiImsmkM%3D&t=4d5b0474&ps=13740610&shp=81f88b70&shcp=43f4a2f9&idc=useast5",
  "likeCount": 35200,
  "commentCount": 5716,
  "durationSeconds": 10,
  "width": 325,
  "height": 578,
  "musicTitle": "original sound - tiff",
  "musicAuthor": "tiff",
  "musicUrl": "http://www.tiktok.com/music/original-sound-6689804660171082501",
  "hashtags": [
    "foryoupage",
    "petsoftiktok",
    "aesthetic"
  ],
  "commentsAvailable": false,
  "commentsReason": "TikTok public HTML and oEmbed do not expose a stable public comments feed through this Actor.",
  "extractionMethod": "reader_markdown",
  "scrapedAt": "2026-10-24T15:58:37.370Z"
}
```

### Run summary

**Run summary** is stored separately from the dataset in the run's key-value store under `OUTPUT_SUMMARY`. It records the outcome, routes, and counts; it is not a dataset row.

| Field | Meaning |
| --- | --- |
| `status` | `SUCCEEDED` when at least one row was saved; otherwise `FAILED`. |
| `dataStatus` | `COMPLETE` when all processed URLs produced rows, `PARTIAL` when some failed, or `FAILED` when none was saved. |
| `source` | Source label; `tiktok.com`. |
| `requestedPostCount` | Number of normalized input URLs before `maxPosts` is applied. |
| `processedPostCount` | Number of URLs attempted after `maxPosts` is applied. |
| `normalCount` | Video metadata rows saved to the dataset. |
| `diagnosticCount` | URLs or dataset writes that ended with a failure diagnostic. |
| `dataAvailable` | Whether at least one normal row was saved. |
| `commentsAvailable` | Always `false`; no comments feed is exposed. |
| `postCrawl` | Always `false`; no comments or post crawl is performed. |
| `proxyConfigured` | Whether proxy configuration was supplied. |
| `transportCounts` | Map of extraction route pairs, such as `reader_fallback+direct_oembed`, to counts. |
| `completedAt` | Time the summary was written, in ISO UTC. |
| `runStatus` | Canonical run status; always matches `status`. |

| Status | Data status | Meaning |
| --- | --- | --- |
| `SUCCEEDED` | `COMPLETE` | Every processed URL produced a row. |
| `SUCCEEDED` | `PARTIAL` | Some rows were saved and at least one URL failed. Saved rows remain available. |
| `FAILED` | `FAILED` | No usable row was saved. |

Example `OUTPUT_SUMMARY` from the saved run:

```json
{
  "status": "SUCCEEDED",
  "dataStatus": "COMPLETE",
  "source": "tiktok.com",
  "requestedPostCount": 1,
  "processedPostCount": 1,
  "normalCount": 1,
  "diagnosticCount": 0,
  "dataAvailable": true,
  "commentsAvailable": false,
  "postCrawl": false,
  "proxyConfigured": true,
  "transportCounts": {
    "reader_fallback+direct_oembed": 1
  },
  "completedAt": "2026-10-24T15:58:37.469Z",
  "runStatus": "SUCCEEDED"
}
```

### Coverage and limitations

The Actor reads public data for the video URLs you supply. It follows the public page, public oEmbed, and a bounded reader fallback; the chosen route determines which optional fields are available. It does not log in, fetch private accounts, comments, or transcripts, solve CAPTCHAs, or bypass access controls.

A URL may resolve to a different creator handle than the one in the requested URL when TikTok redirects or canonicalizes the post; `requestedUrl` preserves the input and `postUrl` records the resolved URL. Source-provided URLs can use `http` and are preserved as returned. Optional fields are omitted when the source does not publish them, and values are not inferred. Blocked, empty, or partial responses are reported in the run summary and logs rather than written as fabricated rows. Proxy use is optional and does not guarantee access.

### Usage and support

Each URL normally costs one public page request and may add an oEmbed or reader request, so retries, delays, and proxy traffic increase run time and compute. Start with a few URLs, inspect the dataset and summary, then scale gradually. See the Actor's Pricing tab for current account rates.

Use the [Actor Issues page](https://apify.com/w3crawler/tiktok-video-metadata-scraper/issues) to report a problem. Include the run ID, the input used, and the `OUTPUT_SUMMARY`; do not include tokens, cookies, or private data. This Actor is not affiliated with TikTok. Use it only for public data and in accordance with the applicable terms, robots guidance, and law. Public posts can contain personal information; use the output only for lawful purposes.

# Actor input Schema

## `postUrls` (type: `array`):

Public HTTPS TikTok video URLs. Duplicate URLs are removed before processing.

## `maxPosts` (type: `integer`):

Maximum unique post pages to process; the default is 50 and the effective count is also limited by postUrls.

## `requestTimeoutSecs` (type: `integer`):

Timeout for each bounded direct, oEmbed, or reader-fallback request.

## `maxRequestRetries` (type: `integer`):

Bounded retry count for direct TikTok page and oEmbed requests. Reader fallback is attempted once.

## `requestDelayMs` (type: `integer`):

Optional respectful delay between target pages; oEmbed fallback requests add a small bounded delay when needed.

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

Optional Apify Proxy rotation or explicit HTTP(S) proxy URLs. The selected proxy is used for TikTok page and oEmbed requests; proxies do not bypass access controls.

## Actor input object example

```json
{
  "postUrls": [
    {
      "url": "https://www.tiktok.com/@example_creator/video/1234567890"
    }
  ],
  "maxPosts": 50,
  "requestTimeoutSecs": 15,
  "maxRequestRetries": 1,
  "requestDelayMs": 250
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

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

Run status and counters stored by the Actor.

# 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 = {
    "postUrls": [
        {
            "url": "https://www.tiktok.com/@example_creator/video/1234567890"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("w3crawler/tiktok-video-metadata-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 = { "postUrls": [{ "url": "https://www.tiktok.com/@example_creator/video/1234567890" }] }

# Run the Actor and wait for it to finish
run = client.actor("w3crawler/tiktok-video-metadata-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 '{
  "postUrls": [
    {
      "url": "https://www.tiktok.com/@example_creator/video/1234567890"
    }
  ]
}' |
apify call w3crawler/tiktok-video-metadata-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,w3crawler/tiktok-video-metadata-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/5HOVlooCmxXVnD8fm/builds/IqDBjHUoFcks5Vwje/openapi.json
