JSPM

tiktok-trends-api

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 9
  • Score
    100M100P100Q38519F
  • License MIT

TikTok hashtag volume over time via REST API. Weekly or daily series, period-over-period growth, and live TikTok trending hashtags. No TikTok API approval needed. Powered by trendsmcp.ai

Package Exports

  • tiktok-trends-api

Readme

tiktok-trends-api

TikTok hashtag volume over time via REST API. Weekly or daily series, period-over-period growth, and live TikTok trending hashtags. No TikTok API approval needed.

Get your free API key at trendsmcp.ai — 100 requests/month, no credit card.

Install

npm install tiktok-trends-api

Quick start

import { TrendsMcpClient } from "tiktok-trends-api";

const client = new TrendsMcpClient({ apiKey: "YOUR_API_KEY" });

// 5-year weekly time series
const series = await client.getTrends({
  source: "tiktok",
  keyword: "BookTok",
});
console.log(series[0]);
// { date: "2026-03-28", value: 72, volume: null, keyword: "BookTok", source: "tiktok" }

// Period-over-period growth
const growth = await client.getGrowth({
  source: "tiktok",
  keyword: "BookTok",
  percent_growth: ["3M", "1Y"],
});
console.log(growth.results[0]);
// { period: "3M", growth: 14.5, direction: "increase", ... }

// What's trending right now
const trending = await client.getTopTrends({ limit: 10 });
console.log(trending.data);
// [[1, "topic one"], [2, "topic two"], ...]

Methods

getTrends(params)

Returns a historical time series for a keyword. Defaults to 5 years of weekly data. Pass data_mode: "daily" for the last 30 days.

getGrowth(params)

Calculates percentage growth between two points in time. Pass preset strings ("3M", "1Y", "YTD", etc.) or custom date pairs.

Growth presets: 7D 14D 30D 1M 2M 3M 6M 9M 12M 1Y 18M 24M 2Y 36M 3Y 48M 60M 5Y MTD QTD YTD

getTopTrends(params?)

Returns today's live trending items. Omit type to get all feeds at once.

All supported sources

This package exposes the full TrendsMcpClient — all sources work, not just tiktok:

source Description
"google search" Google search volume
"google images" Google image search volume
"google news" Google News search volume
"google shopping" Google Shopping search volume
"youtube" YouTube search volume
"tiktok" TikTok hashtag volume
"reddit" Reddit mention volume
"amazon" Amazon product search volume
"wikipedia" Wikipedia page views
"news volume" News article mention volume
"news sentiment" News sentiment score
"npm" npm package weekly downloads
"steam" Steam concurrent players

Error handling

import { TrendsMcpClient, TrendsMcpError } from "tiktok-trends-api";

try {
  const series = await client.getTrends({ source: "tiktok", keyword: "BookTok" });
} catch (err) {
  if (err instanceof TrendsMcpError) {
    console.error(err.status);  // 429
    console.error(err.code);    // "rate_limited"
    console.error(err.message);
  }
}

License

MIT