当前位置: 首页 > Skill >

Twitter/X scraper with Apify actors

Twitter/X scraper with Apify actors

1.0.3 2026.11.16 浏览:314
获取Skill文件查看使用说明
作者:周辰许可证:
本文目录展开

Twitter/X Apify Actors

Overview

This skill runs a reliable actor-based pipeline for Twitter/X lead collection using Apify. It extracts a username from an X/Twitter link, runs a follower/following actor, optionally runs an email actor, and returns normalized rows for outreach workflows.

Use this skill when a user asks to:

  • collect followers/following from X via Apify actors
  • enrich collected usernames with emails
  • convert profile links to actor-ready usernames
  • build JSON/webhook payloads for n8n or API endpoints

Default actor IDs in this skill:

  • Followers actor: bIYXeMcKISYGnHhBG
  • Email actor: mSaHt2tt3Z7Fcwf0o

Quick Workflow

  1. Parse input target (https://x.com/..., https://twitter.com/..., or @username).
  2. Build follower actor payload using collectType and limit.
  3. Run follower actor and normalize usernames.
  4. If enrichment is enabled, run email actor and merge results.
  5. Return final rows + summary metrics.

Execution Rules

  • Prefer script execution for reliability: use scripts/apify_twitter_actors.py.
  • Keep actor IDs configurable, but default to the IDs above.
  • Always validate collectType (followers, following, both) and positive limit.
  • If email enrichment is disabled, skip email actor entirely.
  • Never hardcode the Apify token in outputs. Use env APIFY_TOKEN or explicit CLI argument.

Authentication (Apify token)

Users can provide the Apify API token in two supported ways.

Option A: Environment variable (recommended)

export APIFY_TOKEN='apify_api_xxx'
python3 scripts/apify_twitter_actors.py run-pipeline 
  --target 'https://x.com/elonmusk' 
  --collect-type followers 
  --limit 1000 
  --include-emails

Option B: CLI argument

python3 scripts/apify_twitter_actors.py run-pipeline 
  --apify-token 'apify_api_xxx' 
  --target 'https://x.com/elonmusk' 
  --collect-type followers 
  --limit 1000 
  --include-emails

If both are provided, --apify-token is used. If neither is provided, the script returns an explicit authentication error.

Script Usage

Run with Python 3.10+.

python3 scripts/apify_twitter_actors.py parse-username --target 'https://x.com/elonmusk'
APIFY_TOKEN='apify_api_xxx' 
python3 scripts/apify_twitter_actors.py run-followers 
  --target 'https://x.com/elonmusk' 
  --collect-type followers 
  --limit 1000
APIFY_TOKEN='apify_api_xxx' 
python3 scripts/apify_twitter_actors.py run-pipeline 
  --target 'https://x.com/elonmusk' 
  --collect-type followers 
  --limit 1000 
  --include-emails

Quick auth check:

APIFY_TOKEN='apify_api_xxx' 
python3 scripts/apify_twitter_actors.py run-followers 
  --target 'https://x.com/elonmusk' 
  --collect-type followers 
  --limit 10

For contracts and payload details, read:

  • references/actor-contracts.md
  • references/troubleshooting.md

Output Contract

The pipeline returns JSON with:

  • targetUsername
  • collectType
  • totalCollected
  • emailsFound
  • rows[] with username, name, email, sourceType, collectedAt

Use this output directly in n8n Code/HTTP nodes or export to CSV/Google Sheets.

相关文章

更多
PHP调用Twitter RSS实现微博展示

由于饭否和腾讯滔滔API相继停用,本文介绍使用PHP在WordPress中直接调用Twitter API获取RSS数据的方法。通过SimpleXML解析用户时间线,过滤回复信息并转换时区,最终在前端展示指定数量的推文内容。

2025.10.12 461
Skill 文件
  • SKILL.md
    • Twitter/X Apify Actors
    • Overview
    • Quick Workflow
    • Execution Rules
    • Authentication (Apify token)
      • Option A: Environment variable (recommended)
      • Option B: CLI argument
    • Script Usage
    • Output Contract
  • 项目或源文件

相关 Skill

更多
Website Phone Number Finder (Apify) Website Phone Number Finder (Apify) 在用户需要从网站获取公开的商业电话号码、tel链接、可选的邮箱、社交资料、来源URL以及爬虫诊断信息时使用此技能。
Google Maps Email Extractor (Apify) Google Maps Email Extractor (Apify) 当用户需要通过 Apify Actor 从 Google Maps 获取企业邮箱、网站、电话等公开线索时使用此技能。
Google Maps Reviews Scraper Apify Google Maps Reviews Scraper Apify 当用户需要通过Apify actor获取特定地点的Google地图评论时使用此技能,包括评论文本、评分、日期、评论链接、评论者等信息。
service-qa-coach service-qa-coach Review support quality for chat, email, phone, social DM, or marketplace service teams. Use when a team needs a QA scorecard, failure-mode analysis, coaching plan, calibration checklist, or service-improvement brief without live ticketing, CRM, or contact-center system access.
高中数学作业批改助手 高中数学作业批改助手 >图片识别 直接读取学生手写作答照片,识别公式、符号、步骤 🧮 自动推导 根据题目自动生成参考答案和评分细则,无需教师预设 📊 逐步给分 每个关键步骤独立评分,体现过程分 📝 结构化报告 输出含识别内容、参考答案、逐步评分、改进建议的完整报告 🗂 批量批改 支持一次性批改多道题,最终汇总得分表