# TikTok Post Metadata Scraper (`w3crawler/tiktok-post-metadata-scraper`) Actor

Extract public TikTok video metadata from post pages and oEmbed, and report clearly that comments are not available through this implementation.

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

## Pricing

from $2.99 / 1,000 post 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 Post Metadata Scraper

**TikTok Post Metadata Scraper** returns source-backed metadata for known public TikTok video URLs. It first queries the public TikWM post resolver; if that resolver is unavailable, it reads the public TikTok video page and the public oEmbed representation as a bounded fallback. Saved rows carry video identity, creator, caption, cover, engagement counts, sound details, hashtags, provenance, and an explicit notice that this Actor does not fetch comments.

### Get started

1. Open the [Actor Store page](https://apify.com/w3crawler/tiktok-post-metadata-scraper) and select **Try for free** or open the **Input** tab.
2. Add one or more canonical video URLs to `postUrls`. `maxPosts` defaults to 20 and caps how many are processed.
3. Keep the default timeouts, 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, transport, and counts.

### Input

`postUrls` is required. Unsupported field names and out-of-range values are rejected before requests start.

| Field | Type | Required? | Default | Meaning |
| --- | --- | --- | --- | --- |
| `postUrls` | string array | Required | Not supplied | One to 50 public HTTPS TikTok video URLs. 1–50 items. |
| `maxPosts` | integer | Optional | `20` | Global maximum unique post URLs to process. 1–50. |
| `requestTimeoutSecs` | integer | Optional | `20` | Timeout for each resolver, page, or oEmbed request. 10–120 seconds. |
| `maxRequestRetries` | integer | Optional | `1` | Bounded retry count for resolver and page requests. 0–2. |
| `requestDelayMs` | integer | Optional | `0` | Delay before each post URL is processed. 0–5000 ms. |
| `proxyConfiguration` | object | Optional | Not supplied | Optional Apify Proxy configuration used for resolver, page, and oEmbed requests. It does not bypass access controls. |

Full default input:

```json
{
  "maxPosts": 20,
  "requestTimeoutSecs": 20,
  "maxRequestRetries": 1,
  "requestDelayMs": 0
}
```

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

The Actor reads public TikTok data. The optional `proxyConfiguration` uses standard Apify Proxy settings.

### Output

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

| Field | Type | Availability | Meaning |
| --- | --- | --- | --- |
| `postUrl` | string | Always | Requested public TikTok video URL. |
| `source` | string | Always | Source label; `tiktok.com` for normal records. |
| `sourcePageUrl` | string | Always | Public URL that produced the record: the requested video URL or the final page URL. |
| `videoId` | string | Always | Numeric TikTok video identifier. |
| `pageTitle` | string | When published | Public page or author title, such as `Author on TikTok`. |
| `description` | string | When published | Public caption or video description. |
| `author` | string | When published | Public creator nickname or handle. |
| `authorUrl` | string | When published | Public creator profile URL. |
| `coverUrl` | string | When published | Public video cover image URL. |
| `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 count. |
| `durationSeconds` | integer | When published | Public video duration in seconds. |
| `width` | integer | When published | Public video width in pixels when the resolver reports it. |
| `height` | integer | When published | Public video height in pixels when the resolver reports it. |
| `musicTitle` | string | When published | Public sound title. |
| `musicAuthor` | string | When published | Public sound creator label. |
| `musicUrl` | string | When published | Public TikTok music URL. |
| `hashtags` | string array | When published | Up to 50 hashtags parsed from the caption or structured page state. |
| `commentsAvailable` | boolean | Always | `false`: this Actor does not fetch a comments feed. |
| `commentsReason` | string | Always | Explanation of the comment limitation for this Actor. |
| `scrapedAt` | string | Always | Time the row was saved, in ISO UTC. |

The example below is the complete saved row from the 2026-10-25 run. `width` and `height` were not returned for this post, so those keys are absent. The requested URL uses the `@tiktok` handle while the resolver reports a `@scout2015` author; `postUrl` preserves the request and `authorUrl` records the resolved creator.

```json
{
  "postUrl": "https://www.tiktok.com/@tiktok/video/6718335390845095173",
  "source": "tiktok.com",
  "sourcePageUrl": "https://www.tiktok.com/@tiktok/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",
  "authorUrl": "https://www.tiktok.com/@scout2015",
  "coverUrl": "https://p16-common-sign.tiktokcdn-us.com/tos-maliva-p-0068/8ac0190d8ad54535bf823ed5f3202b6b~tplv-tiktokx-shrink-aq:360:360:q75.webp?dr=11731&refresh_token=d05cff9a&x-expires=1793044800&x-signature=GzqJaG22pdnt%2FQE5FDdrkjeRh6A%3D&t=bacd0480&ps=d97f9a4f&shp=d05b14bd&shcp=1d1a97fc&idc=useast5&biz_tag=tt_video&s=AWEME_DETAIL&sc=feed_cover",
  "likeCount": 35200,
  "commentCount": 5716,
  "shareCount": 1518,
  "playCount": 159674,
  "durationSeconds": 10,
  "musicTitle": "original sound - tiffanie.yunque",
  "musicAuthor": "tiff",
  "musicUrl": "https://www.tiktok.com/music/6689804660171082501",
  "hashtags": [
    "foryoupage",
    "PetsOfTikTok",
    "aesthetic"
  ],
  "commentsAvailable": false,
  "commentsReason": "TikTok public comments are not fetched by this Actor.",
  "scrapedAt": "2026-10-25T20:45:17.515Z"
}
```

### Run summary

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

| Field | Meaning |
| --- | --- |
| `status` | `SUCCEEDED` when at least one post row was saved; `FAILED` when none was saved. |
| `dataStatus` | `COMPLETE` when every processed URL produced a row, `PARTIAL` when at least one failed, or `FAILED` when no row was saved. |
| `source` | Source label; `tiktok.com`. |
| `requestedPostCount` | Number of URLs supplied in `postUrls`. |
| `processedPostCount` | Number of URLs attempted after `maxPosts` is applied. |
| `normalCount` | Number of post rows saved to the dataset. |
| `diagnosticCount` | Number of URLs that ended with a failure diagnostic. |
| `failedRequestCount` | Number of URLs that could not produce a normal row. |
| `commentsAvailable` | Always `false`; this Actor does not fetch comments. |
| `fixtureMode` | Whether a local test fixture was used instead of live requests. |
| `transport` | Route used: `tikwm_public_api`, `tikwm_apify_proxy`, `direct_http`, `apify_proxy`, `fixture`, `mixed`, or `none`. |
| `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 post row. |
| `SUCCEEDED` | `PARTIAL` | Some post rows were saved and at least one URL failed. Saved rows remain available. |
| `FAILED` | `FAILED` | No post row was saved. Failure details remain in the run log and counts. |

Example `OUTPUT_SUMMARY` from the 2026-10-25 run:

```json
{
  "status": "SUCCEEDED",
  "dataStatus": "COMPLETE",
  "source": "tiktok.com",
  "requestedPostCount": 1,
  "processedPostCount": 1,
  "normalCount": 1,
  "diagnosticCount": 0,
  "failedRequestCount": 0,
  "commentsAvailable": false,
  "fixtureMode": false,
  "transport": "tikwm_public_api",
  "completedAt": "2026-10-25T20:45:17.607Z",
  "runStatus": "SUCCEEDED"
}
```

### Coverage and limitations

The Actor reads public TikTok data. The TikWM resolver is tried first because it exposes a compact public post object; when it is unavailable or returns a different video ID, the Actor falls back to the public video page and oEmbed. It does not log in, access private profiles, fetch comments, download video files, or generate transcripts. Resolver and page availability can change between runs, and the saved counts are point-in-time values.

`commentsAvailable` is always `false` and `commentsReason` explains why; no comment rows are produced. Optional fields are omitted when neither route publishes them, and values are not inferred. Blocked, empty, or partial responses are reflected in `OUTPUT_SUMMARY` instead of being written as fabricated dataset rows. Apify Proxy is optional and does not bypass access controls.

### Usage and support

Each URL normally costs one TikWM request. If the resolver fails, the Actor can make one public page request and one oEmbed request instead, so retries, delays, and proxy traffic increase run time and compute. Start with a few URLs, inspect the dataset and run summary, then scale gradually. See the Actor's Pricing tab for current account rates.

Use the [Actor Issues page](https://apify.com/w3crawler/tiktok-post-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 or TikWM. 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`):

One to 50 public HTTPS TikTok video URLs.

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

Global maximum unique post URLs to process.

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

Bounded timeout for each public page request.

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

Bounded retry count for public page requests.

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

Respectful delay before each source request.

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

Optional Apify Proxy configuration. If supplied, it is wired into page and oEmbed requests; it does not bypass access controls.

## Actor input object example

```json
{
  "postUrls": [
    "https://www.tiktok.com/@creator/video/1234567890"
  ],
  "maxPosts": 20,
  "requestTimeoutSecs": 20,
  "maxRequestRetries": 1,
  "requestDelayMs": 0
}
```

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

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

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,w3crawler/tiktok-post-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/rdmaN8QKONA0MrZgs/builds/6ouq4Ywll6DMTXLza/openapi.json
