# Tiktok Trending Videos Insights (`codebyte/tiktok-trending-videos-insights`) Actor

Extract trending TikTok videos data by region, time period, and engagement metrics. Perfect for content creators, marketers, and researchers tracking viral content.

- **URL**: https://apify.com/codebyte/tiktok-trending-videos-insights.md
- **Developed by:** [Codebyte](https://apify.com/codebyte) (community)
- **Categories:** Videos, Social media
- **Stats:** 402 total users, 7 monthly users, 100.0% runs succeeded, 21 bookmarks
- **User rating**: 1.00 out of 5 stars

## Pricing

$1.00 / 1,000 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 web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 Trending Videos Insights

### 🎯 Purpose

Extract valuable insights from trending TikTok videos to power your content strategy. This actor helps you discover what's currently popular on TikTok across different regions and time periods.

### ✨ Key Features

- **Regional Filtering**: Access trending content from specific countries
- **Flexible Time Ranges**: Filter videos by different time periods (e.g., last 7 days)
- **Customizable Sorting**: Order results by:
  - Views
  - Likes
  - Comments
  - Shares
- **Bulk Data**: Retrieve up to 500 trending videos in a single run

### 💡 Use Cases

- Content creators seeking trending topics and formats
- Marketing teams researching viral content patterns
- Social media managers planning content calendars
- Brands monitoring competitor performance
- Researchers analyzing TikTok trends

### 📊 Output Data

For each trending video, you'll receive:

- Video ID and URL
- Cover image URL
- Video duration
- Video title/description
- Country/region information

For the Video URL, TikTok Creative Center returns a placeholder username @mnm\_pipi.
TikTok routes video URLs based on the video ID, not the username.
The Video URL is valid and will resolve correctly but it does not contain the actual username for the video.

### 🔧 Input Configuration

Simple JSON configuration allows you to:

- Select target country
- Define time period
- Choose sorting metric
- Set result limit

### 🎯 Perfect For

- Social Media Managers
- Content Creators
- Digital Marketing Agencies
- Brand Strategists
- Market Researchers

Get data-driven insights to inform your TikTok strategy and stay ahead of trending content in your target market.

### Input

```json
{
    "country": "US",
    "period": "7",
    "order_by": "vv",
    "limit": 500
}
```

### Output

```json
[
    {
	    "country_code": "US",
	    "cover": "https://p16-sign-va.tiktokcdn.com/tos-maliva-p-0068c799-us/oAA9UFAKigdaBX64B43kZ4XiICiBRukJvUIOE~tplv-noop.image?x-expires=1736814853&x-signature=7rRK%2Becmb6DK4sIZ9zj4mF1dY2A%3D",
	    "duration": 27,
	    "id": "7458063335150374187",
	    "item_id": "7458063335150374187",
	    "item_url": "https://www.tiktok.com/@mnm_pipi/video/7458063335150374187",
	    "region": "United States",
	    "title": "#NaturesBountyPartner Supplements like this from @Nature’s Bounty and well-balanced meals are the key to optimal health! Learn more at naturesbounty.com. *These statements have not been evaluated by the Food and Drug Administration. This product is not intended to diagnose, treat, cure, or prevent any disease."
    },
    ...
]
```

![TikTok Trending Videos Insights Example Output](https://i.imghippo.com/files/qGH5834sxQ.png)

# Actor input Schema

## `country` (type: `string`):

Select the country for which you want to retrieve trending videos.

## `period` (type: `string`):

The period for which you want to retrieve trending videos.

## `order_by` (type: `string`):

The order in which the videos are retrieved.

## `limit` (type: `integer`):

The maximum number of videos to retrieve.

## Actor input object example

```json
{
  "country": "US",
  "period": "7",
  "order_by": "vv"
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("codebyte/tiktok-trending-videos-insights").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("codebyte/tiktok-trending-videos-insights").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 '{}' |
apify call codebyte/tiktok-trending-videos-insights --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=codebyte/tiktok-trending-videos-insights",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/an8OFVjsbtQaK2mT8/builds/JxGt0Tq1vqFyoMG3i/openapi.json
