ScavioScavio
产品定价文档
登录开始使用
  1. 首页
  2. 教程
  3. 如何使用 Scavio TikTok API 查找获胜的 TikTok 产品
教程

如何使用 Scavio TikTok API 查找获胜的 TikTok 产品

使用主题标签和视频搜索 API 查找热门 TikTok 产品。通过参与速度、主题标签增长和创作者采用模式来识别病毒式产品。

获取免费API密钥API文档

获胜的 TikTok 产品遵循可预测的模式:话题标签激增,创作者采用率随之上升,销量在 72 小时内激增。本教程使用 Scavio TikTok API 以编程方式检测该模式 - 扫描主题标签以了解参与速度、与视频内容交叉引用,并在趋势达到顶峰之前根据病毒潜力对产品进行评分。

前置条件

  • Python 3.11+ 或 Node.js 20+
  • 来自 https://scavio.dev 的 Scavio API 密钥
  • 对 TikTok 内容趋势的基本了解
  • 可选:用于跟踪结果的电子表格或数据库

操作指南

步骤 1: 搜索产品信号的热门标签

使用 Scavio TikTok 主题标签端点查找最近在产品相关领域增长迅速的主题标签。过滤包含产品意图关键字的主题标签。

Python
import httpx
from datetime import datetime

SCAVIO_API_KEY = "your-api-key"
BASE_URL = "https://api.scavio.dev/api/v1/tiktok"

PRODUCT_NICHES = [
    "kitchen gadget",
    "beauty tool",
    "home organization",
    "fitness accessory",
    "phone accessory",
    "cleaning hack",
]

async def search_trending_hashtags(niche: str) -> list[dict]:
    async with httpx.AsyncClient(timeout=15) as client:
        resp = await client.post(
            f"{BASE_URL}/hashtag/search",
            headers={"Authorization": f"Bearer {SCAVIO_API_KEY}"},
            json={"query": niche, "limit": 20}
        )
        resp.raise_for_status()
        hashtags = resp.json().get("hashtags", [])
        # Filter for hashtags showing growth
        trending = [
            h for h in hashtags
            if h.get("view_count", 0) > 100000
        ]
        return sorted(trending, key=lambda h: h.get("view_count", 0), reverse=True)

步骤 2: 获取每个热门主题标签的热门视频

对于每个有前途的主题标签,提取表现最好的视频来分析内容中出现的产品以及创作者如何呈现它们。

Python
async def fetch_hashtag_videos(hashtag_name: str, limit: int = 10) -> list[dict]:
    async with httpx.AsyncClient(timeout=15) as client:
        resp = await client.post(
            f"{BASE_URL}/video/search",
            headers={"Authorization": f"Bearer {SCAVIO_API_KEY}"},
            json={"query": hashtag_name, "limit": limit}
        )
        resp.raise_for_status()
        videos = resp.json().get("videos", [])
        return [
            {
                "video_id": v.get("id"),
                "description": v.get("description", ""),
                "likes": v.get("likes", 0),
                "shares": v.get("shares", 0),
                "comments": v.get("comments", 0),
                "views": v.get("views", 0),
                "author": v.get("author", {}).get("username", ""),
                "created": v.get("created_at", ""),
                "engagement_rate": _calc_engagement(v)
            }
            for v in videos
        ]

def _calc_engagement(video: dict) -> float:
    views = video.get("views", 1)
    interactions = video.get("likes", 0) + video.get("shares", 0) + video.get("comments", 0)
    return round(interactions / views * 100, 2) if views > 0 else 0.0

步骤 3: 根据病毒潜力对产品进行评分

将主题标签增长、视频参与率和创作者多样性整合到一个病毒分数中。在多个创作者中得分较高的产品是最强烈的信号。

Python
def score_product(hashtag: dict, videos: list[dict]) -> dict:
    unique_creators = len(set(v["author"] for v in videos if v["author"]))
    avg_engagement = sum(v["engagement_rate"] for v in videos) / max(len(videos), 1)
    total_views = hashtag.get("view_count", 0)
    total_shares = sum(v["shares"] for v in videos)

    # Viral score: weighted combination
    score = (
        (min(unique_creators, 10) / 10) * 30 +  # creator diversity (30%)
        (min(avg_engagement, 15) / 15) * 30 +    # engagement rate (30%)
        (min(total_shares, 5000) / 5000) * 20 +   # share velocity (20%)
        (min(total_views, 10_000_000) / 10_000_000) * 20  # reach (20%)
    )

    return {
        "hashtag": hashtag.get("name", ""),
        "viral_score": round(score, 1),
        "unique_creators": unique_creators,
        "avg_engagement_rate": round(avg_engagement, 2),
        "total_views": total_views,
        "total_shares": total_shares,
        "top_video_description": videos[0]["description"][:200] if videos else "",
        "analyzed_at": datetime.now().isoformat()
    }

步骤 4: 运行完整的管道并输出排名结果

扫描所有利基市场,对每个产品信号进行评分,并输出按病毒分数排序的获胜产品的排名列表。

Python
import asyncio
import json

async def find_winning_products() -> list[dict]:
    all_products = []
    for niche in PRODUCT_NICHES:
        hashtags = await search_trending_hashtags(niche)
        for hashtag in hashtags[:5]:  # Top 5 per niche
            videos = await fetch_hashtag_videos(hashtag.get("name", ""))
            if videos:
                product = score_product(hashtag, videos)
                product["niche"] = niche
                all_products.append(product)

    # Sort by viral score
    all_products.sort(key=lambda p: p["viral_score"], reverse=True)
    return all_products

async def main():
    products = await find_winning_products()
    print(f"Analyzed {len(products)} product signals")
    print(f"Credits used: ~{len(products) * 2} ({len(products) * 2 * 0.005:.2f})")
    print("\nTop 5 Winning Products:")
    for i, p in enumerate(products[:5], 1):
        print(f"  {i}. [{p['niche']}] #{p['hashtag']} - Score: {p['viral_score']}")
        print(f"     Creators: {p['unique_creators']} | Engagement: {p['avg_engagement_rate']}%")
    print(json.dumps(products[:10], indent=2))

asyncio.run(main())

Python 示例

Python
import asyncio
import httpx

SCAVIO_API_KEY = "your-api-key"
BASE_URL = "https://api.scavio.dev/api/v1/tiktok"

async def main():
    async with httpx.AsyncClient(timeout=15) as client:
        # Search hashtags
        resp = await client.post(
            f"{BASE_URL}/hashtag/search",
            headers={"Authorization": f"Bearer {SCAVIO_API_KEY}"},
            json={"query": "kitchen gadget", "limit": 10}
        )
        hashtags = resp.json().get("hashtags", [])

        # Get videos for top hashtag
        if hashtags:
            top = hashtags[0]
            resp = await client.post(
                f"{BASE_URL}/video/search",
                headers={"Authorization": f"Bearer {SCAVIO_API_KEY}"},
                json={"query": top["name"], "limit": 5}
            )
            videos = resp.json().get("videos", [])
            creators = len(set(v.get("author", {}).get("username", "") for v in videos))
            print(f"Hashtag: #{top['name']}")
            print(f"Views: {top.get('view_count', 0):,}")
            print(f"Top videos: {len(videos)}")
            print(f"Unique creators: {creators}")

asyncio.run(main())

JavaScript 示例

JavaScript
const SCAVIO_API_KEY = "your-api-key";
const BASE_URL = "https://api.scavio.dev/api/v1/tiktok";

async function tiktokApi(endpoint, body) {
  const resp = await fetch(BASE_URL + "/" + endpoint, {
    method: "POST",
    headers: { "Authorization": "Bearer " + SCAVIO_API_KEY, "Content-Type": "application/json" },
    body: JSON.stringify(body)
  });
  return resp.json();
}

async function main() {
  const hashtagData = await tiktokApi("hashtag/search", { query: "kitchen gadget", limit: 10 });
  const hashtags = hashtagData.hashtags || [];
  if (hashtags.length === 0) { console.log("No hashtags found"); return; }

  const top = hashtags[0];
  const videoData = await tiktokApi("video/search", { query: top.name, limit: 5 });
  const videos = videoData.videos || [];
  const creators = new Set(videos.map(v => v.author?.username).filter(Boolean)).size;

  console.log("Hashtag: #" + top.name);
  console.log("Views:", top.view_count?.toLocaleString());
  console.log("Top videos:", videos.length);
  console.log("Unique creators:", creators);
}

main();

预期输出

JSON
Analyzed 30 product signals
Credits used: ~60 ($0.30)

Top 5 Winning Products:
  1. [kitchen gadget] #miniwaffle - Score: 72.5
     Creators: 8 | Engagement: 11.2%

相关教程

  • 如何通过 Scavio 搜索 API 将 YouTube 评论提取为结构化 JSON
  • 如何使用 Scavio 搜索 API 构建营销研究代理
  • 如何使用 Scavio 搜索 API 构建预算排名跟踪器

常见问题

大多数开发者在15到30分钟内完成本教程。您需要一个Scavio API密钥(免费套餐即可)和可用的Python或JavaScript环境。

Python 3.11+ 或 Node.js 20+. 来自 https://scavio.dev 的 Scavio API 密钥. 对 TikTok 内容趋势的基本了解. 可选:用于跟踪结果的电子表格或数据库. Scavio API密钥注册即送50个免费积分。

可以。免费套餐注册即送50个积分,完全足够完成本教程并构建一个可运行的原型解决方案。

Scavio提供原生LangChain包(langchain-scavio)、MCP服务器以及适用于任何HTTP客户端的REST API。本教程使用 the raw REST API, 但您可以根据需要适配您选择的框架。

相关资源

Best Of

最佳 TikTok 标签分析 API (2026)

Read more
Best Of

2026 年最佳无需身份验证的 TikTok 数据 API

Read more
Glossary

TikTok 非官方 API

Read more
Comparison

TikTok Proxy Scraping vs TikTok Third-Party API (Scavio, TikAPI)

Read more
Solution

TikTok

Read more
Glossary

TikTok API 合规与抓取对比

Read more

开始构建

使用主题标签和视频搜索 API 查找热门 TikTok 产品。通过参与速度、主题标签增长和创作者采用模式来识别病毒式产品。

获取免费API密钥阅读文档
ScavioScavio

面向AI智能体的实时搜索API。搜索所有平台,不仅仅是Google。

产品

  • 功能
  • 定价
  • 控制台
  • 联盟计划

开发者

  • 文档
  • API参考
  • 快速开始
  • MCP集成
  • Python SDK

替代方案

  • Tavily替代方案
  • SerpAPI替代方案
  • Firecrawl替代方案
  • Exa替代方案

工具

  • JSON格式化
  • cURL转代码
  • Token计数器
  • 全部工具

© 2026 Scavio. 保留所有权利。

Featured on TAAFT
服务条款隐私政策