intermediate20 minX (Twitter)X (Twitter)

X (Twitter) engager scraper for outbound lead capture

Turn the people quietly replying under hot posts in your topic space on X into a deduped pipeline of warm leads — refreshed every day, no doom-scrolling required.

One-click build

Build this with agnt_

Skip the copy-paste. We'll spin up a builder session prepopulated with this blueprint's spec — providers, schedule, database schema, and the questions the agent should ask you to personalize it for your product.

Build with agnt_

Sign up free · no credit card

The motion

Every day, this agent searches X for the most engaged posts in your topic space, paginates every reply on the best 3–5, and adds the commenters' profile URLs to a deduped `leads` table in your workspace database. Replies on a thread about your space are one of the strongest free intent signals X gives you — and unlike a like, a reply means the person stopped to type. Most teams never harvest these because reply threads can run to thousands of accounts. This blueprint puts the harvest on autopilot with a two-tier dedup so you never re-pay to scan the same thread or the same person twice.

A deduped pipeline of pre-warmed leads

Every commenter on the most engaged 3–5 posts in your topic space, upserted daily into a clean `leads` table the blueprint stands up on day one.

Reply-grade intent signal

A reply is a person who stopped to type — much stronger intent than a like. Your opener writes itself: reference the post they engaged with.

Two-tier dedup keeps cost predictable

Posts dedup on `tweet_id`, commenters dedup on `x_username` — the agent never re-pays to scrape the same thread, and the skill never re-paginates past a known commenter.

One unified API key

X search and reply pagination both go through the agntdata unified API — no X scraping infra, no proxies, no separate billing relationship.

Outbound teams know X reply threads are full of buyers — but pagination through thousands of replies, deduping people across posts, and judging which threads are even worth scraping is brutal manually. This blueprint moves the whole loop to an agent so every day the highest-intent commenters in your space land directly in your leads table, deduped and ready to work.

Click any node to inspect
Click any node to inspect its role in the agent.
One-click build

Build this with agnt_

Skip the copy-paste. We'll spin up a builder session prepopulated with this blueprint's spec — providers, schedule, database schema, and the questions the agent should ask you to personalize it for your product.

Build with agnt_

Sign up free · no credit card

Or copy a prompt into another platform

Prefer to build with OpenClaw, Hermes, or Claude Code? Drop this prompt into your agent of choice — it seeds the goal, the agntdata endpoints to use, and a step-by-step plan.

Prefer the manual walkthrough? ↓
You are helping me build an X (Twitter) engager-scraping agent that runs on a daily cron. Each day it picks a varied set of search queries against my topic space, finds posts that have meaningful comment threads, and scrapes every commenter into my `leads` table for outbound.

REFERENCE DOCS (read these before writing code)
- Full agntdata API documentation: https://agnt.mintlify.app/apis/overview
- X endpoints we'll use (all behind one agntdata key):
  - `Search_get__search_search` — keyword post search (use `section: "latest"` and a sensible `min_replies`)
  - `Tweet_Replies_get__tweet_replies` — first page of replies for a tweet
  - `Tweet_Replies_Continuation_get__tweet_replies_continuation` — subsequent pages

ABOUT MY PRODUCT
- Product name: <YOUR PRODUCT>
- One-line description: <WHAT IT DOES>
- ICP: <WHO BUYS IT — role + company stage>
- Topics on X my buyers actually engage with: <3–6 BULLETS — be specific, e.g. "AI SDRs", "agent-led growth", not "AI">
- Post shapes worth targeting: <e.g. "list / recommendation threads", "founder hot takes", "how-do-you-do-X questions", "launch posts">
- min_replies threshold per post: <DEFAULT 5>

WHAT TO BUILD
- A scheduled agent on agntdata that runs once a day.
- Each run: agent autonomously picks 3–5 varied X search queries (rotate across runs), filters out posts already in `x_engaged_posts`, classifies which surviving candidates actually fit my topic + post-shape rules, and selects at least 3 to scrape.
- All commenter scraping + DB writes happen inside **one TypeScript skill** (`scrape_x_post_commenters`). The agent only chooses queries, classifies posts, and hands a JSON list to the skill.
- After the skill returns, agent posts a Slack summary.

DATABASE (create all three tables — fresh workspace, nothing to migrate)
- `leads` — minimum columns for this skill: `id` (uuid PK, default `gen_random_uuid()`), `x_username` (text), `x_profile_url` (text), `first_name`, `last_name`, `x_source_post_url`, `created_at` / `updated_at` (timestamptz). Add a **partial unique index** on `x_username` where not null — that's what makes upserts dedup correctly without blocking rows that have other identifiers.
- `x_engaged_posts` — POST-level dedup so the same tweet is never scraped twice. PK `tweet_id`. Plus `author_username`, `tweet_url`, `commenter_count`, `scraped_at`.
- `x_scraped_users` — USER-level dedup so a known commenter isn't paginated through again on a future post. PK / unique `x_username`. Plus `lead_id` (FK to `leads.id`), `x_source_post_url`, `scraped_at`. The skill loads this set into memory at the start of each run.

THE SKILL
- Reads stdin: `[ { tweet_id, tweet_url, author_username }, ... ]`.
- Loads `x_scraped_users.x_username` into a Set up front (lowercase, trimmed).
- For each post: paginate `Tweet_Replies` + `Tweet_Replies_Continuation` up to ~20 pages, skip the author's own replies, skip already-known users, batch-upsert new commenters into `leads` (on conflict `x_username`), then upsert into `x_scraped_users` with `lead_id` linked. Records the post in `x_engaged_posts` at the end.
- **Verify the response shape from the X tools yourself in dry-run.** Reply payloads have wrapped/unwrapped variants depending on the tool runtime — don't assume `response.replies` works. Read `content[0].text` and JSON-parse if needed before extracting `replies` and `continuation_token`.

GUARDRAILS
- Don't call X directly — always go through the agntdata endpoints so unified billing + auth handle it.
- Cap commenter pagination at ~20 pages per post.
- Skip posts already in `x_engaged_posts` — even if they "look fresh."
- Do not write to `leads` from the agent — only the skill writes.
- Always send the Slack report at the end, even on a zero-result day.

When you're ready, start by asking me the ABOUT MY PRODUCT questions.

Paste into OpenClaw to scaffold this agent. Tweak the inputs and goal at the top of the prompt.

How to build it

7 steps. Each one links to the underlying agntdata endpoints — open them in a new tab to inspect parameters and pricing as you build.

Sign up at app.agntdata.dev/dashboard. One key gives you X search + reply pagination — plus LinkedIn, Reddit, TikTok, Instagram, Facebook, YouTube, and Hunter on the same credential. Credit-based pricing, no monthly minimum.

On the agntdata dashboard, install the Slack connector for your workspace and pick the channel that should receive the daily summary (`lead-scraping` is the convention, but anything works). The connector handles the bot token and `chat:write` scope for you.

The blueprint creates `leads`, `x_engaged_posts`, and `x_scraped_users` in your workspace database. Two-tier dedup is the cost-control mechanism: post-level (`x_engaged_posts.tweet_id`) prevents re-scraping the same thread; user-level (`x_scraped_users.x_username`) prevents the skill from paginating past commenters you already have. Don't overspec the `leads` table — keep it minimal and grow it as you add enrichment / outbound steps.

The CTA above seeds a builder session prefilled with this blueprint — providers, all three table schemas, the skill spec, and the personalization questions you need to answer (product, ICP, topics, post shapes, channel). The agent walks you through each one and generates the deployable agent + schedule.

Before turning on the daily schedule, ask the agent to scrape a single hand-picked tweet — pick one where you know the commenters are your ICP. Inspect the rows it writes to `leads` and confirm the `x_source_post_url` column is set. **One gotcha worth verifying in the dry-run:** the X reply tool sometimes wraps its payload in `content[0].text` (JSON-encoded) rather than returning the array directly — if your skill silently scrapes 0 commenters from a thread you know has hundreds, that's the parsing path. Print the raw tool response and JSON-parse the inner text before assuming `response.replies` works.

Default cadence is once a day at 08:00 UTC. Cron expression `0 8 * * *`. Tail the Slack channel after the first run to confirm posts scraped > 0 and new leads added > 0. Move to every 5 hours (`0 */5 * * *`) once you trust the topic + post-shape selection.

Watch the first 3–5 daily summaries. The fastest wins: (1) tighten the post-shape rules if the agent is approving meta-posts (posts *about* your topic genre vs posts *in* it); (2) widen the topic phrase set if reply counts per scraped post are tiny; (3) raise `min_replies` if too many low-signal threads are getting through. The agent picks queries each run from the topic list — keep it curated and it'll do the rest.

Endpoints used

The agntdata endpoints this blueprint depends on. All available with one API key.

X (Twitter)X (Twitter)get

Search

/search/search

Keyword search for X posts. Called once per chosen query each run with `section: "latest"` and a `min_replies` floor; the agent diversifies queries across runs so the same posts don't keep surfacing.

View endpoint docs
X (Twitter)X (Twitter)get

Tweet Replies

/tweet/replies

First page of replies for a chosen tweet. Called once per approved post inside the TypeScript skill.

View endpoint docs
X (Twitter)X (Twitter)get

Tweet Replies Continuation

/tweet/replies/continuation

Subsequent reply pages for the same tweet using a continuation cursor. The skill walks pages until the cursor is exhausted or a per-post page cap is hit.

View endpoint docs

Ship this blueprint today

One click spins up a builder session prefilled with this blueprint's spec. We'll ask you a handful of personalization questions, then generate the agent.

Related blueprints

Browse all →
LinkedInX (Twitter)agntdata Lead APIsintermediate25 min

Every day, find creators posting about your space on LinkedIn + X — filter for 1k+ followers and topic-relevance, enrich with verified emails, save to a deduped partnerships table. Pair with the creator outreach writer to actually pitch them.

ICP DiscoveryCold OutboundSignal DetectionFounderGrowth Marketer
Redditintermediate15 min

Monitor 15+ subreddits twice a day for prospects describing the exact pain your product solves. AI-scored, deduplicated, and pushed to Slack — for around $4 a month.

Signal DetectionCold OutboundICP DiscoveryFounderGrowth Marketer
LinkedInintermediate20 min

Turn the people quietly liking and commenting on LinkedIn posts about your space into a deduped pipeline of warm leads — refreshed every day, no manual scrolling.

Signal DetectionCold OutboundICP DiscoveryFounderGrowth Marketer