# Tiktok Ads Intelligence (`opspilot.cc/tiktok-ads-intelligence`) Actor

📊 TikTok Ads Intelligence | Competitor Ads + Trending Hashtags See what ads your competitors are running on TikTok right now, which brands dominate your keyword, and which hashtags are trending up — in one run. Built for e-commerce sellers planning TikTok ad campaigns.

- **URL**: https://apify.com/opspilot.cc/tiktok-ads-intelligence.md
- **Developed by:** [wang wei](https://apify.com/opspilot.cc) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 92.9% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.25 / actor start

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/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 Ads Intelligence

See what ads your competitors are running on TikTok **right now** — and which hashtags are trending up — in one run. Enter a keyword and get the competitor ads currently spending in your niche (with CTR, days running, and creative copy), the top-performing ads across the platform, and the hashtags trending up in your target country.

Built for dropshippers and DTC sellers validating a niche before launching, media buyers studying winning creatives, and content planners picking hashtags with data.

### ✨ What you get

| Output | What it tells you | Decision it powers |
|---|---|---|
| **Competitor ads** (matched to your keyword) | Ad copy, brand, CTR, total likes, days running, video URL | Should I enter this niche? What offer/angle is saturated? |
| **Top ads spotlight** | Best-performing ads across TikTok with creative pattern highlights | What creative formats are working right now? |
| **Trending hashtags** | Top hashtags with popularity curves (latest / peak / growth) | Which tags should my organic + paid content ride? |
| **SUMMARY digest** | Unique brands, avg CTR, median video length, objective mix | A 5-second read of the competitive landscape |

### 💼 Use cases

- **Deciding whether a niche is already bought** — run your keyword against the market you actually intend to sell in and read `uniqueBrands` plus `avgCtr` in the SUMMARY. If the same four brands own every ad slot, you are entering their auction, not opening a new one.
- **Studying an offer that has already survived** — sort by `investmentDays`: an ad the platform has observed running for months is a validated offer, not a test that flopped. The `title` and `videoDurationSec` (22.89s in the sample run) tell you the format length and the angle to copy.
- **Catching a creative format while it is still climbing** — the top-ads spotlight flags creative patterns across the whole platform, which is how you spot a format rising in your category before every seller copies it.
- **Picking hashtags before they peak** — `popularity` reports `latest`, `peak` and `growthVsPeriodStart` per tag, so a tag that is still climbing is separable from one that already peaked inside your `hashtagTimeRange` window.

### ✅ Who this is for

- **Dropshippers and DTC sellers** who are about to commit inventory to a niche and need to know who is already paying to advertise there.
- **Paid media buyers** building a swipe file — the ads are live, current, and carry the platform's own `ctr` and `objective`, which is enough to brief a creative team.
- **Content planners choosing tags** who need a popularity curve rather than a raw post count, and who can act on a tag in its growth window.
- **Brand and agency teams running competitive reads** for a pitch or a category review, who need the current ad landscape in one dataset instead of a browser session.

### ❌ Who this is NOT for

- **Very narrow or brand-new niches** — the ad library often has nothing running for them. `totalAdsOnPlatform: 0` means TikTok has no active ad for that term, not that the niche has no demand. Broaden the keyword.
- **Anyone looking for spend, ROAS or conversions** — the output carries `ctr`, `likes`, `investmentDays` and `objective`. There is no spend figure and no sales figure anywhere in it, so nothing here is a profit forecast. Join it to your own backend.
- **Reading the result as a census of the competition** — what comes back is a ranking, not a market census. `order: for_you` and `order: likes` return different ad sets from the same keyword, and `adFormat` splits creator-run Spark Ads from brand-run ads, which are different buys. Choose the lens before you count.
- **Markets you are not advertising in** — `countryCode` selects the ad market, and prices and competitive density are market-specific. A US library read tells you nothing about GB, DE, SA or ID.
- **Organic performance or your own account** — this reads TikTok's ad library and the platform-wide hashtag trends. It says nothing about how a specific organic post or creator account performed.

### 🚀 Quick start

```json
{ "keyword": "postpartum belly band", "countryCode": "US", "maxAds": 20 }
```

You get keyword-matched competitor ads, the platform-wide top-ads spotlight, and trending hashtags — all in one dataset.

### 📥 Input parameters

| Field | Type | Default | Description |
|---|---|---|---|
| `keyword` | string | `fitness` | Search keyword for competitor ads. Max 100 chars. |
| `countryCode` | string | `US` | 2-letter country code of the ad market. |
| `period` | integer | `180` | How far back to look for ads (days, 1-365). |
| `maxAds` | integer | `20` | Max keyword-matched ads (1-100). |
| `adFormat` | select | all | `"1"` Spark Ads (creator posts) / `"2"` Non-Spark (brand-run). |
| `order` | select | `for_you` | `for_you` ranking or `likes`. |
| `includeSpotlight` | boolean | `true` | Include the top-performing ads feed. |
| `includeHashtagTrends` | boolean | `true` | Include trending hashtags. |
| `hashtagTimeRange` | select | `"7"` | Hashtag trend window: `"7"` / `"30"` / `"90"` days. |
| `maxHashtags` | integer | `20` | Max hashtags (0-100). |

### 📤 Output

Dataset items:

- **`ad`** — `adId`, `title`, `brand`, `objective`, `industry`, `ctr`, `likes`, `investmentDays`, `highlight` (spotlight only), `videoDurationSec`, `coverUrl`, `videoUrl`
- **`hashtag`** — `hashtagId`, `name`, `popularity: { latest, peak, growthVsPeriodStart, daysTracked }`

#### Example item

```json
{
    "type": "ad",
    "source": "search",
    "adId": "7299256737999372290",
    "title": "Join 1000+ subscribers… #fitness #gymtok",
    "brand": "FitClub",
    "objective": "campaign_objective_conversion",
    "ctr": 0.12,
    "likes": 35111,
    "investmentDays": 2,
    "videoDurationSec": 22.89
}
```

#### Run summary

The **SUMMARY** key-value store entry holds: `keyword`, `countryCode`, `totalAdsOnPlatform`, `adsReturned`, `avgCtr`, `medianVideoDurationSec`, `uniqueBrands`, `topBrands[]`, `objectiveMix`, `topHashtags[]`, `apiCalls`, `warnings[]`.

### ⚙️ How it works

1. **Ad library search** — queries the TikTok ad library live for your keyword + market; results are minutes old, not cached dumps.
2. **Spotlight & hashtags** — pulls the top-performing ads feed (with creative notes) and the hashtag popularity curves for your chosen window.
3. **Digest** — aggregates brands, CTR, objective mix into a SUMMARY you can read in 5 seconds.

### 💰 Billing

Pay-per-result on the Apify platform — you only pay for what you run. **There is no daily run cap.**

### ❓ FAQ

**How fresh is the data?** Every run queries the ad library live — results are minutes old, not cached dumps.

**What does `investmentDays` mean?** It's the platform's own `cost` field: the number of days the ad has been observed running. High values = proven, stable campaigns worth studying.

**Why are some keyword searches empty?** Very narrow keywords may have no active ads. The SUMMARY reports `totalAdsOnPlatform` honestly — if it's 0, broaden your keyword. We never invent placeholder rows.

**Can I use this for markets other than the US?** Yes — pass any 2-letter country code (e.g. `GB`, `DE`, `SA`, `ID`).

### 📚 Resources

- [Changelog](./CHANGELOG.md)
- [Apify API docs](https://docs.apify.com/api/v2) — export results as JSON / CSV / XML
- Feedback: open an issue on this actor's Issues tab

*Built by [opspilot.cc](https://opspilot.cc).*

# Changelog

This Actor's version history is a separate document: https://apify.com/opspilot.cc/tiktok-ads-intelligence/changelog.md

# Actor input Schema

## `keyword` (type: `string`):

Search keyword for competitor ads, e.g. 'postpartum belly band' or 'fitness'. Max 100 characters.

## `countryCode` (type: `string`):

2-letter country code of the ad market to analyze. Default: US.

## `period` (type: `integer`):

How far back to look for ads, in days. Default 180.

## `maxAds` (type: `integer`):

Maximum number of keyword-matched ads to return (1-100). Default 20.

## `adFormat` (type: `string`):

Optional. 1 = Spark Ads (creator posts), 2 = Non-Spark Ads (brand-run). Leave default for all formats.

## `order` (type: `string`):

Ranking of matched ads. Default: for_you (recommendation ranking).

## `includeSpotlight` (type: `boolean`):

Also return the cross-industry top-performing ads feed with creative pattern notes. Default: true.

## `includeHashtagTrends` (type: `boolean`):

Also return trending hashtags with popularity curves for the country. Default: true.

## `hashtagTimeRange` (type: `string`):

Time range for hashtag trends: 7, 30, or 90 days. Default 7.

## `maxHashtags` (type: `integer`):

Maximum number of trending hashtags to return (0-100). Default 20.

## Actor input object example

```json
{
  "keyword": "fitness",
  "countryCode": "US",
  "period": 180,
  "maxAds": 20,
  "order": "for_you",
  "includeSpotlight": true,
  "includeHashtagTrends": true,
  "hashtagTimeRange": "7",
  "maxHashtags": 20
}
```

# Actor output Schema

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

Dataset items: competitor ads, spotlight ads, and trending hashtags. SUMMARY key-value entry holds the run-level decision digest.

## `summary` (type: `string`):

Run-level summary record in the default key-value store.

# 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("opspilot.cc/tiktok-ads-intelligence").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("opspilot.cc/tiktok-ads-intelligence").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 '{}' |
apify call opspilot.cc/tiktok-ads-intelligence --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,opspilot.cc/tiktok-ads-intelligence"
        }
    }
}
```

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/m1oRRcYgrY7CpcLgd/builds/RQ8pVUmJW0c9vxpfu/openapi.json
