Generated Social

Well-researched social media posts relevant to a recent topic

Live preview

Checking API key

How it works

Each post is one request to Exa's /search endpoint with type: "deep". Exa first finds what people in the topic space are actually discussing right now (last 7-30 days), then a model writes a post anchored to one specific event, launch, hire, or take from the sources.

Each platform variant has its own outputSchema and systemPrompt. A LinkedIn long-form has hook, paragraphs, and kicker fields. A Tweet has a single post field with a 280 character budget. A thread is an array of tweets. The schema description constrains length and structure per platform.

Every variant's systemPrompt carries a shared voice ruleset: no AI vocabulary, no em dashes, no hashtags, no content-creator clichés. Sources are flattened from output.grounding and rendered as a favicon row, deduped by domain.

Source code

npm install exa-js
import Exa from "exa-js";
const exa = new Exa("YOUR_API_KEY");

const topic = "AI coding tools";

const result = await exa.search(
  `What are people in ${topic} actually arguing about right now? Find specific recent posts, launches, debates from the last 30 days.`,
  {
    type: "deep",
    numResults: 12,
    systemPrompt: `Draft a LinkedIn post for an operator in the "${topic}" space. 140-220 words. Anchor to one specific recent event from the sources. Voice rules: contractions, numerals, second-person, no em dashes, no clichés.`,
    outputSchema: {
      type: "object",
      required: ["zeitgeistAngle", "hook", "paragraphs", "kicker"],
      properties: {
        zeitgeistAngle: { type: "string", description: "The specific recent event being ridden" },
        hook: { type: "string", description: "First 1-2 lines, under 180 chars" },
        paragraphs: {
          type: "array",
          description: "4-7 short paragraphs, each 1-2 sentences max 30 words",
          items: { type: "string" },
        },
        kicker: { type: "string", description: "Sharp final sentence, not a question" },
      },
    },
    contents: { highlights: true },
  }
);

const { hook, paragraphs, kicker } = result.output.content;
const citations = result.output.grounding.flatMap((g) => g.citations);
Ask ExaBot