{
  "openapi": "3.0.1",
  "info": {
    "title": "Twitter Lead Generation: AI Buying-Intent X Leads, 25 Free",
    "description": "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.",
    "version": "0.1",
    "x-build-id": "JTuBmudoggZR2yGDP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rich_minds~twitter-lead-generation-ai/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rich_minds-twitter-lead-generation-ai",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/rich_minds~twitter-lead-generation-ai/runs": {
      "post": {
        "operationId": "runs-sync-rich_minds-twitter-lead-generation-ai",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/rich_minds~twitter-lead-generation-ai/run-sync": {
      "post": {
        "operationId": "run-sync-rich_minds-twitter-lead-generation-ai",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "sourceMode"
        ],
        "properties": {
          "productKeywords": {
            "title": "Your product category terms (searched on X / Twitter)",
            "type": "array",
            "description": "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).",
            "items": {
              "type": "string"
            }
          },
          "sourceMode": {
            "title": "Where do the tweets come from?",
            "enum": [
              "actor",
              "dataset",
              "list"
            ],
            "type": "string",
            "description": "<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.",
            "default": "actor"
          },
          "offer": {
            "title": "What do you sell?",
            "type": "string",
            "description": "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": {
            "title": "Minimum lead score (0–100)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "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.",
            "default": 60
          },
          "maxQualified": {
            "title": "Max leads to output",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "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.",
            "default": 50
          },
          "maxDiscoveryChargeUsd": {
            "title": "Max source spend (USD)",
            "minimum": 0.01,
            "maximum": 1000,
            "type": "number",
            "description": "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.",
            "default": 0.5
          },
          "enableAi": {
            "title": "AI assessment",
            "type": "boolean",
            "description": "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).",
            "default": true
          },
          "notifyEmail": {
            "title": "E-mail me the new leads (optional)",
            "type": "string",
            "description": "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": {
            "title": "Competitors to win customers from",
            "type": "array",
            "description": "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).",
            "items": {
              "type": "string"
            }
          },
          "intentTypes": {
            "title": "Intent types to keep",
            "type": "array",
            "description": "Which kinds of buying intent become leads. <b>Question</b> (“what do you use for …”) is off by default — it finds more, weaker leads.",
            "items": {
              "type": "string",
              "enum": [
                "recommendation_request",
                "alternative_seeking",
                "buying_signal",
                "pain_point",
                "question"
              ],
              "enumTitles": [
                "Asks for a recommendation",
                "Looking for an alternative / switching",
                "Ready to buy / has a budget",
                "Complains about the problem you solve",
                "Asks how others do it"
              ]
            },
            "default": [
              "recommendation_request",
              "alternative_seeking",
              "buying_signal",
              "pain_point"
            ]
          },
          "icpBioKeywords": {
            "title": "Ideal-customer words in the bio",
            "type": "array",
            "description": "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).",
            "items": {
              "type": "string"
            }
          },
          "minFollowers": {
            "title": "Min followers",
            "minimum": 0,
            "type": "integer",
            "description": "Authors with fewer followers are dropped free — throwaway and brand-new accounts.",
            "default": 20
          },
          "maxFollowers": {
            "title": "Max followers (0 = no limit)",
            "minimum": 0,
            "type": "integer",
            "description": "Authors with more followers are dropped free — celebrities and media accounts rarely buy from a reply.",
            "default": 0
          },
          "language": {
            "title": "Tweet language",
            "enum": [
              "any",
              "en",
              "es",
              "pt",
              "fr",
              "de",
              "it",
              "nl",
              "ja",
              "ko",
              "hi",
              "id",
              "tr",
              "ar",
              "ru",
              "pl",
              "sv"
            ],
            "type": "string",
            "description": "Only tweets in this language (X's own per-tweet language tag).",
            "default": "en"
          },
          "withinDays": {
            "title": "Tweets from the last N days",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "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.",
            "default": 7
          },
          "excludeTweetsWithLinks": {
            "title": "Skip tweets that carry a link",
            "type": "boolean",
            "description": "Most vendor promos carry a link; buyers asking for advice rarely do. Adds <code>-filter:links</code> to every search.",
            "default": true
          },
          "ownHandles": {
            "title": "Your own X accounts",
            "type": "array",
            "description": "Your brand and team handles (e.g. <code>@acme</code>) — never delivered as leads.",
            "items": {
              "type": "string"
            }
          },
          "dedupeByAuthor": {
            "title": "One lead per person",
            "type": "boolean",
            "description": "Keeps one lead per author per run (their latest tweet) and, across runs, never delivers the same person twice.",
            "default": true
          },
          "targetFlags": {
            "title": "Only leads with these flags (any of)",
            "type": "array",
            "description": "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.",
            "items": {
              "type": "string"
            }
          },
          "suppressionList": {
            "title": "Exclude list",
            "type": "array",
            "description": "Handles, tweet URLs or tweet ids to never output (existing customers, people you already talked to). Skipped before any processing and never charged.",
            "items": {
              "type": "string"
            }
          },
          "generateReplyDraft": {
            "title": "Write a reply draft",
            "type": "boolean",
            "description": "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.",
            "default": true
          },
          "replyTone": {
            "title": "Reply tone",
            "enum": [
              "helpful",
              "casual",
              "professional"
            ],
            "type": "string",
            "description": "The voice of the reply drafts.",
            "default": "helpful"
          },
          "offerUrl": {
            "title": "Link to your product (optional)",
            "type": "string",
            "description": "The only link a reply draft may carry — used for recommendation and alternative requests, never invented when empty."
          },
          "llmProvider": {
            "title": "AI model access",
            "enum": [
              "apify",
              "byok"
            ],
            "type": "string",
            "description": "<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.",
            "default": "apify"
          },
          "llmModel": {
            "title": "AI model",
            "type": "string",
            "description": "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": {
            "title": "Your API key (own-key mode only)",
            "type": "string",
            "description": "Required when <b>AI model access</b> is <i>My own API key</i>. Stored encrypted by Apify, never logged."
          },
          "aiCandidateMultiplier": {
            "title": "AI candidate pool (× max leads)",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "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.",
            "default": 2
          },
          "slackWebhookUrl": {
            "title": "Post the new leads to Slack (optional)",
            "type": "string",
            "description": "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": {
            "title": "Post the new leads to Discord (optional)",
            "type": "string",
            "description": "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": {
            "title": "Webhook URL (optional)",
            "type": "string",
            "description": "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": {
            "title": "Webhook headers (optional)",
            "type": "object",
            "description": "Extra HTTP headers for the webhook, e.g. <code>{\"Authorization\": \"Bearer …\"}</code>. Stored encrypted by Apify, never logged."
          },
          "webhookBatchSize": {
            "title": "Webhook batch size",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "1 = one POST per lead the moment it is ready. Higher = one POST per N leads.",
            "default": 1
          },
          "dedupeAcrossRuns": {
            "title": "Never output the same lead twice",
            "type": "boolean",
            "description": "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.",
            "default": true
          },
          "dedupeStoreName": {
            "title": "Dedupe store name",
            "type": "string",
            "description": "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.",
            "default": "twitter-lead-generation-ai-seen"
          },
          "customSearchTerms": {
            "title": "Extra X search queries",
            "type": "array",
            "description": "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).",
            "items": {
              "type": "string"
            }
          },
          "maxTweetsToScan": {
            "title": "Max tweets to scan",
            "minimum": 5,
            "maximum": 10000,
            "type": "integer",
            "description": "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>.",
            "default": 500
          },
          "datasetId": {
            "title": "Dataset",
            "type": "string",
            "description": "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": {
            "title": "Tweets to process",
            "type": "array",
            "description": "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": {
            "title": "Source Actor (advanced)",
            "enum": [
              "xquik/x-tweet-scraper"
            ],
            "type": "string",
            "description": "The Store Actor the live search runs. Another scraper's tweets are qualified with <b>dataset</b> mode.",
            "default": "xquik/x-tweet-scraper"
          },
          "discoveryInput": {
            "title": "Source Actor input (merged)",
            "type": "object",
            "description": "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": {
            "title": "Max candidates to process",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Upper bound on how many tweets past the free filters are scored in one run (controls run time). Default = 3 × max leads."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}