{
  "openapi": "3.0.1",
  "info": {
    "title": "X (Twitter) Lead & Intent Finder — Scored Buying-Intent Leads",
    "description": "Turn X (Twitter) into a scored lead pipeline. Detect buying intent, alternatives, pain points & recommendations in tweets, replies & bios. 0–100 relevance score, 8 sources, author filters, Slack/CRM webhooks & scheduled incremental delivery for B2B/SaaS.",
    "version": "0.0",
    "x-build-id": "Jp0euGHRzhdbq8xrj"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/b2b_leads~x-twitter-lead-intent-finder-scored-buying-intent-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-b2b_leads-x-twitter-lead-intent-finder-scored-buying-intent-leads",
        "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/b2b_leads~x-twitter-lead-intent-finder-scored-buying-intent-leads/runs": {
      "post": {
        "operationId": "runs-sync-b2b_leads-x-twitter-lead-intent-finder-scored-buying-intent-leads",
        "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/b2b_leads~x-twitter-lead-intent-finder-scored-buying-intent-leads/run-sync": {
      "post": {
        "operationId": "run-sync-b2b_leads-x-twitter-lead-intent-finder-scored-buying-intent-leads",
        "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",
        "properties": {
          "topicKeywords": {
            "title": "Topic keywords (what you sell)",
            "type": "array",
            "description": "Your product category, competitor names, or topics a lead must mention (e.g. \"CRM\", \"hubspot\", \"project management\"). By default a lead must match a topic keyword AND an intent phrase. Highly recommended for signal.",
            "items": {
              "type": "string"
            }
          },
          "sourceSearch": {
            "title": "Source: keyword search",
            "type": "boolean",
            "description": "Scan tweets returned by X keyword/phrase search using your Search queries below. The best all-round source.",
            "default": true
          },
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Keyword/phrase queries to run through X search (used when Source: keyword search is on). Example: \"best CRM for startups\", \"hubspot alternative\".",
            "items": {
              "type": "string"
            }
          },
          "sourceHashtags": {
            "title": "Source: hashtags",
            "type": "boolean",
            "description": "Scan tweets containing the hashtags you list below.",
            "default": false
          },
          "hashtags": {
            "title": "Hashtags",
            "type": "array",
            "description": "One or more hashtags to scan (with or without the leading #). Example: SaaS, startups.",
            "items": {
              "type": "string"
            }
          },
          "sourceMentions": {
            "title": "Source: mentions",
            "type": "boolean",
            "description": "Scan tweets that mention specific @handles — e.g. your brand or a competitor. Great for conquesting.",
            "default": false
          },
          "mentionHandles": {
            "title": "Mention handles",
            "type": "array",
            "description": "Handles to find mentions of (with or without @). Example: hubspot, salesforce.",
            "items": {
              "type": "string"
            }
          },
          "sourceReplies": {
            "title": "Source: replies",
            "type": "boolean",
            "description": "Scan replies to the target tweets or accounts below. Ideal for catching people responding to a competitor.",
            "default": false
          },
          "sourceQuotes": {
            "title": "Source: quote tweets",
            "type": "boolean",
            "description": "Scan quote-tweets of the target tweets or accounts below.",
            "default": false
          },
          "targetTweetsOrAccounts": {
            "title": "Target tweets or accounts (for replies / quotes)",
            "type": "array",
            "description": "Tweet IDs, tweet URLs, or @handles. For a handle, the actor pulls the account's recent tweets and scans their replies/quotes (competitor conquesting).",
            "items": {
              "type": "string"
            }
          },
          "sourceList": {
            "title": "Source: list timelines",
            "type": "boolean",
            "description": "Scan tweets from one or more X List timelines listed below.",
            "default": false
          },
          "listIds": {
            "title": "List IDs",
            "type": "array",
            "description": "Numeric X List IDs to scan (e.g. 1234567890123456789). Find the ID in a list URL: x.com/i/lists/<ID>.",
            "items": {
              "type": "string"
            }
          },
          "sourceCommunity": {
            "title": "Source: communities",
            "type": "boolean",
            "description": "Scan tweets from one or more X Communities listed below.",
            "default": false
          },
          "communityIds": {
            "title": "Community IDs",
            "type": "array",
            "description": "Numeric X Community IDs to scan. Find the ID in a community URL: x.com/i/communities/<ID>.",
            "items": {
              "type": "string"
            }
          },
          "sourceTimeline": {
            "title": "Source: account timelines",
            "type": "boolean",
            "description": "Scan recent tweets from specific accounts listed below.",
            "default": false
          },
          "timelineHandles": {
            "title": "Timeline handles",
            "type": "array",
            "description": "Accounts whose recent tweets you want to scan (with or without @). Example: paulg, levelsio.",
            "items": {
              "type": "string"
            }
          },
          "searchType": {
            "title": "Search result type",
            "enum": [
              "Latest",
              "Top"
            ],
            "type": "string",
            "description": "How search / hashtag / mention results are ordered. Latest = most recent (best for fresh leads); Top = most engaged.",
            "default": "Latest"
          },
          "searchStartDate": {
            "title": "From date (optional)",
            "type": "string",
            "description": "Only keep tweets created on or after this date/time (ISO 8601, e.g. 2026-06-01). Leave blank for no lower bound.",
            "default": ""
          },
          "searchEndDate": {
            "title": "To date (optional)",
            "type": "string",
            "description": "Only keep tweets created on or before this date/time (ISO 8601). Leave blank for no upper bound.",
            "default": ""
          },
          "targetAccountTweetLimit": {
            "title": "Recent tweets per target account",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "When a replies/quotes target is an @account, how many of its recent tweets to pull and scan replies/quotes for (1–100).",
            "default": 10
          },
          "intentPresets": {
            "title": "Intent categories",
            "type": "array",
            "description": "Built-in intent categories to detect. Leave empty to use all of them. buying_intent is the strongest signal; problem_help the softest.",
            "items": {
              "type": "string",
              "enum": [
                "buying_intent",
                "alternative_seeking",
                "pain_point",
                "seeking_recommendation",
                "problem_help"
              ],
              "enumTitles": [
                "Buying intent",
                "Alternative seeking",
                "Pain point",
                "Seeking recommendation",
                "Problem / help"
              ]
            },
            "default": [
              "buying_intent",
              "alternative_seeking",
              "pain_point",
              "seeking_recommendation",
              "problem_help"
            ]
          },
          "customIntentPhrases": {
            "title": "Custom intent phrases",
            "type": "array",
            "description": "Extra phrases (or regex when Match mode is regex) that signal intent, added on top of the selected presets.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "matchMode": {
            "title": "Match mode",
            "enum": [
              "substring",
              "word",
              "regex"
            ],
            "type": "string",
            "description": "substring = phrase appears anywhere; word = whole-word match; regex = treat every phrase as a regular expression.",
            "default": "substring"
          },
          "caseSensitive": {
            "title": "Case-sensitive matching",
            "type": "boolean",
            "description": "Match intent phrases and custom patterns case-sensitively. Off by default.",
            "default": false
          },
          "requireTopicMatch": {
            "title": "Require a topic keyword match",
            "type": "boolean",
            "description": "When on, a lead must match at least one topic keyword AND an intent phrase. Turn off to return any intent match (much noisier).",
            "default": true
          },
          "ignoreKeywords": {
            "title": "Ignore keywords",
            "type": "array",
            "description": "Skip any tweet that contains one of these words (e.g. giveaway, hiring, airdrop, promo).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "matchInBio": {
            "title": "Also match the author's bio",
            "type": "boolean",
            "description": "Run intent and topic detection over the author's profile bio as well as the tweet. Each lead records whether it matched in the tweet, the bio, or both.",
            "default": true
          },
          "minRelevance": {
            "title": "Minimum relevance score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Only return leads scoring at or above this value (0–100). Every lead's score blends four signals: intent strength, topic-keyword matches, recency, and engagement — see scoreBreakdown on each row. Guide: 0 = keep all matches (most volume); 40–55 = balanced quality (good default); 60–75 = only strong, on-topic, high-intent leads; 80+ = very strict, fewer but hottest leads.",
            "default": 0
          },
          "enrichAuthor": {
            "title": "Enrich author profile",
            "type": "boolean",
            "description": "Fetch each lead author's followers, following, verified/blue status, account age, tweet count, bio, and location, and attach it as authorProfile. Auto-enabled when any author gate below is set.",
            "default": false
          },
          "minFollowers": {
            "title": "Minimum followers",
            "minimum": 0,
            "type": "integer",
            "description": "Drop leads whose author has fewer than this many followers. 0 = no minimum. Enables author enrichment automatically.",
            "default": 0
          },
          "minAccountAgeDays": {
            "title": "Minimum account age (days)",
            "minimum": 0,
            "type": "integer",
            "description": "Drop leads whose author account is younger than this many days (filters throwaways). 0 = no minimum. Enables author enrichment automatically.",
            "default": 0
          },
          "mustBeVerified": {
            "title": "Only verified / Blue accounts",
            "type": "boolean",
            "description": "Only return leads from verified or X Premium (Blue) accounts. Enables author enrichment automatically.",
            "default": false
          },
          "maxFollowingRatio": {
            "title": "Max following-to-followers ratio (bot heuristic)",
            "minimum": 0,
            "type": "integer",
            "description": "Drop accounts whose following/followers ratio exceeds this value (accounts that follow far more than follow back are often bots/spam). 0 = disabled. Enables author enrichment automatically.",
            "default": 0
          },
          "useAuthorInfluence": {
            "title": "Add author-influence bonus",
            "type": "boolean",
            "description": "Give higher-follower prospects a small ranking boost so influential leads rise to the top. Kept out of the core 0–100 score unless enabled; recorded as scoreBreakdown.authorInfluence.",
            "default": false
          },
          "language": {
            "title": "Language filter",
            "type": "string",
            "description": "Only keep tweets in this language (ISO code, e.g. en, es, de). Leave blank for any language.",
            "default": ""
          },
          "excludeRetweets": {
            "title": "Exclude retweets",
            "type": "boolean",
            "description": "Skip pure retweets — they rarely represent the retweeter's own intent.",
            "default": true
          },
          "excludeReplies": {
            "title": "Exclude replies",
            "type": "boolean",
            "description": "Skip tweets that are replies (does not affect the dedicated replies source).",
            "default": false
          },
          "includeSensitive": {
            "title": "Include sensitive tweets",
            "type": "boolean",
            "description": "Include tweets flagged as possibly sensitive. Off by default.",
            "default": false
          },
          "minLikes": {
            "title": "Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Only keep tweets with at least this many likes. 0 = keep everything (recommended for fresh leads, which usually have few likes).",
            "default": 0
          },
          "minEngagement": {
            "title": "Minimum total engagement",
            "minimum": 0,
            "type": "integer",
            "description": "Only keep tweets whose combined likes + retweets + replies + quotes + views is at least this value. 0 = keep everything.",
            "default": 0
          },
          "authorAllowlist": {
            "title": "Author allowlist",
            "type": "array",
            "description": "If set, only return leads from these @handles.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "authorDenylist": {
            "title": "Author denylist",
            "type": "array",
            "description": "Never return leads from these @handles (e.g. your own accounts, known spammers).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxLeads": {
            "title": "Max leads",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after emitting this many leads. 0 = unlimited (bounded by the per-source scan cap).",
            "default": 0
          },
          "sinceId": {
            "title": "Since tweet ID (incremental floor)",
            "type": "string",
            "description": "Optional tweet ID (snowflake). Only return tweets newer than this ID. Scheduled runs also persist a per-source cursor automatically, so each run only emits new leads.",
            "default": ""
          },
          "perSourceScanCap": {
            "title": "Per-source scan cap",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum tweets to examine per source entry (per query, hashtag, handle, list, community, or target). Keeps runs memory-light and predictable.",
            "default": 1000
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Optional. Every lead is always saved to the run's dataset — this webhook is an ADDITIONAL real-time push. When set, each new lead is also POSTed here (CRM, Slack incoming webhook, Zapier, Make, Google Sheets). Delivery failures are ignored so the run keeps producing dataset output.",
            "default": ""
          },
          "webhookFormat": {
            "title": "Webhook format",
            "enum": [
              "json",
              "slack"
            ],
            "type": "string",
            "description": "json = full lead object; slack = Slack-friendly message with headline, score, intent, author, topics, and tweet link.",
            "default": "json"
          },
          "includeRaw": {
            "title": "Include raw tweet JSON",
            "type": "boolean",
            "description": "Attach the full raw tweet object under the raw field (larger output).",
            "default": false
          },
          "maxRetries": {
            "title": "Max retries (advanced)",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "How many times to retry a transient upstream error (rate limit / 5xx) before giving up.",
            "default": 5
          },
          "retryBaseDelayMs": {
            "title": "Retry base delay ms (advanced)",
            "minimum": 0,
            "type": "integer",
            "description": "Base backoff delay in milliseconds; grows exponentially with each retry.",
            "default": 2000
          },
          "retryMaxDelayMs": {
            "title": "Retry max delay ms (advanced)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum backoff delay in milliseconds between retries.",
            "default": 30000
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}