Brand monitoring

Find the right search route with Ask, then search TikTok, X, YouTube and Reddit for your brand on a schedule, keep only the posts you haven't seen and budget the credits

This recipe finds public posts that mention a brand on TikTok, X, YouTube and Reddit. You ask once in plain words to find the right search route, then call each platform's search on a schedule and keep only the posts you haven't seen before. The examples search for Liquid Death, a drinks brand, and every screenshot comes from a real run.

Without code: a monitor

If you only need one keyword on Reddit, TikTok or X, a monitor does the polling for you. It runs the search on a schedule and sends each post it hasn't seen before to a webhook, with no scheduler or database of your own. See Let a monitor do it below.

Use this recipe when you want several platforms in one place, YouTube results, or your own rules for what counts as new.

What you'll need

  • An API key. The Quickstart shows how to create one.
  • The TypeScript SDK: npm install @socialfetch/sdk.
  • Somewhere to run code on a schedule (a cron job, a serverless function or a worker) and somewhere to store what you've seen.

What it costs

Each search costs 1 credit when it completes, including when it finds nothing. Searches that fail on our side cost nothing. Asking in plain words is free, but Ask runs the search it picks, and that search is billed.

One poll of the four platforms below is 4 credits. To estimate a day:

platforms × keywords × polls a day = credits a day
4 × 3 × 24 (hourly)                = 288 credits a day

Polling every six hours instead of every hour costs a sixth as much. Check your balance with the free GET /v1/balance before you raise the schedule. See Credits for the full rules.

Step 1: Find the route with Ask

If you don't know which endpoint searches a platform, ask. POST /v1/ask reads your question, picks a route, runs it and tells you what it ran in data.routedOperation. Try it in the Playground: type the question and click Send.

The Playground after sending POST /v1/ask with the question Search recent Reddit posts mentioning "Liquid Death". The routedOperation object in the response is labelled The route Ask picked, with its parameters: operationId reddit.search.list, method GET, path /v1/reddit/search and a query of Liquid Death. The 1 credit figure above the response is labelled Billed for the search only. A Reddit username in the results is blurred.
Ask chose GET /v1/reddit/search. It kept the brand name but dropped the quotes and the word recent, so set those yourself in step 2.

The same in code:

import { SocialFetchClient } from "@socialfetch/sdk";

const client = new SocialFetchClient({
  apiKey: process.env.SOCIALFETCH_API_KEY!,
});

const ask = await client.ask({
  query: 'Search recent Reddit posts mentioning "Liquid Death"',
});

if (ask.ok) {
  console.log(ask.value.data.routedOperation.path); // "/v1/reddit/search"
  console.log(ask.value.meta.creditsCharged); // 1: the search it ran
} else {
  console.error(ask.error.code, ask.error.requestId);
}

Ask answers one question with one route, and its choices can vary from one question to the next. Use it to find the route, then call that route directly every time after. From an AI agent connected through MCP, the same thing is the nl_ask_post tool with { "query": "…" }.

These are the routes Ask finds for each platform. Each takes your search words as query, and each costs 1 credit.

PlatformRouteSDK methodResults are in
TikTokGET /v1/tiktok/searchclient.tiktok.searchVideos()data.videos
X (Twitter)GET /v1/twitter/searchclient.twitter.search()data.tweets
YouTubeGET /v1/youtube/searchclient.youtube.search()data.videos and data.shorts
RedditGET /v1/reddit/searchclient.reddit.search()data.posts

Before you write code, try one in the Playground with the options you'll use. Use the date and sorting options each route supports. The example uses newest first on TikTok, X and Reddit, and a weekly upload filter on YouTube.

The Playground with GET /v1/reddit/search. The query field holds "Liquid Death" in double quotes, labelled Quotes keep the brand name together. The sortBy field set to new and the timeframe field set to week are labelled Newest first, from the last week. The response on the right is dimmed, with a Reddit username blurred.
Reddit search with the brand in quotes, newest first, from the last week.

Put a brand name of more than one word in double quotes. Without them, X's latest search for Liquid Death in our run returned posts that only used the words "liquid" and "death" separately, unrelated to the brand.

This function runs all four searches at once:

const BRAND = '"Liquid Death"';

async function pollBrand(query: string) {
  const capturedAt = new Date().toISOString();

  const [tiktok, twitter, youtube, reddit] = await Promise.all([
    client.tiktok.searchVideos({ query, sortBy: "date-posted" }),
    client.twitter.search({ query, section: "latest" }),
    client.youtube.search({ query, uploadDate: "this_week" }),
    client.reddit.search({ query, sortBy: "new", timeframe: "week" }),
  ]);

  return { capturedAt, tiktok, twitter, youtube, reddit };
}

const poll = await pollBrand(BRAND);

Each result is separate: one platform failing doesn't stop the others. Check result.ok before you read result.value.data, and keep result.value.meta.requestId and meta.creditsCharged with what you store, so you can match a row to the request later. Each search returns one page of results; data.page.hasMore says whether there are more, and passing data.page.nextCursor back as cursor fetches the next page (another credit).

Every call shows up in the app's request history, with the credits it cost. Type /search in Path contains to see just the searches.

The Request history page filtered to /search, showing one poll: GET /v1/tiktok/search, /v1/reddit/search, /v1/twitter/search and /v1/youtube/search, each with query="Liquid Death" and its options, status 200 and 1 credit. The four paths are labelled One search per platform and the credits column is bracketed with the label 4 credits.
One poll of the four platforms: four requests at 1 credit each.

Step 3: Keep only what's new

Each poll returns the latest matches, most of which you saw last time. Store every post under its platform and post ID, and treat a post as new only when that pair isn't stored yet:

const rows = poll.tiktok.ok
  ? poll.tiktok.value.data.videos.map((v) => ({
      platform: "tiktok",
      postId: v.id,
      text: v.caption,
      postedAt: v.createdAt,
    }))
  : [];
// …the same for poll.twitter (data.tweets: id, text, createdAt),
// poll.youtube (data.videos and data.shorts: id, title, publishedAt)
// and poll.reddit (data.posts: id, title, createdAt).

const seen = await loadSeenKeys(); // a Set of "platform:postId" from your database
const fresh = rows.filter((r) => {
  const key = `${r.platform}:${r.postId}`;
  if (seen.has(key)) return false;
  seen.add(key);
  return true;
});
await saveRows(fresh); // or upsert on (platform, postId)

loadSeenKeys and saveRows stand for your own storage. Adding each accepted key to seen also removes repeated posts within this response. Keep a database unique key on (platform, post_id) and use an upsert to prevent duplicate stored rows when polls run at the same time.

Here is a later poll from our run, with each post marked by whether the poll before it had already returned it:

A table built from a real poll for "Liquid Death", with columns Platform, Post ID, What it says, Posted, Engagement and This poll. The Platform and Post ID columns are labelled Dedupe on platform + post ID. A TikTok post marked New, posted several days before the poll, is labelled New to you, but posted days before this poll. Handles of ordinary people in the post text are replaced with @…
A real poll. Rows marked New weren't in the previous poll; some of them were posted days earlier.

New to you isn't the same as newly posted. Search results move between polls, so a post from days ago can turn up for the first time. If you only want fresh posts, also compare each post's own date with the time of your last poll. On YouTube, publishedAt may be approximate or missing. Keep publishedTimeText too, and avoid treating an estimated publish time as an exact minute.

Alert on what changes over time, such as more new posts than usual in a day, rather than on the number of results from one poll. The social listening dashboard guide builds the whole pipeline: a schedule, spike detection and Slack alerts.

Let a monitor do it

A monitor can watch a keyword search on Reddit, TikTok or X for you. Its first successful check records a baseline; later checks send matching new posts to your webhook. In the app, open Tools, then Monitors, click New monitor, pick the platform and its search source (on Reddit, Search), type the brand and choose how often to check.

The New monitor form with Reddit picked. The Search source is marked 1 and the Search query field holding "Liquid Death" is marked 2. How often is set to 1h. The Your monitor summary on the right, showing Reddit Search, the target, Every 1h and the delivery, is labelled Each check is one search, billed like the API call.
A Reddit search monitor for the brand, checking every hour.

Complete the form with a delivery target, then click Create monitor. You need a workspace with a previous payment to create one.

Each check costs what the search costs when you call it yourself, so an hourly Reddit monitor is up to 24 credits a day for its scheduled checks. See Billing for monitors.

Hashtag campaigns

To follow a campaign hashtag rather than a brand name, use the hashtag routes in the same way: TikTok hashtags, YouTube hashtags and X hashtags. Each takes hashtag instead of query.

On this page