# Social Trends Scraper — Unified TikTok & Instagram Reels (`subimpact/social-trends-hashtag-scraper`) Actor

Unified social trend scraper for TikTok & Instagram. Scrape trending videos, reels, captions, engagement metrics (likes, views, comments, shares), and creator details across platforms in a single run with a normalized schema.

- **URL**: https://apify.com/subimpact/social-trends-hashtag-scraper.md
- **Developed by:** [subimpact](https://apify.com/subimpact) (community)
- **Categories:** Social media, AI
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 social post extracteds

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

## Social Trends Hashtag Scraper — Unified TikTok & Instagram Reels

Extract trending **TikTok videos** and **Instagram Reels** across multiple hashtags and keywords in a single unified run with normalized cross-platform schema, creator details, and real-time engagement metrics.

**No social media login or cookies required.**

***

### ⚡ Why Use This Unified Social Trends Scraper?

- **Unified Cross-Platform Schema:** Stop writing separate parsers for TikTok and Instagram. Get consistent fields for `platform`, `id`, `url`, `caption`, `author`, `metrics` (likes, views, comments, shares), and `media`.
- **Save Over 30% with Pay-Per-Event:** Only pay **$0.0015 per post** ($1.50 per 1,000 posts). Compare with paying $2.00–$2.30/1,000 across multiple separate scrapers.
- **One Unified Run vs Multiple Tasks:** Replace disconnected cron tasks with one unified pipeline that monitors both TikTok and Instagram simultaneously.
- **Free Dry Run Validation:** Test query syntax and platform connectivity without spending a cent (`dryRun: true`).
- **Deduplication Built-In:** Automatic cross-platform deduplication guarantees no duplicate post IDs clutter your data.

***

### 📊 Normalized Output Schema

Every item pushed to your dataset follows this clean structure:

```json
{
  "platform": "tiktok",
  "hashtag": "malaysianfood",
  "id": "748937210928371",
  "url": "https://www.tiktok.com/@malayfoodie/video/748937210928371",
  "caption": "Best Nasi Lemak in KL! Must try authentic sambal #malaysianfood #klfoodie",
  "author": {
    "username": "malayfoodie",
    "name": "KL Food Explorer",
    "avatar": "https://p16-sign-va.tiktokcdn.com/...",
    "verified": false
  },
  "metrics": {
    "likes": 12500,
    "comments": 340,
    "shares": 1120,
    "views": 254000
  },
  "media": {
    "type": "video",
    "videoUrl": "https://v16-webapp-prime.tiktokcdn.com/...",
    "coverImageUrl": "https://p16-sign-va.tiktokcdn.com/...",
    "durationSec": 45
  },
  "publishedAt": "2026-10-08T12:00:00.000Z",
  "scrapedAt": "2026-10-10T00:30:00.000Z"
}
```

***

### 💰 Pay-Per-Event Pricing

You only pay for successful posts returned to your dataset:

| Event | Price (USD) | Description |
|---|---|---|
| **Social Post Extracted** (`social-post`) | **$0.0015** ($1.50 / 1,000) | Normalized TikTok video or Instagram reel with metrics and metadata |
| **Actor Start** (`apify-actor-start`) | **$0.00005** | Minimal one-time initialization fee per run |

*Volume tier discounts (up to 33% off) apply automatically on Silver, Gold, Platinum, and Diamond subscriptions.*

***

### 📥 Input Parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `hashtags` | `string[]` | *Required* | List of hashtags or search keywords to monitor (e.g. `["malaysianfood", "coffee"]`). `#` prefixes are stripped automatically. |
| `platforms` | `string[]` | `["tiktok", "instagram"]` | Target platforms to scrape: `tiktok`, `instagram`, or both. |
| `resultsLimit` | `integer` | `5` | Maximum items to extract per hashtag per selected platform (min: 1, max: 50). |
| `dryRun` | `boolean` | `false` | When `true`, validates inputs without scraping live posts or charging Pay-Per-Event fees. |
| `proxyConfiguration` | `object` | Residential | Proxy settings. Apify Residential proxies recommended for highest stability. |

***

### 💻 Code Integration Examples

#### Node.js / JavaScript

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });

const run = await client.actor('subimpact/social-trends-hashtag-scraper').call({
    hashtags: ['malaysianfood', 'klfoodie'],
    platforms: ['tiktok', 'instagram'],
    resultsLimit: 10
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Extracted ${items.length} trending posts!`);
```

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient('YOUR_APIFY_TOKEN')

run = client.actor('subimpact/social-trends-hashtag-scraper').call(run_input={
    'hashtags': ['malaysianfood', 'klfoodie'],
    'platforms': ['tiktok', 'instagram'],
    'resultsLimit': 10
})

dataset_items = client.dataset(run['defaultDatasetId']).list_items().items
for post in dataset_items:
    print(f"[{post['platform']}] {post['author']['username']}: {post['caption'][:60]}... ({post['metrics']['likes']} likes)")
```

# Actor input Schema

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

List of hashtags or search keywords to monitor (e.g. \['malaysianfood', 'coffee malaysia', 'travel']). '#' prefixes are automatically handled.

## `platforms` (type: `array`):

Select social media platforms to scrape.

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

Maximum number of posts/reels to collect per hashtag per selected platform.

## `dryRun` (type: `boolean`):

When enabled, verifies target connectivity without saving records or charging Pay-Per-Event fees.

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

Proxy settings. Residential proxies are recommended for bypassing anti-scraping protections.

## Actor input object example

```json
{
  "hashtags": [
    "malaysianfood",
    "coffee malaysia"
  ],
  "platforms": [
    "tiktok",
    "instagram"
  ],
  "resultsLimit": 5,
  "dryRun": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

No description

# 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 = {
    "hashtags": [
        "malaysianfood",
        "coffee malaysia"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("subimpact/social-trends-hashtag-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 = { "hashtags": [
        "malaysianfood",
        "coffee malaysia",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("subimpact/social-trends-hashtag-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 '{
  "hashtags": [
    "malaysianfood",
    "coffee malaysia"
  ]
}' |
apify call subimpact/social-trends-hashtag-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,subimpact/social-trends-hashtag-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/2JRAANmjqQnfQueLu/builds/c9U8KueXymlfdScw2/openapi.json
