crawl_config.json 4.09 KB
{
  "skill_name": "trend-scout-global",
  "version": "1.0.0",
  "crawl_time": "2026-04-13T02:40:00Z",
  "sources": [
    {
      "id": "tiktok_creative_center",
      "name": "TikTok Creative Center - Trending Hashtags",
      "type": "web_scraper",
      "endpoint": "https://ads.tiktok.com/business/en-US/solutions/tiktok-for-business/creative-center",
      "method": "GET",
      "headers": {
        "User-Agent": "Mozilla/5.0"
      },
      "parse_rules": {
        "list_selector": ".trend-item",
        "fields": {
          "name": ".trend-name",
          "posts": ".trend-posts",
          "growth": ".trend-growth"
        }
      },
      "rate_limit": {
        "requests_per_minute": 10,
        "sleep_ms": 3000,
        "respect_robots_txt": true
      },
      "priority": 1
    },
    {
      "id": "youtube_trending_global",
      "name": "YouTube Trending - Global",
      "type": "api",
      "endpoint": "https://www.googleapis.com/youtube/v3/videos",
      "method": "GET",
      "params": {
        "part": "snippet,statistics",
        "chart": "mostPopular",
        "maxResults": 50,
        "key": "${YOUTUBE_API_KEY}"
      },
      "headers": {
        "Accept": "application/json"
      },
      "parse_rules": {
        "list_path": "items",
        "fields": {
          "video_id": "id",
          "title": "snippet.title",
          "channel": "snippet.channelTitle",
          "view_count": "statistics.viewCount",
          "like_count": "statistics.likeCount"
        }
      },
      "rate_limit": {
        "requests_per_day": 10000,
        "requests_per_second": 10,
        "sleep_ms": 2000
      },
      "priority": 2
    },
    {
      "id": "x_twitter_search",
      "name": "X API - Trending Tweets",
      "type": "api",
      "endpoint": "https://api.twitter.com/2/tweets/search/recent",
      "method": "GET",
      "params": {
        "query": "#billionaire romance OR #vertical drama OR #interactive story -is:retweet",
        "max_results": 100,
        "tweet.fields": "public_metrics,created_at"
      },
      "headers": {
        "Authorization": "Bearer ${X_BEARER_TOKEN}"
      },
      "parse_rules": {
        "list_path": "data",
        "fields": {
          "tweet_id": "id",
          "text": "text",
          "created_at": "created_at",
          "like_count": "public_metrics.like_count",
          "retweet_count": "public_metrics.retweet_count"
        }
      },
      "rate_limit": {
        "requests_per_15min": 450,
        "sleep_ms": 3000
      },
      "priority": 3
    },
    {
      "id": "google_trends",
      "name": "Google Trends - Explore",
      "type": "web_scraper",
      "endpoint": "https://trends.google.com/trends/explore",
      "method": "GET",
      "params": {
        "q": "short drama,vertical drama,interactive story",
        "geo": "US"
      },
      "headers": {
        "User-Agent": "Mozilla/5.0"
      },
      "parse_rules": {
        "list_selector": ".trend-chart",
        "fields": {
          "term": "h3"
        }
      },
      "rate_limit": {
        "requests_per_minute": 10,
        "sleep_ms": 3000,
        "respect_robots_txt": true
      },
      "priority": 4
    },
    {
      "id": "reelshort_ranking",
      "name": "ReelShort In-App Popular",
      "type": "web_scraper",
      "endpoint": "https://www.reelshort.com/",
      "method": "GET",
      "headers": {
        "User-Agent": "Mozilla/5.0"
      },
      "parse_rules": {
        "list_selector": "[data-testid='drama-card']",
        "fields": {
          "title": ".drama-title",
          "tag": ".drama-tag"
        }
      },
      "rate_limit": {
        "requests_per_minute": 10,
        "sleep_ms": 3000,
        "respect_robots_txt": true
      },
      "priority": 5
    }
  ],
  "data_schema": {
    "required_fields": [
      "trend_id",
      "platform",
      "name",
      "source_url",
      "crawl_time"
    ],
    "optional_fields": [
      "region",
      "content_type",
      "rank",
      "views_or_posts",
      "growth_7d",
      "related_hashtags"
    ]
  },
  "output_format": {
    "file": "seed_data.json",
    "encoder": "json",
    "append_timestamp": true
  }
}