100 free credits. No credit card required. Get a key

Track brand mentions across Reddit, X, TikTok and YouTube in 50 lines

A complete Node script that finds new mentions of your brand on four platforms, dedupes them and prints a digest. About five credits a run, so hourly checks cost a few dollars a month.

Shivansh Mehendiratta4 min read

Social listening tools start at a few hundred dollars a month. If what you actually need is “tell me when someone talks about us”, that is four search calls and a file to remember what you have already seen. Here is the whole thing.

What it does

  • Reddit: newest posts matching your brand (reddit.search.posts, sorted by new).
  • YouTube: videos uploaded this week (youtube.search.videos with upload_date: week).
  • TikTok: videos matching the query (tiktok.search.videos), kept if they are under a week old.
  • X: posts on x.com that Google indexed in the last day (google.search.web with site:x.com and tbs: qdr:d). More on why below.
  • It normalises each hit to { id, at, author, text, url }, skips anything older than a week or already seen, prints the rest and saves the seen ids to a JSON file.

The script

Node 18 or later, no dependencies. Put your key in GROUNDSOCIAL_API_KEY. Get a key: 100 free credits, no card.

mentions.mjs
// node mentions.mjs "your brand"   (Node 18+, GROUNDSOCIAL_API_KEY in the environment)
import { existsSync, readFileSync, writeFileSync } from 'node:fs'

const BRAND = process.argv[2] ?? 'supabase'
const headers = { Authorization: `Bearer ${process.env.GROUNDSOCIAL_API_KEY}` }

async function get(path, params) {
  const res = await fetch(`https://api.groundsocial.dev/v1${path}?${new URLSearchParams(params)}`, { headers })
  const body = await res.json()
  if (!res.ok) throw new Error(`${path}: ${body.error.code}: ${body.error.hint}`)
  return body
}

const sources = {
  reddit: async () => (await get('/reddit/search/posts', { q: BRAND, sort: 'new', limit: 50 }))
    .data.children.map(({ data: p }) => ({ id: p.id, at: p.created_utc, author: p.author,
      text: p.title, url: `https://www.reddit.com${p.permalink}` })),
  youtube: async () => (await get('/youtube/search', { q: BRAND, type: 'video', upload_date: 'week' }))
    .items.map((v) => ({ id: v.id.videoId, at: Date.parse(v.snippet.publishedAt) / 1000,
      author: v.snippet.channelTitle ?? '?', text: v.snippet.title, url: `https://youtu.be/${v.id.videoId}` })),
  tiktok: async () => (await get('/tiktok/search/videos', { q: BRAND }))
    .itemList.map((v) => ({ id: v.id, at: v.createTime, author: v.author.uniqueId,
      text: v.desc, url: `https://www.tiktok.com/@${v.author.uniqueId}/video/${v.id}` })),
  // X search reads X's logged-in app and is not switched on yet; Google's index of x.com is.
  x: async () => ((await get('/google/search', { q: `site:x.com ${BRAND}`, tbs: 'qdr:d' })).organic ?? [])
    .filter((r) => /x\.com\/\w+\/status\/\d+/.test(r.link))
    .map((r) => ({ id: r.link.split('/status/')[1], at: Date.now() / 1000,
      author: r.link.split('/')[3], text: r.snippet, url: r.link })),
}

const seenFile = `seen-${BRAND.replace(/\W+/g, '-')}.json`
const seen = new Set(existsSync(seenFile) ? JSON.parse(readFileSync(seenFile, 'utf8')) : [])
const weekAgo = Date.now() / 1000 - 7 * 86400

for (const [platform, fetchMentions] of Object.entries(sources)) {
  const mentions = await fetchMentions().catch((e) => (console.error(e.message), []))
  for (const m of mentions) {
    if (seen.has(`${platform}:${m.id}`) || m.at < weekAgo) continue
    seen.add(`${platform}:${m.id}`)
    console.log(`[${platform}] ${m.author}: ${m.text.replace(/\s+/g, ' ').slice(0, 90)}\n  ${m.url}`)
  }
}
writeFileSync(seenFile, JSON.stringify([...seen]))

Run it

bash
export GROUNDSOCIAL_API_KEY=gs_live_...
node mentions.mjs supabase

The first run on 26 November 2026 printed 63 mentions from the past week: 35 Reddit posts, 16 YouTube videos, 11 TikToks and one X post. A few of them:

text
[reddit] fervent7: PostgreSQL persistent task queue: concurrency, idempotency and restart recovery
  https://www.reddit.com/r/codereview/comments/1y6b5t7/postgresql_persistent_task_queue_concurrency/
[youtube] James NoCode: Learn 90% Of Supabase In Under 25 Minutes (2026 Tutorial)
  https://youtu.be/Pp6aTBoD0DM
[tiktok] jordanrobertsai: What is Supabase? It’s where your app keeps its data: clients, bookings, messages. Free to
  https://www.tiktok.com/@jordanrobertsai/video/7712566284847697174
[x] supabase: Supabase@supabaseFollow. The Postgres development platform. supabase.com ⭐️ github.com/sup
  https://x.com/supabase/status/2125734115026640996

The second run, a few minutes later, printed only the six posts that had appeared in between. That is the point of the seen file.

What it costs

CallCredits
Reddit search2
YouTube search1
TikTok search1
Google search (X posts)1
One run5

Hourly from cron is 3,600 credits a month: $3.60 on the $10.00 for 10,000 credits pack, less on bigger ones. Failed calls are refunded, and credits do not expire.

bash
0 * * * * cd ~/mentions && node mentions.mjs supabase >> digest.log

Why X goes through Google

We have an X search endpoint (x.search.tweets, 10 credits) but it reads X’s logged-in web app, and it is not switched on yet: today it answers 503 upstream_unavailable and charges nothing. Until it is, Google’s index of x.com is a good-enough net for a daily digest. It misses posts Google has not crawled, and it cannot see replies well. If X matters most to you, add the accounts you care about with x.user.tweets (1 credit for their latest posts) and filter those for your name.

Making it better

  • Cut noise on Reddit with match: exact (the phrase must appear in the title or text) or subreddit to stay in your niche.
  • Add comments: reddit.search.comments finds the mentions buried in threads, which is where most honest feedback lives.
  • Send the digest to Slack: replace console.log with a POST to an incoming webhook.
  • Score it: pass each new mention to a model with “is this a question, a complaint, praise or noise?” and only alert on the first two.
  • Add Bluesky (bluesky.search.posts) and Threads (threads.search.posts), one credit each, with the same four-line mapping.

Try it on your own data

One key for Reddit, X, TikTok, YouTube, Instagram, Google and more, over REST or MCP. Free credits on signup, no card.