# Twitter Lead Generation: AI Buying-Intent X Leads, 25 Free (`rich_minds/twitter-lead-generation-ai`) Actor

First 25 leads free. Twitter lead generation — pay per qualified lead, junk never charged: find customers on Twitter who ask for a tool like yours, with the need, ICP fit and a reply draft, via X Tweet Scraper. No X login. Free demo on any plan; live search runs on your Apify account. MCP-ready.

- **URL**: https://apify.com/rich\_minds/twitter-lead-generation-ai.md
- **Developed by:** [Rich Minds](https://apify.com/rich_minds) (community)
- **Categories:** Lead generation, Social media, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.50 / 1,000 qualified lead (rules only)s

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Twitter Lead Generation: AI Buying-Intent X Leads, 25 Free

**People on X asking for a tool like yours — with a reply draft, every week.**

⚡ First **25 leads free** · 💵 **$0.0025** per qualified lead · 🤖 **$0.009** with AI assessment · ⏱️ demo in seconds

![Shortlist: hot and warm X leads with intent type, the need quoted from the tweet, role and competitor named](https://api.apify.com/v2/key-value-stores/tTLGN9CZnhmGzYWjJ/records/shortlist.svg)

> **Try it in 30 seconds.** Click **Try it** — the form is already filled with a working example. Your first
> **25 qualified leads** are free, and tweets that fail your filters are never charged.
> → [What a run costs](#-pricing--what-a-run-really-costs) · [What the AI adds](#-what-the-ai-tier-adds) · [Run it weekly](#-run-it-weekly)

### ⚡ At a glance

| | |
|---|---|
| **What you get** | people on X asking for a product like yours: their need quoted, role and company, a lead score and a reply draft |
| **You provide** | 1–10 words buyers use for what you sell (`email marketing`) and one sentence about your offer |
| **Output** | JSON / CSV / Excel dataset, best-first, plus the funnel in the `OUTPUT` record |
| **Typical run** | 500 tweets scanned → ≈ 20 qualified leads in ≈ 2 min (estimate; every run measures `OUTPUT.timing`) |
| **Cost of that run** | $0.13 rules only · $0.36 with the AI verdict ($0.075 X Tweet Scraper + 20 × $0.0025 / 20 × $0.009 here + ≈ $0.10 AI tokens), after your 25 free leads |
| **Free tier** | first 25 qualified leads per account |
| **Keys / setup** | no API key where your Apify plan includes model access — otherwise your own Gemini / Groq key (`llmProvider: byok`); the free demo shows sample AI verdicts on any plan |
| **Works with** | Schedules, webhooks, Google Sheets, Slack, Discord, Make / n8n / Zapier, MCP & AI agents |

### 🎯 What this Actor does

Twitter lead generation and X lead generation for founders, SDRs and agencies — you pay only for people who want what
you sell:

- **Searches X for buyers, not mentions** — "looking for", "any recommendations", "alternative to", "sick of" … queries.
- **Drops the junk for free** — vendor promos, bots, hiring posts, giveaways, hashtag spam and retweets, each with a
  reason.
- **Tells you who is asking** — role, company, website, public e-mail from the bio, fit vs `icpBioKeywords`.
- **Hands you the reply** — a ≤ 280-character draft, a one-click `replyUrl`, `isUnanswered` to answer first.
- **Only new people on every run** — memory per tweet and per author.

#### 🧲 Find customers on Twitter who already ask

People tweeting "can anyone recommend…" or "switching from…" are ready to buy — this finds, ranks and answers them.

#### 🔎 Twitter sales prospecting: the queries are built for you

`productKeywords` (or your `offer` alone) become X queries without retweets, promo links or your own accounts;
`competitorNames` (`Mailchimp`, `@klaviyo`) adds "alternative / switching from / cancel" searches.

#### 🎚️ Twitter buying intent, filtered your way

`intentTypes`, follower bands, `minScore`, `targetFlags` and `suppressionList` — free, before any charge. Reply drafts
name your product only where someone asked for a recommendation or an alternative.

### 🚀 How to use it

1. **Click `Try it`** — the free demo on 9 sample tweets: 4 leads, 5 junk tweets rejected, $0.
2. **Type your own `offer`** (plus `productKeywords` if you know the words — else they are read from the offer and
   listed in the status) — that switches to the live X search on your account. Leave `enableAi` on.
3. **Press Start** — the **Reply queue** tab lists who to answer, the draft and the reply link.
4. **Schedule it** with your address in `notifyEmail` — only new leads are delivered and charged.

![Reply queue: each lead with its reply draft and one-click reply link](https://api.apify.com/v2/key-value-stores/tTLGN9CZnhmGzYWjJ/records/outreach.svg)

📚 **Learn more:** [Step-by-step tutorial — twitter lead generation with this Actor](https://api.apify.com/v2/key-value-stores/tTLGN9CZnhmGzYWjJ/records/tutorial.html)

### 🆚 Why this instead of an X Tweet Scraper?

| | [X Tweet Scraper (`xquik/x-tweet-scraper`)](https://apify.com/xquik/x-tweet-scraper) | **This Actor** |
|---|---|---|
| **Price** | $0.00015 per tweet · 1,386 users / 30 days | $0.0025 per qualified lead, first 25 free |
| **What you pay for** | every tweet — promos, bots, jokes included | only qualified leads — junk costs **$0** |
| **Same 100 leads, all in** | $0.38 for ≈ 2,500 tweets, then you read all 2,500 | 100 ranked, explained leads: $0.63 rules only · $1.78 with AI ($0.25 / $0.90 here + $0.38 source you pay either way + ≈ $0.50 tokens) |
| **Who is buying?** | raw rows | intent, stage, quoted need, role, ICP fit |
| **Next step** | none | reply draft + one-click reply link |

**Store neighbours for "twitter lead generation"** — ours first; 100 clean leads ≈ 2,500 raw tweets:

| Actor | Users / 30 d | Price | 100 clean leads | What you still do |
|---|---|---|---|---|
| **This Actor** | new | $0.0025 / lead, $0.009 with AI | $0.63 · $1.78 with AI | reply |
| `b2b_leads/x-twitter-lead-intent-finder-scored-buying-intent-leads` | 1 | $0.0005 / scored lead + start | ≈ $0.05 + start (100 of its own leads) | phrase-match scoring, no AI verdict or reply draft; Free-plan runs end empty ([its README](https://apify.com/b2b_leads/x-twitter-lead-intent-finder-scored-buying-intent-leads)) |
| `xquik/x-twitter-tweet-classifier` | 1 | $0.0003 / tweet | ≈ $0.75 | write prompts; 11.1 % fail |
| `xquik/x-twitter-brand-monitoring` | 1 | $0.0003 / tweet | ≈ $0.75 | no lead verdict |
| `api-ninja/x-twitter-advanced-search` | 429 | $0.00035–0.015 / tweet + start | $0.88–37.50 | read every row |
| `apidojo/tweet-scraper` | 8,011 | $0.0004 / tweet | ≈ $1.00 | read every row |
| `kaitoeasyapi/twitter-x-data-tweet-scraper-pay-per-result-cheapest` | 4,464 | $0.00025 / tweet | ≈ $0.63 | read every row |
| `apidojo/twitter-scraper-lite` | 2,098 | $0.0004+ / tweet + query fees | ≈ $1.00+ | read every row |

The same search also lists follower / profile scrapers (`x_guru/twitter-follower-scraper`): follower lists, no intent.
b2b\_leads is cheaper per lead; we cost more because each lead carries an AI verdict (on our 9-tweet demo sample the
free rules alone drop the promo, the hiring post, the giveaway and the bot), the quoted need and a reply draft.

**Free and SaaS alternatives:** **X Advanced Search** is free but has no scoring, junk removal, export or schedule.
**Octolens** and **Brand24** are monthly seats ([pricing](https://octolens.com/pricing),
[prices](https://brand24.com/prices/)) — here you pay per new lead only.

### 💵 Pricing — what a run really costs

Pay per result: **one event per qualified lead, nothing else.**

| Event | When it is charged | Price |
|---|---|---|
| `free-tier` | your first 25 qualified leads on this Actor, in any mode | **$0.00** |
| `qualified-lead-basic` | AI off — intent score, bio parser, lead score, template reply | **$0.0025** |
| `qualified-lead-ai` | AI on — plus the AI verdict, quoted need, ICP fit and a tailored reply | **$0.009** |

**One free tier:** your first 25 qualified leads are free, whatever the tier.

**Never charged:** the search, retweets, bots, vendor promos, hiring posts, giveaways, off-topic tweets, leads below
`minScore`, tweets the AI calls "not a genuine buyer", leads you already received. Compute is included.

**How that compares** — $0.0025 is 1.4× the $0.001745 median of the same-job X Actors the Store shows for "twitter
lead generation" (one per developer), and 8× one raw tweet ($0.0003 median) — but one qualified lead replaces 25 raw
tweets you would read and judge: $0.0001 per raw-row equivalent.

**Worked example** — 500 tweets scanned → 20 qualified leads with AI on: X Tweet Scraper $0.075 on your account +
20 × $0.009 here + ≈ $0.10 tokens → **$0.36 total, ≈ $0.018 all-in per lead**. Rules only: $0.075 + 20 × $0.0025 =
$0.13, ≈ $0.006 all-in per lead. Your first 25 leads cost $0 here.

**AI tier, all in:** ≈ $0.014 per lead ($0.009 here + ≈ $0.005 tokens through Apify's model access or your own key) —
3.6× the basic price before tokens.

### 🤖 What the AI tier adds

The same demo tweet, AI **off** — the free rules (intent lexicon, bio parser, template reply):

```json
{"authorUsername": "kaylaships", "intentType": "alternative_seeking", "need": "Seriously looking for a Klaviyo alternative for email marketing before our renewal in October.", "authorRole": "Head of Growth", "intentScore": 83, "icpFit": 83, "leadScore": 82, "leadTier": "hot", "suggestedReply": "@kaylaships Email marketing tool for Shopify stores — happy to share how it handles \"looking for a Klaviyo alternative for email marketing before our renewal in October\"."}
```

AI **on** (`qualified-lead-ai`, $0.009) — the demo's labelled sample verdict for the same tweet (what Try it shows on a
plan without model access; your own search gets a live verdict from the default model):

```json
{
  "authorUsername": "kaylaships", "intentType": "alternative_seeking", "buyingStage": "evaluating",
  "need": "looking for a Klaviyo alternative for email marketing before our renewal in October",
  "intentScore": 94, "icpFit": 86, "leadScore": 89, "leadTier": "hot",
  "reasons": ["renewal in October = a deadline", "\"flows keep breaking\" is the pain", "Head of Growth, ecommerce bio"],
  "suggestedReply": "@kaylaships Flows breaking right before a renewal is the worst timing. We built an email marketing tool for Shopify stores with simpler flows — happy to show how a Klaviyo switch works before October.",
  "aiAssessment": {"intentType": "alternative_seeking", "isGenuineBuyer": true, "stage": "evaluating", "confidence": 0.92, "icpFit": 86}
}
```

The AI tells a real shopper from a vendor or a joke and writes the reply — the 20 minutes a day of reading you skip.

**Try the AI on any plan:** the free demo shows labelled sample AI verdicts (`aiModel: "sample"`). Without model
access, your first real leads can get live verdicts on the developer's key (`OUTPUT.aiTrial`). Then your own key
(`llmProvider: byok`): a free Gemini key ([aistudio.google.com/apikey](https://aistudio.google.com/apikey)) assesses a
few leads per run; a paid Gemini / Groq key (billing on, ≈ $0.005 per lead) assesses every lead.

### ⚙️ Input

```json
{"productKeywords": ["invoicing app"], "offer": "Invoicing app for freelance designers", "competitorNames": ["FreshBooks"], "sourceMode": "actor", "maxDiscoveryChargeUsd": 0.5}
```

#### Input options

<details><summary>The 10 fields that decide a run — defaults and what each does</summary>

| Field | Type | Default | What it does |
|---|---|---|---|
| `productKeywords` | string\[] | — | Your category terms; queries are built from them, a tweet must mention one; empty = read from `offer` |
| `sourceMode` | `actor` | `dataset` | `list` | `actor` | Live X search, a tweet dataset or pasted tweets; `{}` runs the free demo — nothing charged, the source never started |
| `offer` | string | — | What you sell; the AI and the reply drafts use it |
| `minScore` | 0–100 | `60` | The field that decides what you pay: below it = not delivered, not charged |
| `maxQualified` | integer | `50` | Hard cap on leads (and on spend) |
| `maxDiscoveryChargeUsd` | number | `0.5` | Stops X Tweet Scraper at this spend — form and API alike |
| `enableAi` | boolean | `true` | AI verdict on/off |
| `competitorNames` | string\[] | — | Switch / alternative searches; their accounts excluded |
| `withinDays` | 1–30 | `7` | The search window |
| `maxTweetsToScan` | integer | `500` | Tweets searched ($0.00015 each on your account); 1,000 on a schedule |

Also free, before any charge: `customSearchTerms` (raw X queries, appended as-is), `excludeTweetsWithLinks`
(`-filter:links`), `language`, `ownHandles` (never delivered, `-from:`), `minFollowers` / `maxFollowers`,
`dedupeByAuthor` (one lead per person). Reply drafts: `generateReplyDraft`, `replyTone`, `offerUrl` (the only link a
draft may carry).

</details>

Every other option is explained in the **Input** tab.

#### Flags

Put the name from the first column into `targetFlags` (`decisionMaker` works too); an unknown name stops the run with
the list of valid ones.

<details><summary>All flags</summary>

| Flag (`targetFlags` value) | Meaning |
|---|---|
| `unanswered` | nobody has replied yet — you can be the first answer |
| `question` | the tweet asks a question |
| `competitor_mentioned` | names one of your competitors |
| `decision_maker` | the bio names a founder / owner / exec role |
| `icp_match` | the bio matches one of your ICP keywords |
| `has_website` | the author links a website |
| `public_email` | the author published an e-mail address in the bio |
| `verified_author` | blue-check / verified account |
| `fresh` | posted in the last 24 hours |
| `high_reach` | the author has 5,000+ followers |

</details>

### 📤 Output

One dataset item per qualified lead — JSON, CSV or Excel, or a webhook.

<details><summary>The demo row for @kaylaships (AI off), abridged</summary>

```json
{
  "itemId": "52a51207a329", "tweetId": "1971790112930027520",
  "url": "https://x.com/kaylaships/status/1971790112930027520",
  "text": "Our Klaviyo bill doubled this year and flows keep breaking. Seriously looking for a Klaviyo alternative for email marketing before our renewal in October.",
  "postedAt": "2026-09-26T10:58:00+00:00", "replyCount": 3, "authorUsername": "kaylaships",
  "authorProfileUrl": "https://x.com/kaylaships", "authorBio": "Head of Growth at Northpeak Supply | DTC & ecommerce",
  "authorFollowers": 5400, "authorWebsite": "northpeak.example", "authorRole": "Head of Growth",
  "authorCompany": "Northpeak Supply", "intentType": "alternative_seeking", "buyingStage": "evaluating",
  "competitorMentioned": "Klaviyo", "intentScore": 83, "icpFit": 83, "leadScore": 82, "leadTier": "hot",
  "isUnanswered": false, "replyUrl": "https://x.com/intent/post?in_reply_to=1971790112930027520",
  "contactRoute": "https://x.com/intent/post?in_reply_to=1971790112930027520",
  "flags": ["competitor_mentioned", "decision_maker", "icp_match", "has_website", "verified_author", "fresh", "high_reach"],
  "chargedEvent": "demo", "billedAs": "qualified-lead-basic", "dedupeKey": "tweet:1971790112930027520"
}
```

</details>

#### Output fields

<details><summary>Every field of a row</summary>

| Field | Description |
|---|---|
| `itemId`, `tweetId`, `url` | Identity of the lead — stable across runs |
| **Canonical fields** | `url`, `score` and `label` are the fields to map (the views and snippets use them); `tweetUrl`, `leadScore`, `leadTier` carry the same values, kept in the JSON for cross-Actor pipelines |
| `tweetUrl`, `text`, `postedAt`, `lang`, `matchedQuery` | The tweet, when, its language, the X query that found it |
| `likeCount`, `replyCount`, `retweetCount`, `viewCount` | Engagement |
| `isReply`, `inReplyToUsername`, `quotedText`, `conversationId` | Thread context |
| `authorId`, `authorUsername`, `authorName`, `authorProfileUrl`, `authorBio`, `authorFollowers`, `authorVerified`, `authorLocation`, `authorWebsite`, `authorAvatarUrl` | The author's public profile |
| `authorRole`, `authorCompany`, `authorEmail` | Read from the public bio (e-mail only when published there) |
| `intentType`, `buyingStage`, `need`, `competitorMentioned` | What they want, how far along, the need quoted verbatim, which competitor |
| `intentScore`, `icpFit`, `leadScore`, `leadTier`, `score`, `label`, `ruleScore` | Intent 60 % + ICP fit 25 % + freshness 15 %; hot ≥ 80, warm ≥ 60 |
| `reasons`, `flags`, `targetFlagsMatched` | Up to 4 short reasons; the flags above |
| `isUnanswered`, `replyUrl`, `suggestedReply`, `contactRoute` | The action step: reply link, draft, best way to reach the author |
| `aiAssessment` | `{intentType, isGenuineBuyer, stage, confidence, reason, icpFit, model}` — every key on every row, null when rule-scored |
| `aiModel`, `chargedEvent`, `billedAs`, `dedupeKey`, `firstSeenAt` | Provenance and billing (`billedAs` = the price tier, also on free rows) |

</details>

**Upsert key for a CRM or Sheet:** `dedupeKey` — `tweet:<tweetId>`, the key the cross-run memory uses, so one tweet is
one row however many runs find it; `authorId` groups one person's tweets.

`OUTPUT` = the full run record; `RUN_SUMMARY` = the same record, same keys. Next to it: a **`DIGEST`** (Markdown for Slack / e-mail: counts per intent type, "vs last run: qualified 41 →
55, hot 5 → 9", top leads with links) and a client-ready **`REPORT`** page (`OUTPUT.reportUrl`). Views: `Shortlist`,
`Reply queue`, `Authors (CRM sheet)`, `Intent analysis`. `OUTPUT` holds `queries`, `tweetsScanned`,
`rejectedByReason`, `leadsByTier`, `leadsByIntent`, `sourceCostEstimateUsd`, `aiCoverage`, `termsFromOffer`,
`scheduledSizing`, `sourceError`, `aiError`.

⭐ **Found it useful? A review on the Store helps others find it** — it takes a minute on the Actor's page.

### 🔁 Run it weekly

1. **Open the saved task and click Schedule** — your first real run saves its search as a task and links it in the
   status (`OUTPUT.scheduleTaskUrl`). Add `notifyEmail`: every run with new leads e-mails the digest and the trend.
2. Keep `dedupeAcrossRuns: true` — tweets and authors you were charged for are remembered per **search**, not per
   `offer` wording. Several clients: one `dedupeStoreName` each.
3. Add `slackWebhookUrl`, `discordWebhookUrl` or `webhookUrl` / Google Sheets for the rows themselves.
4. From run two, `OUTPUT.history` and the `REPORT` page show every run (qualified, hot, unanswered, switchers).
5. A scheduled run covers the days since the last run and scans 1,000 tweets, capped by `maxDiscoveryChargeUsd`.

Weekly cost is the new leads only, at the page's one hit rate: 1,000 tweets a week → ≈ 40 new leads in week 1 →
40 × $0.009 = $0.36 here + $0.15 of X Tweet Scraper on your account. From week 2 fewer are new: the memory drops the
tweets and authors week 1 delivered (the measured week-2 figure follows the first scheduled runs).

#### 🎯 Try it for your niche

Copy the input into the form (JSON view), run it once, then schedule it.

| Niche | What it looks for | Start |
|---|---|---|
| SaaS founder (invoicing app) | invoicing-app requests, FreshBooks / HoneyBook switchers | input below |
| B2B SDR (CRM) | CRM requests from sales leaders, score ≥ 70 | input below |
| Competitor conquesting (PM tool) | Asana / Monday.com / ClickUp complaints and switchers | input below |

<details><summary>SaaS founder input</summary>

```json
{"productKeywords": ["invoicing app", "invoice software"], "sourceMode": "actor", "offer": "Invoicing app for freelance designers — one-click invoices and automatic payment reminders.", "competitorNames": ["FreshBooks", "@HoneyBook"], "icpBioKeywords": ["freelance", "designer", "founder"], "minScore": 60, "maxQualified": 50, "maxTweetsToScan": 500, "maxDiscoveryChargeUsd": 0.5, "enableAi": true}
```

</details>

<details><summary>B2B SDR input</summary>

```json
{"productKeywords": ["crm", "sales pipeline tool", "lead routing"], "sourceMode": "actor", "offer": "CRM for 5–50 person B2B sales teams, set up in a day.", "competitorNames": ["HubSpot", "Pipedrive"], "icpBioKeywords": ["head of sales", "revops", "founder", "vp sales"], "minFollowers": 100, "minScore": 70, "maxQualified": 50, "maxTweetsToScan": 800, "maxDiscoveryChargeUsd": 0.5, "enableAi": true}
```

</details>

<details><summary>Competitor conquesting input</summary>

```json
{"productKeywords": ["project management tool"], "sourceMode": "actor", "offer": "Project management tool for agencies — client portals and time tracking built in.", "competitorNames": ["@asana", "Monday.com", "ClickUp"], "intentTypes": ["alternative_seeking", "pain_point"], "minScore": 60, "maxQualified": 50, "maxTweetsToScan": 600, "maxDiscoveryChargeUsd": 0.5, "enableAi": true}
```

</details>

### 🔌 Integrations, automation and API

- **Webhook** — `webhookUrl` (+ `webhookHeaders`) POSTs to Zapier, Make, n8n or a CRM:
  `{"event": "lead.qualified", "lead": {…}, "runId": "…"}` per lead (`webhookBatchSize: 1`), else
  `{"event": "leads.qualified", "leads": [{…}, …]}` per batch. A 429 / 5xx is retried once; a failed POST is counted in
  `OUTPUT.webhook.failed`, never fails the run.
- **Google Sheets / Slack** — one click from the **Integrations** tab; the Authors view maps onto a sheet.
- **HubSpot** — Make / Zapier "create or update contact" on the webhook: contact = `authorName` + `authorWebsite` +
  `authorRole`, note = `text` + `need` + `suggestedReply`; upsert on `dedupeKey`.
- **Pipedrive** — the same flow as a person + deal: person = `authorName` / `authorCompany`, note = `need` +
  `suggestedReply`, `url` as the source link; upsert on `dedupeKey`.
- **AI agents / MCP** — every input is a plain typed field. **First call = the free trial:** `"sourceMode": "list"`
  with the tweets you send, no search on your account (the snippets below); `{}` runs the same free demo.

<details><summary>Python and JavaScript — the free first call</summary>

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("rich_minds/twitter-lead-generation-ai").call(
    run_input={
        "sourceMode": "list",
        "itemsList": [{"id": "1971839201584730999", "text": "Can anyone recommend an invoicing app for freelancers?",
                       "authorUsername": "sam_designs", "authorFollowers": 800}],
        "productKeywords": ["invoicing app"],
        "offer": "Invoicing app for freelance designers",
        "maxDiscoveryChargeUsd": 0.5,  # spend cap on your account once you switch to "sourceMode": "actor"
    },
    timeout_secs=3600,  # sized for the AI path with your own key — see "How long does a run take?"
    # build="0.1",  # pin the build your pipeline was tested with (Changelog below); omit for the latest
)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["url"], item["score"], item["label"], item["suggestedReply"])
```

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_API_TOKEN>' });
const run = await client.actor('rich_minds/twitter-lead-generation-ai').call({
    sourceMode: 'list',
    itemsList: [{ id: '1971839201584730999', text: 'Can anyone recommend an invoicing app for freelancers?',
        authorUsername: 'sam_designs', authorFollowers: 800 }],
    productKeywords: ['invoicing app'],
    offer: 'Invoicing app for freelance designers',
    maxDiscoveryChargeUsd: 0.5, // spend cap on your account once you switch to sourceMode: 'actor'
}, { timeout: 3600 /* , build: '0.1' — pin the build your pipeline was tested with */ });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.map((i) => [i.url, i.score, i.label, i.suggestedReply]));
```

</details>

**Use it from Claude, ChatGPT or any MCP client** — add Apify's MCP server with this Actor as a tool:

```json
{"mcpServers": {"apify": {"url": "https://mcp.apify.com/?actors=rich_minds/twitter-lead-generation-ai"}}}
```

Then ask: *"Run twitter-lead-generation-ai in `list` mode on these tweets first (free), show me the hot leads, then
search with `sourceMode: actor`, my `productKeywords` and `maxDiscoveryChargeUsd: 0.5`."*

<details><summary>Minimal agent input</summary>

An agent needs only these fields; every other input keeps its default:
`{"productKeywords": ["invoicing app"], "offer": "Invoicing app for freelance designers", "competitorNames": ["FreshBooks"], "maxQualified": 25, "maxDiscoveryChargeUsd": 0.5}`

</details>

#### List-mode rows — what a pasted record needs

`sourceMode: "list"` (and `dataset`) run on any Apify plan: rows in the `xquik/x-tweet-scraper` flat shape, or
`apidojo/tweet-scraper` / `kaitoeasyapi` output with its nested `author` object.

<details><summary>Fields a row can carry and what each switches on</summary>

| Field | Needed? | What it enables |
|---|---|---|
| `id` | required | `tweetId`, `dedupeKey`, `replyUrl` |
| `text` | required | the intent verdict, `need`, the reply draft |
| `authorUsername` (or `author.userName`, `author.username`) | optional | `authorProfileUrl`, the reply's @mention |
| `url` / `tweetUrl` / `twitterUrl` | optional | `url` (else built from handle + id) |
| `createdAt` | optional | `postedAt`, freshness, the date window |
| `authorDescription` (or `author.description`) | optional | `authorRole`, `authorCompany`, `authorEmail`, `icpFit` |
| `authorFollowers`, `authorFollowing` | optional | the follower band, `high_reach` |
| `authorUrl`, `authorCreatedAt`, `authorName`, `authorLocation`, `authorProfilePicture` | optional | `authorWebsite`, account age in `icpFit`, profile fields |
| `authorId`, `authorVerified` / `authorIsBlueVerified` | optional | one lead per person, `verified_author` |
| `authorIsAutomated`, `authorProtected`, `isRetweet` | optional | the free bot / protected / retweet rejects |
| `likeCount`, `replyCount`, `retweetCount`, `quoteCount`, `viewCount` | optional | engagement, `isUnanswered` |
| `lang`, `searchTerm`, `isReply`, `inReplyToUsername`, `isQuoteStatus` / `isQuote`, `quoted_tweet.text`, `conversationId`, `entities.hashtags`, `entities.urls`, `resultType` | optional | language filter, `matchedQuery`, thread context, the hashtag / affiliate-link guard, non-tweet rows skipped |

</details>

#### Run outcomes — what your integration sees

<details><summary>Every outcome: run status, dataset, <code>OUTPUT</code> field, charged?, what to do</summary>

| Outcome | Run status | Dataset | `OUTPUT` | Charged? | What to do |
|---|---|---|---|---|---|
| Free demo (the pre-filled sample) | SUCCEEDED | sample leads | `qualified` | no | type your own `productKeywords` |
| Success | SUCCEEDED | qualified leads, best first | funnel, `chargedEvents`, `aiCoverage` | per qualified lead | — |
| Nothing matched (the demo too) | SUCCEEDED | empty | `qualified: 0`, `rejectedByReason` | no | loosen `minScore` / filters, widen `withinDays` |
| Demo text still in place | SUCCEEDED | empty | `inputNeeded` | no | replace the field the status names with your own text |
| Invalid input | FAILED | empty | — | no | fix the field the status message names |
| Source failed (nothing loaded) | FAILED | empty | `sourceError` | no | follow the reason (plan, timeout); on any plan paste [list-mode rows](#list-mode-rows--what-a-pasted-record-needs) |
| Source partial (the source run timed out / was aborted after scraping) | SUCCEEDED | qualified leads from the tweets scraped | `sourceStatus` (`status`, `partial: true`) | per qualified lead | raise `discoveryTimeoutSecs` or lower `maxTweetsToScan` |
| AI unavailable | SUCCEEDED | rule-scored leads (the free demo: labelled sample AI verdicts, `aiModel: sample`) | `aiError`, `freeAiReserve`, `aiCoverage.sampleVerdicts` | free while your 25 free leads last, then basic price | `llmProvider: byok` with your own key |

</details>

### 👥 Who is it for?

| You are… | You run it to… | Start with |
|---|---|---|
| A SaaS founder / indie hacker | find people asking for a tool like yours today and answer first | `productKeywords` + `offer`, AI on |
| An SDR or growth marketer (B2B) | a daily ranked list of in-market prospects with role and company, in Slack or the CRM | + `icpBioKeywords`, `minScore: 70` |
| An agency | one saved task per client, scheduled, webhook to each client's pipeline | one `dedupeStoreName` + `webhookUrl` per client |
| A competitor-conquesting team | people complaining about or leaving a named competitor | `competitorNames`, `intentTypes: ["alternative_seeking", "pain_point"]` |

### 🧠 How the AI works

- **Grounded.** One tweet + the public profile per call; the `need` must be a verbatim quote and role / company must
  appear in the bio, else the rule value or null is kept.
- **Replies are checked.** A link other than `offerUrl`, a number not in the tweet or offer, or a "happy customer"
  claim → the template; weak leads and non-buyers get none.
- **Tokens only where they matter.** Every tweet past the free filters (rule intent ≥ 30), best rule score first,
  capped at `aiCandidateMultiplier` × `maxQualified`.
- **Model.** `anthropic/claude-haiku-4.5` via Apify's model access, or `llmProvider: "byok"` with your own key; if it
  fails, leads keep the rule verdict.

### 🔒 Data, compliance and limits

- Public tweets and profiles only, via X Tweet Scraper on your account — no X login; an e-mail only when the author
  published it in the bio. Not affiliated with X Corp. The Actor never posts — replies are drafts you send.
- X search returns what X indexes; niche terms can return few tweets. Use the output within X's terms and GDPR / CCPA.

### ❓ FAQ

**How much will one run cost me?** 500 tweets ≈ $0.075 on your account, capped by `maxDiscoveryChargeUsd` ($0.50);
≈ 20 leads × $0.009 with AI (× $0.0025 without) here, the first 25 free, plus ≈ $0.005 tokens each.

**Is this an X tweet scraper?** It runs `xquik/x-tweet-scraper` (X Tweet Scraper) for you and keeps only tweets from
people who want what you sell — you never pay us for the rest.

**Where do the twitter leads come from?** Public tweets asking for a tool like yours — one person, one tweet, the need
quoted; never a bought list.

**Why pay when X Advanced Search is free?** For a one-off look at a live thread it wins. It has no scoring, junk
removal, export, API, schedule or memory — you read every tweet, every day. This is the X Advanced Search alternative
for doing it daily.

**How is this an Octolens alternative?** Octolens and Brand24 sell monthly seats; here you pay per new qualified lead,
with a reply draft, and nothing when nothing new shows up. Octolens also watches Reddit, LinkedIn and Hacker News: this
Actor covers X; LinkedIn is [LinkedIn Buying Intent Leads](https://apify.com/rich_minds/linkedin-intent-leads);
Reddit and Hacker News are on the roadmap.

**Which Apify plan do I need?** Any plan runs the free demo. The live X search and Apify's model access need a plan
that can run Store Actors; on the free plan use `dataset` / `list` mode and `llmProvider: "byok"` — a free key
assesses a few leads per run, a paid Gemini / Groq key (billing on) every lead.

<details><summary>More questions — run time, free leads, CRM, agencies, empty runs, legality</summary>

**Do rule-scored leads use my free ones?** Yes — all 25 free leads count whatever the tier, except that when the AI
is unavailable the last 5 are kept for the AI, so you still see the AI tier free (`OUTPUT.chargeSplit.freeKeptForAi`).

**How long does a run take?** The demo: 0.1 s measured. A live search of 500 tweets: ≈ 1–2 min for X Tweet Scraper plus
≈ 2–4 s per AI call through Apify's model access, 8 at a time (estimate; every run reports `OUTPUT.timing`). With your
own key (`llmProvider: byok`), measured on 2026-09-27: ≈ 21 s per lead with a free Gemini 3.6 Flash key (4 leads in
86 s) — a 50-lead run ≈ 18 min, worst case ≈ 35 min per 100 leads (100 × 2 candidates, 2 at a time); the AI stops
after 2 minutes of rate-limit waiting and every row is still pushed. Pass `timeoutSecs` 3600 to `.call()` for 50 leads
with your own key, 1800 with Apify's model access.

**Is it a twitter lead finder or a keyword monitor?** A lead finder: a keyword monitor returns every mention, this
returns the few with buying intent, with the reason and the reply.

**How do I find customers on Twitter without reading all day?** Put your product words and offer in, schedule it
weekly: the digest brings only new buyers, ranked, each with a reply draft — minutes a week, not hours a day.

**Is this a twitter sales prospecting tool or a CRM?** Prospecting: it finds and ranks people; the HubSpot / Pipedrive
recipe under Integrations puts them in your CRM, upserted on `dedupeKey`.

**Is it a twitter prospecting tool for agencies?** Yes — one saved task per client today; a `clients` list in one run
is on the roadmap.

**What happens if nothing matches my filters?** The run succeeds with 0 rows, charges nothing, and
`rejectedByReason` says why.

**Will I be charged for the same lead twice?** Not with `dedupeAcrossRuns` on (default).

**What counts as a qualified lead?** A tweet that passed the free filters, mentions your terms or a competitor, shows
buying intent and scores at least `minScore` — and, with AI on, one the AI calls a genuine buyer.

**Is the data public / is this legal?** Public tweets and profiles only, no login; you use them within X's terms and
privacy law.

**Can I schedule it?** Yes — see [Run it weekly](#-run-it-weekly); you only pay for new leads.

</details>

### 🧩 More Actors from the same developer

Not quite your use case? The same pay-per-qualified-result model, closest to this Actor's buyers first:

- **[LinkedIn Buying Intent Leads](https://apify.com/rich_minds/linkedin-intent-leads)** — linkedin buying intent, linkedin intent signals, abm intent
- **[Link Building Prospects & Guest Post Finder (Google, AI)](https://apify.com/rich_minds/link-building-prospects-ai)** — backlink prospecting, link prospecting tool, link building prospects

### 🆘 Support

Something missing or wrong? Open an issue on the Actor's page — buyer requests ship first.

### 📝 Changelog

One line per published build, newest first — what changed for you: output, status messages, prices.

- **0.1.4** (2026-09-27) — 2026-09-27.md — M-01, M-02.
- **0.1.3** (2026-09-27) — your `offer` alone starts a live search (terms read from it, `OUTPUT.termsFromOffer`);
  scheduled runs cover the days since the last run and scan 1,000 tweets (`OUTPUT.scheduledSizing`); views and
  snippets use `score` / `label`; the status says only "N free leads left".
- **0.1.2** (2026-09-27) — AI on without model access: your first real leads get live verdicts; a live run saves its
  search as a task you schedule in one click; the digest and report name the LinkedIn sibling; HubSpot / Pipedrive
  recipe.
- **0.1.1** (2026-09-27) — initial release: buying-intent leads from X with free junk filters, the quoted need, ICP fit
  and a reply draft.

# Actor input Schema

## `productKeywords` (type: `array`):

1–10 words buyers use for what you sell, e.g. <code>email marketing</code>. They become X searches for “looking for / alternative to …”; only tweets that mention one are kept. Empty = 3–4 terms are read from <b>What do you sell?</b>. The live search runs X Tweet Scraper on your Apify plan (a plan that runs Store Actors).

## `sourceMode` (type: `string`):

<b>actor</b> — search X live with <code>xquik/x-tweet-scraper</code> on your account ($0.00015 per tweet, billed by that Actor). <b>dataset</b> — qualify an existing tweet dataset. <b>list</b> — tweets you paste in. <code>{}</code> over the API runs the free demo — nothing charged.

## `offer` (type: `string`):

One or two sentences, product first (<code>Invoicing app for freelance designers</code>). The AI judges each tweet's buying intent and the author's fit against it; reply drafts name it only where someone asked for a recommendation or an alternative. With the category terms empty, the search terms (and a competitor it names) are read from it.

## `minScore` (type: `integer`):

The field that decides what you pay: tweets whose lead score (intent 60 % + author fit 25 % + freshness 15 %) is below this are discarded and <b>not charged</b>. 80+ = hot, 60–79 = warm.

## `maxQualified` (type: `integer`):

Hard cap on results — and the ceiling of what <b>this Actor</b> charges: at most this many × $0.009 with AI on (× $0.0025 with AI off), e.g. 50 × $0.009 = $0.45; the source's own spend has its cap right below. The best-scoring leads come first.

## `maxDiscoveryChargeUsd` (type: `number`):

Hard cap on what the X Tweet Scraper run may charge your account in <b>actor</b> mode — $0.50 in the form and for an API or agent call that leaves it out (500 tweets cost ≈ $0.08). Raise it for bigger searches.

## `enableAi` (type: `boolean`):

An AI verdict per tweet: is this a genuine buyer, intent type, buying stage, the need quoted verbatim, the author's role and fit from the bio, and a reply draft. <b>On = $0.009 per qualified lead + AI tokens; off = $0.0025</b> (rule-based intent score, bio parser and a template reply).

## `notifyEmail` (type: `string`):

After every run with at least one new lead, the digest (how many are new, how many hot, the top 10 with links) is e-mailed here through Apify's send-mail Actor. Schedule the run daily or weekly and only new leads come to your inbox. Never sent for the free demo.

## `competitorNames` (type: `array`):

e.g. <code>Mailchimp</code>, <code>@klaviyo</code>. Adds searches for “Mailchimp alternative / switching from / cancel Mailchimp” (and complaints sent <code>to:</code> an <code>@handle</code>); their own accounts are excluded. The live search runs X Tweet Scraper on your Apify plan (a plan that runs Store Actors).

## `intentTypes` (type: `array`):

Which kinds of buying intent become leads. <b>Question</b> (“what do you use for …”) is off by default — it finds more, weaker leads.

## `icpBioKeywords` (type: `array`):

e.g. <code>founder</code>, <code>shopify</code>, <code>ecommerce</code>. An author whose public bio contains them gets a higher ICP fit (and the <code>icp\_match</code> flag).

## `minFollowers` (type: `integer`):

Authors with fewer followers are dropped free — throwaway and brand-new accounts.

## `maxFollowers` (type: `integer`):

Authors with more followers are dropped free — celebrities and media accounts rarely buy from a reply.

## `language` (type: `string`):

Only tweets in this language (X's own per-tweet language tag).

## `withinDays` (type: `integer`):

The search window (1–30 days). Older tweets are dropped — a 3-week-old question has usually been answered. A scheduled run covers the days since the last run of the same search (+1 day overlap) instead.

## `excludeTweetsWithLinks` (type: `boolean`):

Most vendor promos carry a link; buyers asking for advice rarely do. Adds <code>-filter:links</code> to every search.

## `ownHandles` (type: `array`):

Your brand and team handles (e.g. <code>@acme</code>) — never delivered as leads.

## `dedupeByAuthor` (type: `boolean`):

Keeps one lead per author per run (their latest tweet) and, across runs, never delivers the same person twice.

## `targetFlags` (type: `array`):

Only deliver leads that have at least one of these flags, e.g. <code>unanswered</code>, <code>decision\_maker</code>, <code>competitor\_mentioned</code> (<code>decisionMaker</code> works too). Leave empty to keep everything; an unknown name stops the run at once with the list of valid ones.

## `suppressionList` (type: `array`):

Handles, tweet URLs or tweet ids to never output (existing customers, people you already talked to). Skipped before any processing and never charged.

## `generateReplyDraft` (type: `boolean`):

A ≤ 280-character reply for every hot and warm lead, next to a one-click reply link. The Actor never posts — you send it yourself.

## `replyTone` (type: `string`):

The voice of the reply drafts.

## `offerUrl` (type: `string`):

The only link a reply draft may carry — used for recommendation and alternative requests, never invented when empty.

## `llmProvider` (type: `string`):

<b>Apify (no keys)</b> — the AI runs through Apify's built-in OpenRouter proxy; tokens are billed to your Apify account at OpenRouter's rates. <b>My own key</b> — use your OpenAI / Anthropic / Gemini / Groq key instead; a free-tier key assesses only a few leads per run — expect 1–3 AI checks (2 calls at a time, one after a rate limit, then the 3 borderline leads retried one by one) — and the rest keep their rule score; a paid Groq / Gemini key (billing on, ≈ $0.005 of tokens per lead) assesses every lead. Measured on 2026-09-27: ≈ 21 s per lead with a free Gemini 3.6 Flash key (4 leads in 86 s) — give a 50-lead own-key run a 3600 s timeout.

## `llmModel` (type: `string`):

Leave empty for the default (<code>anthropic/claude-haiku-4.5</code>). Apify mode takes an OpenRouter slug such as <code>openai/gpt-4.1-mini</code>; own-key mode takes <code>provider:model</code>, e.g. <code>anthropic:claude-haiku-4-5-20251001</code>.

## `llmApiKey` (type: `string`):

Required when <b>AI model access</b> is <i>My own API key</i>. Stored encrypted by Apify, never logged.

## `aiCandidateMultiplier` (type: `integer`):

How many tweets past the free filters (rule intent ≥ 30) get the AI pass, best rule score first, as a multiple of <b>Max leads</b>. Higher = more thorough, slower, more tokens.

## `slackWebhookUrl` (type: `string`):

A Slack incoming-webhook URL (<code>https://hooks.slack.com/services/…</code>). After every run with at least one new lead, the digest (new leads by intent type, the top hot leads with links) is posted to that channel as a readable message. Never sent for the free demo.

## `discordWebhookUrl` (type: `string`):

A Discord channel webhook URL (<code>https://discord.com/api/webhooks/…</code> — Server settings → Integrations → Webhooks). After every run with at least one new lead, the same digest as Slack is posted to that channel. Never sent for the free demo.

## `webhookUrl` (type: `string`):

Qualified leads are POSTed here as JSON (Zapier, Make, n8n, your CRM). For Google Sheets / Slack you can also use Apify's built-in Integrations tab. Stored encrypted — Zapier / Make hook URLs carry their secret in the path.

## `webhookHeaders` (type: `object`):

Extra HTTP headers for the webhook, e.g. <code>{"Authorization": "Bearer …"}</code>. Stored encrypted by Apify, never logged.

## `webhookBatchSize` (type: `integer`):

1 = one POST per lead the moment it is ready. Higher = one POST per N leads.

## `dedupeAcrossRuns` (type: `boolean`):

Remembers every tweet (and, with <b>One lead per person</b>, every author) you were charged for in a named key-value store on your account and skips it in future runs.

## `dedupeStoreName` (type: `string`):

Key-value store used for cross-run memory. Left at the default, the memory is kept per search (source, product terms, competitors, custom queries): rewording <code>offer</code> keeps it, so a scheduled run never re-delivers what you already have, and another search starts its own list. Running it for several clients on one account, type one name per client.

## `customSearchTerms` (type: `array`):

Raw X advanced-search queries appended as-is, e.g. <code>"need a CRM" min\_faves:2 -is:reply</code>. The live search runs X Tweet Scraper on your Apify plan (a plan that runs Store Actors).

## `maxTweetsToScan` (type: `integer`):

How many tweets X Tweet Scraper returns across all searches ($0.00015 each on your account: 500 ≈ $0.08). A lead needs roughly 20–50 scanned tweets. On a scheduled run the default 500 becomes 1,000, so a busy week is not cut off — still capped by <b>Max source spend</b>.

## `datasetId` (type: `string`):

Only for <b>dataset</b> mode: a dataset of <code>xquik/x-tweet-scraper</code>, <code>apidojo/tweet-scraper</code> or <code>kaitoeasyapi</code> tweets. Pick it so the Actor is granted read access.

## `itemsList` (type: `array`):

Only for <b>list</b> mode. JSON array of tweets with at least <code>id</code> and <code>text</code>, plus the author fields (<code>authorUsername</code>, <code>authorDescription</code>, <code>authorFollowers</code> …) — README → List-mode rows.

## `discoveryActorId` (type: `string`):

The Store Actor the live search runs. Another scraper's tweets are qualified with <b>dataset</b> mode.

## `discoveryInput` (type: `object`):

Only for <b>actor</b> mode. Extra fields merged over the input the Actor builds for X Tweet Scraper (e.g. <code>{"queryType": "Top"}</code>). The live search runs that Store Actor on your Apify plan — if your plan cannot run Store Actors, use <b>dataset</b> mode.

## `maxToProcess` (type: `integer`):

Upper bound on how many tweets past the free filters are scored in one run (controls run time). Default = 3 × max leads.

## Actor input object example

```json
{
  "productKeywords": [
    "email marketing",
    "newsletter tool"
  ],
  "sourceMode": "list",
  "offer": "Email marketing tool for Shopify stores",
  "minScore": 60,
  "maxQualified": 50,
  "maxDiscoveryChargeUsd": 0.5,
  "enableAi": true,
  "intentTypes": [
    "recommendation_request",
    "alternative_seeking",
    "buying_signal",
    "pain_point"
  ],
  "minFollowers": 20,
  "maxFollowers": 0,
  "language": "en",
  "withinDays": 7,
  "excludeTweetsWithLinks": true,
  "dedupeByAuthor": true,
  "generateReplyDraft": true,
  "replyTone": "helpful",
  "llmProvider": "apify",
  "aiCandidateMultiplier": 2,
  "webhookBatchSize": 1,
  "dedupeAcrossRuns": true,
  "dedupeStoreName": "twitter-lead-generation-ai-seen",
  "maxTweetsToScan": 500,
  "itemsList": [
    {
      "id": "1971839201584730112",
      "url": "https://x.com/mayachenmakes/status/1971839201584730112",
      "text": "Switching from Mailchimp, it's getting way too expensive for a 3k-subscriber list. What email marketing tool do other Shopify stores use?",
      "createdAt": "Sat Sep 26 14:12:00 +0000 2026",
      "lang": "en",
      "likeCount": 14,
      "replyCount": 1,
      "retweetCount": 2,
      "viewCount": 2310,
      "isReply": false,
      "isRetweet": false,
      "conversationId": "1971839201584730112",
      "searchTerm": "(\"Mailchimp alternative\" OR \"switching from Mailchimp\") -filter:nativeretweets -filter:links lang:en",
      "authorId": "1402937745",
      "authorUsername": "mayachenmakes",
      "authorName": "Maya Chen (sample)",
      "authorDescription": "Founder @threadandloom · handmade linen on Shopify · ecommerce nerd",
      "authorFollowers": 2140,
      "authorFollowing": 610,
      "authorLocation": "Portland, OR",
      "authorUrl": "https://threadandloom.example",
      "authorCreatedAt": "Tue Mar 03 09:00:00 +0000 2015",
      "authorIsBlueVerified": false,
      "authorIsAutomated": false,
      "authorProtected": false
    },
    {
      "id": "1971802655010341201",
      "url": "https://x.com/jdrewbakes/status/1971802655010341201",
      "text": "Can anyone recommend a newsletter tool that plays nice with Shopify? Need abandoned-cart emails without paying a fortune.",
      "createdAt": "Sat Sep 26 11:47:00 +0000 2026",
      "lang": "en",
      "likeCount": 6,
      "replyCount": 0,
      "retweetCount": 0,
      "viewCount": 880,
      "isReply": true,
      "inReplyToUsername": "shopify",
      "isRetweet": false,
      "conversationId": "1971797001882240000",
      "searchTerm": "(\"can anyone recommend\" OR \"any recommendations\") (\"email marketing\" OR \"newsletter tool\") -filter:nativeretweets -filter:links lang:en",
      "authorId": "2291840012",
      "authorUsername": "jdrewbakes",
      "authorName": "Jordan Drew (sample)",
      "authorDescription": "Owner at Drew's Bakehouse. Sourdough, Shopify and too much coffee. hello@drewsbakehouse.example",
      "authorFollowers": 860,
      "authorFollowing": 402,
      "authorLocation": "Leeds, UK",
      "authorCreatedAt": "Fri Jun 12 18:30:00 +0000 2020",
      "authorIsBlueVerified": false,
      "authorIsAutomated": false,
      "authorProtected": false
    },
    {
      "id": "1971790112930027520",
      "url": "https://x.com/kaylaships/status/1971790112930027520",
      "text": "Our Klaviyo bill doubled this year and flows keep breaking. Seriously looking for a Klaviyo alternative for email marketing before our renewal in October.",
      "createdAt": "Sat Sep 26 10:58:00 +0000 2026",
      "lang": "en",
      "likeCount": 41,
      "replyCount": 3,
      "retweetCount": 4,
      "viewCount": 9120,
      "isReply": false,
      "isRetweet": false,
      "conversationId": "1971790112930027520",
      "searchTerm": "(\"Klaviyo alternative\" OR \"switching from Klaviyo\") -filter:nativeretweets -filter:links lang:en",
      "authorId": "887123450",
      "authorUsername": "kaylaships",
      "authorName": "Kayla Ortiz (sample)",
      "authorDescription": "Head of Growth at Northpeak Supply | DTC & ecommerce",
      "authorFollowers": 5400,
      "authorFollowing": 1210,
      "authorLocation": "Austin, TX",
      "authorUrl": "https://northpeak.example",
      "authorCreatedAt": "Wed Jan 14 16:20:00 +0000 2015",
      "authorIsBlueVerified": true,
      "authorIsAutomated": false,
      "authorProtected": false
    },
    {
      "id": "1971761830077370988",
      "url": "https://x.com/priyamakes/status/1971761830077370988",
      "text": "Any recommendations for a newsletter tool that is free until 500 subscribers? Launching my candle shop on Shopify next week.",
      "createdAt": "Sat Sep 26 09:05:00 +0000 2026",
      "lang": "en",
      "likeCount": 3,
      "replyCount": 0,
      "retweetCount": 0,
      "viewCount": 410,
      "isReply": false,
      "isRetweet": false,
      "isQuoteStatus": true,
      "quoted_tweet": {
        "text": "Launch week checklist for new Shopify stores: domain, payments, a welcome email."
      },
      "conversationId": "1971761830077370988",
      "searchTerm": "(\"can anyone recommend\" OR \"any recommendations\") (\"email marketing\" OR \"newsletter tool\") -filter:nativeretweets -filter:links lang:en",
      "authorId": "1500021987",
      "authorUsername": "priyamakes",
      "authorName": "Priya Nair (sample)",
      "authorDescription": "Frontend developer. Building a tiny candle shop on the side.",
      "authorFollowers": 310,
      "authorFollowing": 280,
      "authorLocation": "Toronto",
      "authorCreatedAt": "Mon Mar 07 12:00:00 +0000 2022",
      "authorIsBlueVerified": false,
      "authorIsAutomated": false,
      "authorProtected": false
    },
    {
      "id": "1971755002111823872",
      "url": "https://x.com/benbuildsstuff/status/1971755002111823872",
      "text": "We just launched our new email marketing tool for Shopify! 50% off with code LAUNCH50, link in bio",
      "createdAt": "Sat Sep 26 08:38:00 +0000 2026",
      "lang": "en",
      "likeCount": 22,
      "replyCount": 5,
      "retweetCount": 6,
      "viewCount": 4020,
      "isReply": false,
      "isRetweet": false,
      "searchTerm": "(\"looking for\" OR \"best tool for\") (\"email marketing\" OR \"newsletter tool\") -filter:nativeretweets -filter:links lang:en",
      "authorId": "3301122334",
      "authorUsername": "benbuildsstuff",
      "authorName": "Ben Ruiz (sample)",
      "authorDescription": "Building MailBloom, email for Shopify",
      "authorFollowers": 1800,
      "authorIsAutomated": false,
      "authorProtected": false
    },
    {
      "id": "1971740188200001536",
      "url": "https://x.com/lumenhomegoods/status/1971740188200001536",
      "text": "We're hiring an email marketing manager for our Shopify brand! Remote, 3 days a week. DM me.",
      "createdAt": "Sat Sep 26 07:39:00 +0000 2026",
      "lang": "en",
      "likeCount": 9,
      "replyCount": 2,
      "retweetCount": 3,
      "viewCount": 1500,
      "isReply": false,
      "isRetweet": false,
      "searchTerm": "(\"looking for\" OR \"need a\") (\"email marketing\" OR \"newsletter tool\") -filter:nativeretweets -filter:links lang:en",
      "authorId": "4410092211",
      "authorUsername": "lumenhomegoods",
      "authorName": "Lumen Home Goods (sample)",
      "authorDescription": "Home goods, made slowly. Shopify store.",
      "authorFollowers": 7400,
      "authorIsAutomated": false,
      "authorProtected": false
    },
    {
      "id": "1971722904455512064",
      "url": "https://x.com/dealsdailyhq/status/1971722904455512064",
      "text": "GIVEAWAY: RT and follow to win a 1-year newsletter tool subscription! #giveaway #shopify #email #marketing #ecommerce #win",
      "createdAt": "Sat Sep 26 06:30:00 +0000 2026",
      "lang": "en",
      "likeCount": 120,
      "replyCount": 64,
      "retweetCount": 210,
      "viewCount": 22000,
      "isReply": false,
      "isRetweet": false,
      "searchTerm": "(\"looking for\" OR \"best tool for\") (\"email marketing\" OR \"newsletter tool\") -filter:nativeretweets -filter:links lang:en",
      "authorId": "5500112233",
      "authorUsername": "dealsdailyhq",
      "authorName": "Deals Daily (sample)",
      "authorDescription": "Daily deals for makers",
      "authorFollowers": 15800,
      "authorIsAutomated": false,
      "authorProtected": false
    },
    {
      "id": "1971710077431996416",
      "url": "https://x.com/marcuswebb_ecom/status/1971710077431996416",
      "text": "Not looking for recommendations, just venting: email marketing deliverability in 2026 is a mess.",
      "createdAt": "Sat Sep 26 05:39:00 +0000 2026",
      "lang": "en",
      "likeCount": 33,
      "replyCount": 12,
      "retweetCount": 2,
      "viewCount": 6100,
      "isReply": false,
      "isRetweet": false,
      "searchTerm": "(\"sick of\" OR \"frustrated with\") (\"email marketing\" OR \"newsletter tool\") -filter:nativeretweets -filter:links lang:en",
      "authorId": "6612300441",
      "authorUsername": "marcuswebb_ecom",
      "authorName": "Marcus Webb (sample)",
      "authorDescription": "Ecommerce consultant. I help Shopify brands grow retention.",
      "authorFollowers": 12800,
      "authorIsAutomated": false,
      "authorProtected": false
    },
    {
      "id": "1971698830113120256",
      "url": "https://x.com/shoptipsbot/status/1971698830113120256",
      "text": "Looking for an email marketing tool? Here are 5 we tested for Shopify stores this month",
      "createdAt": "Sat Sep 26 04:54:00 +0000 2026",
      "lang": "en",
      "likeCount": 2,
      "replyCount": 0,
      "retweetCount": 1,
      "viewCount": 300,
      "isReply": false,
      "isRetweet": false,
      "searchTerm": "(\"looking for\" OR \"best tool for\") (\"email marketing\" OR \"newsletter tool\") -filter:nativeretweets -filter:links lang:en",
      "authorId": "7700998811",
      "authorUsername": "shoptipsbot",
      "authorName": "Shop Tips Bot (sample)",
      "authorDescription": "Automated tips for online stores",
      "authorFollowers": 950,
      "authorIsAutomated": true,
      "authorProtected": false
    }
  ],
  "discoveryActorId": "xquik/x-tweet-scraper",
  "discoveryInput": {}
}
```

# Actor output Schema

## `qualified` (type: `string`):

All qualified leads as JSON, best-scoring first.

## `sheet` (type: `string`):

The same leads as a spreadsheet.

## `runSummary` (type: `string`):

JSON record with the funnel (loaded -> filtered -> AI-assessed -> qualified), per-reason skip counts, charged events by type, free-tier leads used and remaining, whether a budget limit was reached, webhook delivery counts and the dedupe store size.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "productKeywords": [
        "email marketing",
        "newsletter tool"
    ],
    "sourceMode": "list",
    "offer": "Email marketing tool for Shopify stores",
    "maxDiscoveryChargeUsd": 0.5,
    "itemsList": [
        {
            "id": "1971839201584730112",
            "url": "https://x.com/mayachenmakes/status/1971839201584730112",
            "text": "Switching from Mailchimp, it's getting way too expensive for a 3k-subscriber list. What email marketing tool do other Shopify stores use?",
            "createdAt": "Sat Sep 26 14:12:00 +0000 2026",
            "lang": "en",
            "likeCount": 14,
            "replyCount": 1,
            "retweetCount": 2,
            "viewCount": 2310,
            "isReply": false,
            "isRetweet": false,
            "conversationId": "1971839201584730112",
            "searchTerm": "(\"Mailchimp alternative\" OR \"switching from Mailchimp\") -filter:nativeretweets -filter:links lang:en",
            "authorId": "1402937745",
            "authorUsername": "mayachenmakes",
            "authorName": "Maya Chen (sample)",
            "authorDescription": "Founder @threadandloom · handmade linen on Shopify · ecommerce nerd",
            "authorFollowers": 2140,
            "authorFollowing": 610,
            "authorLocation": "Portland, OR",
            "authorUrl": "https://threadandloom.example",
            "authorCreatedAt": "Tue Mar 03 09:00:00 +0000 2015",
            "authorIsBlueVerified": false,
            "authorIsAutomated": false,
            "authorProtected": false
        },
        {
            "id": "1971802655010341201",
            "url": "https://x.com/jdrewbakes/status/1971802655010341201",
            "text": "Can anyone recommend a newsletter tool that plays nice with Shopify? Need abandoned-cart emails without paying a fortune.",
            "createdAt": "Sat Sep 26 11:47:00 +0000 2026",
            "lang": "en",
            "likeCount": 6,
            "replyCount": 0,
            "retweetCount": 0,
            "viewCount": 880,
            "isReply": true,
            "inReplyToUsername": "shopify",
            "isRetweet": false,
            "conversationId": "1971797001882240000",
            "searchTerm": "(\"can anyone recommend\" OR \"any recommendations\") (\"email marketing\" OR \"newsletter tool\") -filter:nativeretweets -filter:links lang:en",
            "authorId": "2291840012",
            "authorUsername": "jdrewbakes",
            "authorName": "Jordan Drew (sample)",
            "authorDescription": "Owner at Drew's Bakehouse. Sourdough, Shopify and too much coffee. hello@drewsbakehouse.example",
            "authorFollowers": 860,
            "authorFollowing": 402,
            "authorLocation": "Leeds, UK",
            "authorCreatedAt": "Fri Jun 12 18:30:00 +0000 2020",
            "authorIsBlueVerified": false,
            "authorIsAutomated": false,
            "authorProtected": false
        },
        {
            "id": "1971790112930027520",
            "url": "https://x.com/kaylaships/status/1971790112930027520",
            "text": "Our Klaviyo bill doubled this year and flows keep breaking. Seriously looking for a Klaviyo alternative for email marketing before our renewal in October.",
            "createdAt": "Sat Sep 26 10:58:00 +0000 2026",
            "lang": "en",
            "likeCount": 41,
            "replyCount": 3,
            "retweetCount": 4,
            "viewCount": 9120,
            "isReply": false,
            "isRetweet": false,
            "conversationId": "1971790112930027520",
            "searchTerm": "(\"Klaviyo alternative\" OR \"switching from Klaviyo\") -filter:nativeretweets -filter:links lang:en",
            "authorId": "887123450",
            "authorUsername": "kaylaships",
            "authorName": "Kayla Ortiz (sample)",
            "authorDescription": "Head of Growth at Northpeak Supply | DTC & ecommerce",
            "authorFollowers": 5400,
            "authorFollowing": 1210,
            "authorLocation": "Austin, TX",
            "authorUrl": "https://northpeak.example",
            "authorCreatedAt": "Wed Jan 14 16:20:00 +0000 2015",
            "authorIsBlueVerified": true,
            "authorIsAutomated": false,
            "authorProtected": false
        },
        {
            "id": "1971761830077370988",
            "url": "https://x.com/priyamakes/status/1971761830077370988",
            "text": "Any recommendations for a newsletter tool that is free until 500 subscribers? Launching my candle shop on Shopify next week.",
            "createdAt": "Sat Sep 26 09:05:00 +0000 2026",
            "lang": "en",
            "likeCount": 3,
            "replyCount": 0,
            "retweetCount": 0,
            "viewCount": 410,
            "isReply": false,
            "isRetweet": false,
            "isQuoteStatus": true,
            "quoted_tweet": {
                "text": "Launch week checklist for new Shopify stores: domain, payments, a welcome email."
            },
            "conversationId": "1971761830077370988",
            "searchTerm": "(\"can anyone recommend\" OR \"any recommendations\") (\"email marketing\" OR \"newsletter tool\") -filter:nativeretweets -filter:links lang:en",
            "authorId": "1500021987",
            "authorUsername": "priyamakes",
            "authorName": "Priya Nair (sample)",
            "authorDescription": "Frontend developer. Building a tiny candle shop on the side.",
            "authorFollowers": 310,
            "authorFollowing": 280,
            "authorLocation": "Toronto",
            "authorCreatedAt": "Mon Mar 07 12:00:00 +0000 2022",
            "authorIsBlueVerified": false,
            "authorIsAutomated": false,
            "authorProtected": false
        },
        {
            "id": "1971755002111823872",
            "url": "https://x.com/benbuildsstuff/status/1971755002111823872",
            "text": "We just launched our new email marketing tool for Shopify! 50% off with code LAUNCH50, link in bio",
            "createdAt": "Sat Sep 26 08:38:00 +0000 2026",
            "lang": "en",
            "likeCount": 22,
            "replyCount": 5,
            "retweetCount": 6,
            "viewCount": 4020,
            "isReply": false,
            "isRetweet": false,
            "searchTerm": "(\"looking for\" OR \"best tool for\") (\"email marketing\" OR \"newsletter tool\") -filter:nativeretweets -filter:links lang:en",
            "authorId": "3301122334",
            "authorUsername": "benbuildsstuff",
            "authorName": "Ben Ruiz (sample)",
            "authorDescription": "Building MailBloom, email for Shopify",
            "authorFollowers": 1800,
            "authorIsAutomated": false,
            "authorProtected": false
        },
        {
            "id": "1971740188200001536",
            "url": "https://x.com/lumenhomegoods/status/1971740188200001536",
            "text": "We're hiring an email marketing manager for our Shopify brand! Remote, 3 days a week. DM me.",
            "createdAt": "Sat Sep 26 07:39:00 +0000 2026",
            "lang": "en",
            "likeCount": 9,
            "replyCount": 2,
            "retweetCount": 3,
            "viewCount": 1500,
            "isReply": false,
            "isRetweet": false,
            "searchTerm": "(\"looking for\" OR \"need a\") (\"email marketing\" OR \"newsletter tool\") -filter:nativeretweets -filter:links lang:en",
            "authorId": "4410092211",
            "authorUsername": "lumenhomegoods",
            "authorName": "Lumen Home Goods (sample)",
            "authorDescription": "Home goods, made slowly. Shopify store.",
            "authorFollowers": 7400,
            "authorIsAutomated": false,
            "authorProtected": false
        },
        {
            "id": "1971722904455512064",
            "url": "https://x.com/dealsdailyhq/status/1971722904455512064",
            "text": "GIVEAWAY: RT and follow to win a 1-year newsletter tool subscription! #giveaway #shopify #email #marketing #ecommerce #win",
            "createdAt": "Sat Sep 26 06:30:00 +0000 2026",
            "lang": "en",
            "likeCount": 120,
            "replyCount": 64,
            "retweetCount": 210,
            "viewCount": 22000,
            "isReply": false,
            "isRetweet": false,
            "searchTerm": "(\"looking for\" OR \"best tool for\") (\"email marketing\" OR \"newsletter tool\") -filter:nativeretweets -filter:links lang:en",
            "authorId": "5500112233",
            "authorUsername": "dealsdailyhq",
            "authorName": "Deals Daily (sample)",
            "authorDescription": "Daily deals for makers",
            "authorFollowers": 15800,
            "authorIsAutomated": false,
            "authorProtected": false
        },
        {
            "id": "1971710077431996416",
            "url": "https://x.com/marcuswebb_ecom/status/1971710077431996416",
            "text": "Not looking for recommendations, just venting: email marketing deliverability in 2026 is a mess.",
            "createdAt": "Sat Sep 26 05:39:00 +0000 2026",
            "lang": "en",
            "likeCount": 33,
            "replyCount": 12,
            "retweetCount": 2,
            "viewCount": 6100,
            "isReply": false,
            "isRetweet": false,
            "searchTerm": "(\"sick of\" OR \"frustrated with\") (\"email marketing\" OR \"newsletter tool\") -filter:nativeretweets -filter:links lang:en",
            "authorId": "6612300441",
            "authorUsername": "marcuswebb_ecom",
            "authorName": "Marcus Webb (sample)",
            "authorDescription": "Ecommerce consultant. I help Shopify brands grow retention.",
            "authorFollowers": 12800,
            "authorIsAutomated": false,
            "authorProtected": false
        },
        {
            "id": "1971698830113120256",
            "url": "https://x.com/shoptipsbot/status/1971698830113120256",
            "text": "Looking for an email marketing tool? Here are 5 we tested for Shopify stores this month",
            "createdAt": "Sat Sep 26 04:54:00 +0000 2026",
            "lang": "en",
            "likeCount": 2,
            "replyCount": 0,
            "retweetCount": 1,
            "viewCount": 300,
            "isReply": false,
            "isRetweet": false,
            "searchTerm": "(\"looking for\" OR \"best tool for\") (\"email marketing\" OR \"newsletter tool\") -filter:nativeretweets -filter:links lang:en",
            "authorId": "7700998811",
            "authorUsername": "shoptipsbot",
            "authorName": "Shop Tips Bot (sample)",
            "authorDescription": "Automated tips for online stores",
            "authorFollowers": 950,
            "authorIsAutomated": true,
            "authorProtected": false
        }
    ],
    "discoveryInput": {}
};

// Run the Actor and wait for it to finish
const run = await client.actor("rich_minds/twitter-lead-generation-ai").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "productKeywords": [
        "email marketing",
        "newsletter tool",
    ],
    "sourceMode": "list",
    "offer": "Email marketing tool for Shopify stores",
    "maxDiscoveryChargeUsd": 0.5,
    "itemsList": [
        {
            "id": "1971839201584730112",
            "url": "https://x.com/mayachenmakes/status/1971839201584730112",
            "text": "Switching from Mailchimp, it's getting way too expensive for a 3k-subscriber list. What email marketing tool do other Shopify stores use?",
            "createdAt": "Sat Sep 26 14:12:00 +0000 2026",
            "lang": "en",
            "likeCount": 14,
            "replyCount": 1,
            "retweetCount": 2,
            "viewCount": 2310,
            "isReply": False,
            "isRetweet": False,
            "conversationId": "1971839201584730112",
            "searchTerm": "(\"Mailchimp alternative\" OR \"switching from Mailchimp\") -filter:nativeretweets -filter:links lang:en",
            "authorId": "1402937745",
            "authorUsername": "mayachenmakes",
            "authorName": "Maya Chen (sample)",
            "authorDescription": "Founder @threadandloom · handmade linen on Shopify · ecommerce nerd",
            "authorFollowers": 2140,
            "authorFollowing": 610,
            "authorLocation": "Portland, OR",
            "authorUrl": "https://threadandloom.example",
            "authorCreatedAt": "Tue Mar 03 09:00:00 +0000 2015",
            "authorIsBlueVerified": False,
            "authorIsAutomated": False,
            "authorProtected": False,
        },
        {
            "id": "1971802655010341201",
            "url": "https://x.com/jdrewbakes/status/1971802655010341201",
            "text": "Can anyone recommend a newsletter tool that plays nice with Shopify? Need abandoned-cart emails without paying a fortune.",
            "createdAt": "Sat Sep 26 11:47:00 +0000 2026",
            "lang": "en",
            "likeCount": 6,
            "replyCount": 0,
            "retweetCount": 0,
            "viewCount": 880,
            "isReply": True,
            "inReplyToUsername": "shopify",
            "isRetweet": False,
            "conversationId": "1971797001882240000",
            "searchTerm": "(\"can anyone recommend\" OR \"any recommendations\") (\"email marketing\" OR \"newsletter tool\") -filter:nativeretweets -filter:links lang:en",
            "authorId": "2291840012",
            "authorUsername": "jdrewbakes",
            "authorName": "Jordan Drew (sample)",
            "authorDescription": "Owner at Drew's Bakehouse. Sourdough, Shopify and too much coffee. hello@drewsbakehouse.example",
            "authorFollowers": 860,
            "authorFollowing": 402,
            "authorLocation": "Leeds, UK",
            "authorCreatedAt": "Fri Jun 12 18:30:00 +0000 2020",
            "authorIsBlueVerified": False,
            "authorIsAutomated": False,
            "authorProtected": False,
        },
        {
            "id": "1971790112930027520",
            "url": "https://x.com/kaylaships/status/1971790112930027520",
            "text": "Our Klaviyo bill doubled this year and flows keep breaking. Seriously looking for a Klaviyo alternative for email marketing before our renewal in October.",
            "createdAt": "Sat Sep 26 10:58:00 +0000 2026",
            "lang": "en",
            "likeCount": 41,
            "replyCount": 3,
            "retweetCount": 4,
            "viewCount": 9120,
            "isReply": False,
            "isRetweet": False,
            "conversationId": "1971790112930027520",
            "searchTerm": "(\"Klaviyo alternative\" OR \"switching from Klaviyo\") -filter:nativeretweets -filter:links lang:en",
            "authorId": "887123450",
            "authorUsername": "kaylaships",
            "authorName": "Kayla Ortiz (sample)",
            "authorDescription": "Head of Growth at Northpeak Supply | DTC & ecommerce",
            "authorFollowers": 5400,
            "authorFollowing": 1210,
            "authorLocation": "Austin, TX",
            "authorUrl": "https://northpeak.example",
            "authorCreatedAt": "Wed Jan 14 16:20:00 +0000 2015",
            "authorIsBlueVerified": True,
            "authorIsAutomated": False,
            "authorProtected": False,
        },
        {
            "id": "1971761830077370988",
            "url": "https://x.com/priyamakes/status/1971761830077370988",
            "text": "Any recommendations for a newsletter tool that is free until 500 subscribers? Launching my candle shop on Shopify next week.",
            "createdAt": "Sat Sep 26 09:05:00 +0000 2026",
            "lang": "en",
            "likeCount": 3,
            "replyCount": 0,
            "retweetCount": 0,
            "viewCount": 410,
            "isReply": False,
            "isRetweet": False,
            "isQuoteStatus": True,
            "quoted_tweet": { "text": "Launch week checklist for new Shopify stores: domain, payments, a welcome email." },
            "conversationId": "1971761830077370988",
            "searchTerm": "(\"can anyone recommend\" OR \"any recommendations\") (\"email marketing\" OR \"newsletter tool\") -filter:nativeretweets -filter:links lang:en",
            "authorId": "1500021987",
            "authorUsername": "priyamakes",
            "authorName": "Priya Nair (sample)",
            "authorDescription": "Frontend developer. Building a tiny candle shop on the side.",
            "authorFollowers": 310,
            "authorFollowing": 280,
            "authorLocation": "Toronto",
            "authorCreatedAt": "Mon Mar 07 12:00:00 +0000 2022",
            "authorIsBlueVerified": False,
            "authorIsAutomated": False,
            "authorProtected": False,
        },
        {
            "id": "1971755002111823872",
            "url": "https://x.com/benbuildsstuff/status/1971755002111823872",
            "text": "We just launched our new email marketing tool for Shopify! 50% off with code LAUNCH50, link in bio",
            "createdAt": "Sat Sep 26 08:38:00 +0000 2026",
            "lang": "en",
            "likeCount": 22,
            "replyCount": 5,
            "retweetCount": 6,
            "viewCount": 4020,
            "isReply": False,
            "isRetweet": False,
            "searchTerm": "(\"looking for\" OR \"best tool for\") (\"email marketing\" OR \"newsletter tool\") -filter:nativeretweets -filter:links lang:en",
            "authorId": "3301122334",
            "authorUsername": "benbuildsstuff",
            "authorName": "Ben Ruiz (sample)",
            "authorDescription": "Building MailBloom, email for Shopify",
            "authorFollowers": 1800,
            "authorIsAutomated": False,
            "authorProtected": False,
        },
        {
            "id": "1971740188200001536",
            "url": "https://x.com/lumenhomegoods/status/1971740188200001536",
            "text": "We're hiring an email marketing manager for our Shopify brand! Remote, 3 days a week. DM me.",
            "createdAt": "Sat Sep 26 07:39:00 +0000 2026",
            "lang": "en",
            "likeCount": 9,
            "replyCount": 2,
            "retweetCount": 3,
            "viewCount": 1500,
            "isReply": False,
            "isRetweet": False,
            "searchTerm": "(\"looking for\" OR \"need a\") (\"email marketing\" OR \"newsletter tool\") -filter:nativeretweets -filter:links lang:en",
            "authorId": "4410092211",
            "authorUsername": "lumenhomegoods",
            "authorName": "Lumen Home Goods (sample)",
            "authorDescription": "Home goods, made slowly. Shopify store.",
            "authorFollowers": 7400,
            "authorIsAutomated": False,
            "authorProtected": False,
        },
        {
            "id": "1971722904455512064",
            "url": "https://x.com/dealsdailyhq/status/1971722904455512064",
            "text": "GIVEAWAY: RT and follow to win a 1-year newsletter tool subscription! #giveaway #shopify #email #marketing #ecommerce #win",
            "createdAt": "Sat Sep 26 06:30:00 +0000 2026",
            "lang": "en",
            "likeCount": 120,
            "replyCount": 64,
            "retweetCount": 210,
            "viewCount": 22000,
            "isReply": False,
            "isRetweet": False,
            "searchTerm": "(\"looking for\" OR \"best tool for\") (\"email marketing\" OR \"newsletter tool\") -filter:nativeretweets -filter:links lang:en",
            "authorId": "5500112233",
            "authorUsername": "dealsdailyhq",
            "authorName": "Deals Daily (sample)",
            "authorDescription": "Daily deals for makers",
            "authorFollowers": 15800,
            "authorIsAutomated": False,
            "authorProtected": False,
        },
        {
            "id": "1971710077431996416",
            "url": "https://x.com/marcuswebb_ecom/status/1971710077431996416",
            "text": "Not looking for recommendations, just venting: email marketing deliverability in 2026 is a mess.",
            "createdAt": "Sat Sep 26 05:39:00 +0000 2026",
            "lang": "en",
            "likeCount": 33,
            "replyCount": 12,
            "retweetCount": 2,
            "viewCount": 6100,
            "isReply": False,
            "isRetweet": False,
            "searchTerm": "(\"sick of\" OR \"frustrated with\") (\"email marketing\" OR \"newsletter tool\") -filter:nativeretweets -filter:links lang:en",
            "authorId": "6612300441",
            "authorUsername": "marcuswebb_ecom",
            "authorName": "Marcus Webb (sample)",
            "authorDescription": "Ecommerce consultant. I help Shopify brands grow retention.",
            "authorFollowers": 12800,
            "authorIsAutomated": False,
            "authorProtected": False,
        },
        {
            "id": "1971698830113120256",
            "url": "https://x.com/shoptipsbot/status/1971698830113120256",
            "text": "Looking for an email marketing tool? Here are 5 we tested for Shopify stores this month",
            "createdAt": "Sat Sep 26 04:54:00 +0000 2026",
            "lang": "en",
            "likeCount": 2,
            "replyCount": 0,
            "retweetCount": 1,
            "viewCount": 300,
            "isReply": False,
            "isRetweet": False,
            "searchTerm": "(\"looking for\" OR \"best tool for\") (\"email marketing\" OR \"newsletter tool\") -filter:nativeretweets -filter:links lang:en",
            "authorId": "7700998811",
            "authorUsername": "shoptipsbot",
            "authorName": "Shop Tips Bot (sample)",
            "authorDescription": "Automated tips for online stores",
            "authorFollowers": 950,
            "authorIsAutomated": True,
            "authorProtected": False,
        },
    ],
    "discoveryInput": {},
}

# Run the Actor and wait for it to finish
run = client.actor("rich_minds/twitter-lead-generation-ai").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "productKeywords": [
    "email marketing",
    "newsletter tool"
  ],
  "sourceMode": "list",
  "offer": "Email marketing tool for Shopify stores",
  "maxDiscoveryChargeUsd": 0.5,
  "itemsList": [
    {
      "id": "1971839201584730112",
      "url": "https://x.com/mayachenmakes/status/1971839201584730112",
      "text": "Switching from Mailchimp, it'\''s getting way too expensive for a 3k-subscriber list. What email marketing tool do other Shopify stores use?",
      "createdAt": "Sat Sep 26 14:12:00 +0000 2026",
      "lang": "en",
      "likeCount": 14,
      "replyCount": 1,
      "retweetCount": 2,
      "viewCount": 2310,
      "isReply": false,
      "isRetweet": false,
      "conversationId": "1971839201584730112",
      "searchTerm": "(\\"Mailchimp alternative\\" OR \\"switching from Mailchimp\\") -filter:nativeretweets -filter:links lang:en",
      "authorId": "1402937745",
      "authorUsername": "mayachenmakes",
      "authorName": "Maya Chen (sample)",
      "authorDescription": "Founder @threadandloom · handmade linen on Shopify · ecommerce nerd",
      "authorFollowers": 2140,
      "authorFollowing": 610,
      "authorLocation": "Portland, OR",
      "authorUrl": "https://threadandloom.example",
      "authorCreatedAt": "Tue Mar 03 09:00:00 +0000 2015",
      "authorIsBlueVerified": false,
      "authorIsAutomated": false,
      "authorProtected": false
    },
    {
      "id": "1971802655010341201",
      "url": "https://x.com/jdrewbakes/status/1971802655010341201",
      "text": "Can anyone recommend a newsletter tool that plays nice with Shopify? Need abandoned-cart emails without paying a fortune.",
      "createdAt": "Sat Sep 26 11:47:00 +0000 2026",
      "lang": "en",
      "likeCount": 6,
      "replyCount": 0,
      "retweetCount": 0,
      "viewCount": 880,
      "isReply": true,
      "inReplyToUsername": "shopify",
      "isRetweet": false,
      "conversationId": "1971797001882240000",
      "searchTerm": "(\\"can anyone recommend\\" OR \\"any recommendations\\") (\\"email marketing\\" OR \\"newsletter tool\\") -filter:nativeretweets -filter:links lang:en",
      "authorId": "2291840012",
      "authorUsername": "jdrewbakes",
      "authorName": "Jordan Drew (sample)",
      "authorDescription": "Owner at Drew'\''s Bakehouse. Sourdough, Shopify and too much coffee. hello@drewsbakehouse.example",
      "authorFollowers": 860,
      "authorFollowing": 402,
      "authorLocation": "Leeds, UK",
      "authorCreatedAt": "Fri Jun 12 18:30:00 +0000 2020",
      "authorIsBlueVerified": false,
      "authorIsAutomated": false,
      "authorProtected": false
    },
    {
      "id": "1971790112930027520",
      "url": "https://x.com/kaylaships/status/1971790112930027520",
      "text": "Our Klaviyo bill doubled this year and flows keep breaking. Seriously looking for a Klaviyo alternative for email marketing before our renewal in October.",
      "createdAt": "Sat Sep 26 10:58:00 +0000 2026",
      "lang": "en",
      "likeCount": 41,
      "replyCount": 3,
      "retweetCount": 4,
      "viewCount": 9120,
      "isReply": false,
      "isRetweet": false,
      "conversationId": "1971790112930027520",
      "searchTerm": "(\\"Klaviyo alternative\\" OR \\"switching from Klaviyo\\") -filter:nativeretweets -filter:links lang:en",
      "authorId": "887123450",
      "authorUsername": "kaylaships",
      "authorName": "Kayla Ortiz (sample)",
      "authorDescription": "Head of Growth at Northpeak Supply | DTC & ecommerce",
      "authorFollowers": 5400,
      "authorFollowing": 1210,
      "authorLocation": "Austin, TX",
      "authorUrl": "https://northpeak.example",
      "authorCreatedAt": "Wed Jan 14 16:20:00 +0000 2015",
      "authorIsBlueVerified": true,
      "authorIsAutomated": false,
      "authorProtected": false
    },
    {
      "id": "1971761830077370988",
      "url": "https://x.com/priyamakes/status/1971761830077370988",
      "text": "Any recommendations for a newsletter tool that is free until 500 subscribers? Launching my candle shop on Shopify next week.",
      "createdAt": "Sat Sep 26 09:05:00 +0000 2026",
      "lang": "en",
      "likeCount": 3,
      "replyCount": 0,
      "retweetCount": 0,
      "viewCount": 410,
      "isReply": false,
      "isRetweet": false,
      "isQuoteStatus": true,
      "quoted_tweet": {
        "text": "Launch week checklist for new Shopify stores: domain, payments, a welcome email."
      },
      "conversationId": "1971761830077370988",
      "searchTerm": "(\\"can anyone recommend\\" OR \\"any recommendations\\") (\\"email marketing\\" OR \\"newsletter tool\\") -filter:nativeretweets -filter:links lang:en",
      "authorId": "1500021987",
      "authorUsername": "priyamakes",
      "authorName": "Priya Nair (sample)",
      "authorDescription": "Frontend developer. Building a tiny candle shop on the side.",
      "authorFollowers": 310,
      "authorFollowing": 280,
      "authorLocation": "Toronto",
      "authorCreatedAt": "Mon Mar 07 12:00:00 +0000 2022",
      "authorIsBlueVerified": false,
      "authorIsAutomated": false,
      "authorProtected": false
    },
    {
      "id": "1971755002111823872",
      "url": "https://x.com/benbuildsstuff/status/1971755002111823872",
      "text": "We just launched our new email marketing tool for Shopify! 50% off with code LAUNCH50, link in bio",
      "createdAt": "Sat Sep 26 08:38:00 +0000 2026",
      "lang": "en",
      "likeCount": 22,
      "replyCount": 5,
      "retweetCount": 6,
      "viewCount": 4020,
      "isReply": false,
      "isRetweet": false,
      "searchTerm": "(\\"looking for\\" OR \\"best tool for\\") (\\"email marketing\\" OR \\"newsletter tool\\") -filter:nativeretweets -filter:links lang:en",
      "authorId": "3301122334",
      "authorUsername": "benbuildsstuff",
      "authorName": "Ben Ruiz (sample)",
      "authorDescription": "Building MailBloom, email for Shopify",
      "authorFollowers": 1800,
      "authorIsAutomated": false,
      "authorProtected": false
    },
    {
      "id": "1971740188200001536",
      "url": "https://x.com/lumenhomegoods/status/1971740188200001536",
      "text": "We'\''re hiring an email marketing manager for our Shopify brand! Remote, 3 days a week. DM me.",
      "createdAt": "Sat Sep 26 07:39:00 +0000 2026",
      "lang": "en",
      "likeCount": 9,
      "replyCount": 2,
      "retweetCount": 3,
      "viewCount": 1500,
      "isReply": false,
      "isRetweet": false,
      "searchTerm": "(\\"looking for\\" OR \\"need a\\") (\\"email marketing\\" OR \\"newsletter tool\\") -filter:nativeretweets -filter:links lang:en",
      "authorId": "4410092211",
      "authorUsername": "lumenhomegoods",
      "authorName": "Lumen Home Goods (sample)",
      "authorDescription": "Home goods, made slowly. Shopify store.",
      "authorFollowers": 7400,
      "authorIsAutomated": false,
      "authorProtected": false
    },
    {
      "id": "1971722904455512064",
      "url": "https://x.com/dealsdailyhq/status/1971722904455512064",
      "text": "GIVEAWAY: RT and follow to win a 1-year newsletter tool subscription! #giveaway #shopify #email #marketing #ecommerce #win",
      "createdAt": "Sat Sep 26 06:30:00 +0000 2026",
      "lang": "en",
      "likeCount": 120,
      "replyCount": 64,
      "retweetCount": 210,
      "viewCount": 22000,
      "isReply": false,
      "isRetweet": false,
      "searchTerm": "(\\"looking for\\" OR \\"best tool for\\") (\\"email marketing\\" OR \\"newsletter tool\\") -filter:nativeretweets -filter:links lang:en",
      "authorId": "5500112233",
      "authorUsername": "dealsdailyhq",
      "authorName": "Deals Daily (sample)",
      "authorDescription": "Daily deals for makers",
      "authorFollowers": 15800,
      "authorIsAutomated": false,
      "authorProtected": false
    },
    {
      "id": "1971710077431996416",
      "url": "https://x.com/marcuswebb_ecom/status/1971710077431996416",
      "text": "Not looking for recommendations, just venting: email marketing deliverability in 2026 is a mess.",
      "createdAt": "Sat Sep 26 05:39:00 +0000 2026",
      "lang": "en",
      "likeCount": 33,
      "replyCount": 12,
      "retweetCount": 2,
      "viewCount": 6100,
      "isReply": false,
      "isRetweet": false,
      "searchTerm": "(\\"sick of\\" OR \\"frustrated with\\") (\\"email marketing\\" OR \\"newsletter tool\\") -filter:nativeretweets -filter:links lang:en",
      "authorId": "6612300441",
      "authorUsername": "marcuswebb_ecom",
      "authorName": "Marcus Webb (sample)",
      "authorDescription": "Ecommerce consultant. I help Shopify brands grow retention.",
      "authorFollowers": 12800,
      "authorIsAutomated": false,
      "authorProtected": false
    },
    {
      "id": "1971698830113120256",
      "url": "https://x.com/shoptipsbot/status/1971698830113120256",
      "text": "Looking for an email marketing tool? Here are 5 we tested for Shopify stores this month",
      "createdAt": "Sat Sep 26 04:54:00 +0000 2026",
      "lang": "en",
      "likeCount": 2,
      "replyCount": 0,
      "retweetCount": 1,
      "viewCount": 300,
      "isReply": false,
      "isRetweet": false,
      "searchTerm": "(\\"looking for\\" OR \\"best tool for\\") (\\"email marketing\\" OR \\"newsletter tool\\") -filter:nativeretweets -filter:links lang:en",
      "authorId": "7700998811",
      "authorUsername": "shoptipsbot",
      "authorName": "Shop Tips Bot (sample)",
      "authorDescription": "Automated tips for online stores",
      "authorFollowers": 950,
      "authorIsAutomated": true,
      "authorProtected": false
    }
  ],
  "discoveryInput": {}
}' |
apify call rich_minds/twitter-lead-generation-ai --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rich_minds/twitter-lead-generation-ai"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/6HXr21TyTbfWTx2wN/builds/JTuBmudoggZR2yGDP/openapi.json
