跳到正文
DEV Community· Omar Khandji·· 3 小時前AI 評分56

用 Apify Actors 每日追蹤 TikTok、Instagram 標籤及 X 的品牌提及,只顯示新貼文

One daily brand-mention check across TikTok, Instagram hashtags and X, with only the new posts

AI 導讀

Omar Khandji 提供一套以 Apify Actors 每日搜尋 TikTok 關鍵字、Instagram 標籤及 X 貼文的流程,開啟 monitorEnabled 後只回傳新貼文。

正文

A brand team that wants to know "what was posted about us yesterday" usually checks three apps by hand, or pays for one social-listening tool that covers one network well and the others badly. The part that wastes time is not the search. It is seeing the same posts again every day.

The short answer: run one small script every morning that asks three Apify Actors for your keyword and hashtag, with "only new results" switched on. After the first run, each run returns only posts it has not delivered before.

The three Actors

  • TikTok keyword search: om_kh/tiktok-search-scraper (input: keywords)
  • Instagram hashtag posts: om_kh/instagram-hashtag-scraper (input: hashtags, written without the #)
  • X (Twitter) search: om_kh/twitter-x-search-scraper (input: keywords)

None of them needs a login, cookies or an X API key. All three take the same two switches that matter here: monitorEnabled (return only new posts) and monitorId (a name you choose, so two targets never share their memory).

The script

from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

jobs = {
    "om_kh/tiktok-search-scraper": {"keywords": ["your brand"]},
    "om_kh/instagram-hashtag-scraper": {"hashtags": ["yourbrand"]},
    "om_kh/twitter-x-search-scraper": {"keywords": ["your brand"]},
}

for actor, run_input in jobs.items():
    run_input.update({
        "monitorEnabled": True,
        "monitorId": "brand-daily",
        "maxTotalChargeUsd": 1.0,   # hard ceiling on this robot's own fee
    })
    run = client.actor(actor).call(run_input=run_input)
    items = client.dataset(run["defaultDatasetId"]).list_items().items
    print(actor, len(items), "new posts")
    for post in items[:3]:
        print("  ", post["url"])

The first monitored run stores a baseline and delivers nothing new to pay for. From the second run on, you only get what appeared since.

What a row looks like

Every row has the same core names on all three networks, so one spreadsheet can hold them: url, text, author, published_at. Then the network-specific counters:

Network Counters in the row
TikTok plays (views), score (likes), comments, shares, bookmarks, followers of the creator, hashtags
Instagram score (likes), commentsCount, type (image, carousel), locationName, every carousel image in childPosts_displayUrl
X favouriteCount, repostCount, replyCount, quoteCount

Two details from the real rows in the READMEs: on Instagram score is -1 when the author hides likes, and on X published_at is a millisecond timestamp (timestamp holds the same number as a number). Each row also keeps the supplier's full row in source_data.

Run it on a schedule with Make or n8n

You do not need to host the script. In Make or n8n use the Apify module or node:

  1. Run an Actor: pick one of the three, paste the same input, keep monitorEnabled on.
  2. Get Dataset Items: read the run's default dataset.
  3. Google Sheets, Add a row: map url, text, author, published_at and the counters.

Put a daily schedule on the scenario. Because only new posts come back, the sheet grows by the day's posts and never repeats a row.

What it costs

Prices are per post delivered, at the Free plan rate (paid Apify plans pay less). Today: TikTok $0.005 per video, Instagram $0.006 per post, X $0.001 per post. The Actors' own fees drop on 16 December 2026 at 16:00 UTC: TikTok to $0.00025, Instagram to $0.001, X to $0.00032. Scheduled monitoring adds a check fee per target per run, only when monitorEnabled is on (today $0.10 for TikTok and Instagram, $0.05 for X, then $0.005 for all three from 16 December). Each run also has a $0.001 start fee, and the first 10 results of every run are free of the Actor's fee. Apify also bills a supplier Actor that each robot runs for you, at its own price, which the README of each Actor states. Check the live prices on each Store page before you schedule it.

Use it from an AI agent

All three work through the Apify MCP server, so an agent in Claude or Cursor can run "what was posted about my brand on TikTok today" without any code.

Guide index with the other tutorials: https://omarkhandji-commits.github.io/apify-actor-catalogue/guides/

Store pages: TikTok, Instagram hashtags, X search.

Disclosure: I built these Actors.

來源:DEV Community · dev.to