socialcrawl/
← All recipes

Monitor brand mentions across platforms

Search Reddit, Bluesky and Hacker News for your brand in one pass, then sort by engagement.

TypeScript
const KEY = process.env.SOCIALCRAWL_API_KEY!;
const brand = "anthropic";

const call = async (path: string) => {
  const r = await fetch(`http://datatrend.nl${path}`, { headers: { "x-api-key": KEY } });
  return r.json();
};

const sources = [
  `/v1/reddit/search?query=${encodeURIComponent(brand)}`,
  `/v1/bluesky/search?query=${encodeURIComponent(brand)}`,
  `/v1/hackernews/search?query=${encodeURIComponent(brand)}`,
];

const results = await Promise.all(sources.map(call));

const mentions = results.flatMap((r) =>
  (r.data?.items ?? []).map((i: any) => ({
    platform: r.platform,
    text: i.post.content.text?.slice(0, 120),
    likes: i.post.engagement.likes ?? 0,
    url: i.post.url,
  }))
);

mentions.sort((a, b) => b.likes - a.likes);
console.table(mentions.slice(0, 20));
You'll need a key. It takes ten seconds and starts with 100 credits. Get a key