Recipes

Find citation sources

Extract every URL cited by the AI search platforms across your query portfolio. The URLs that appear on multiple surfaces are your top GEO link-building targets — the domains LLMs trust to answer your topic.

Why it matters

The new SEO link-building game is "get cited by the sources LLMs already cite." If Zapier's blog post is referenced by 4 of 6 AI surfaces for "best CRM for startups," getting your brand into that post (or a similar one) compounds across every surface. This recipe builds the prioritized target list.

Code

javascript
import fetch from "node-fetch";

const QUERIES = ["best CRM for startups", "free CRM 2026", "HubSpot review"];
const BRAND = "HubSpot";

async function citationGraph(queries: string[]) {
  const allCitations = new Map<string, { url: string; title: string; surfaces: Set<string> }>();
  for (const q of queries) {
    const res = await fetch("https://api.mentionsapi.com/v1/check", {
      method: "POST",
      headers: { Authorization: `Bearer ${process.env.MENTIONSAPI_KEY}`, "Content-Type": "application/json" },
      body: JSON.stringify({ mode: "all_live", query: q, brand: BRAND }),
    });
    const { providers } = await res.json();
    for (const [surface, result] of Object.entries(providers) as [string, any][]) {
      for (const c of result.citations) {
        const existing = allCitations.get(c.url);
        if (existing) existing.surfaces.add(surface);
        else allCitations.set(c.url, { url: c.url, title: c.title, surfaces: new Set([surface]) });
      }
    }
  }
  return Array.from(allCitations.values()).sort((a, b) => b.surfaces.size - a.surfaces.size);
}

const sources = await citationGraph(QUERIES);
console.log(`Found ${sources.length} unique sources`);
console.log("Top 10 most-cited:");
for (const s of sources.slice(0, 10)) {
  console.log(`  ${s.surfaces.size}/6 surfaces — ${s.url}`);
}

Cost

3 queries × mode:all_live at $0.50 each = $1.50 for the full citation graph. Run it weekly: $6/month for an evergreen view of who LLMs cite for your topic.