npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-twitter-x-scraper

v0.0.3

Published

This is an n8n community node that integrates with the [Apify X.com Twitter API Scraper](https://apify.com/). It provides a powerful and efficient way to scrape data from Twitter (now X) directly within your n8n workflows.

Readme

n8n Node - X.com Twitter API Scraper

This is an n8n community node that integrates with the Apify X.com Twitter API Scraper. It provides a powerful and efficient way to scrape data from Twitter (now X) directly within your n8n workflows.

It allows you to extract tweets based on various criteria, making it ideal for researchers, entrepreneurs, data analysts, and anyone needing to gather Twitter data for analysis. It's designed for fetching historical data, not real-time monitoring.


🚀 Installation

Follow the standard procedure to install a community node in n8n:

  1. Go to Settings > Community Nodes.
  2. Select Install.
  3. Enter the package name: n8n-nodes-x-twitter-scraper (update this with your actual npm package name).
  4. Click Install.

Alternatively, if you are running n8n locally, you can install it via npm:

npm install n8n-nodes-x-twitter-scraper

🔑 Credentials

To use this node, you need an Apify API token.

  1. Create an account on Apify.
  2. Go to Settings > Integrations in the Apify Console.
  3. Copy your API token.
  4. In n8n, add a new Apify Api credential and paste your token.

✨ Key Features

  • Multiple Input Methods: Get the data you need, how you need it by passing Start URLs, Search Terms (with advanced search operators), or Twitter Handles.

  • Powerful Filtering: Refine your results using node parameters:

  • Maximum Items: Control the number of tweets you retrieve.

  • Sorting: Get results sorted by "Top" or "Latest".

  • Language: Filter by language using ISO 639-1 codes.

  • User Verification: Target tweets from verified users or Twitter Blue subscribers.

  • Media Type: Extract only tweets containing images, videos, or quotes.

  • Date Range: Specify a start and end date.

  • Lightning-Fast Performance: Scrape tweets with incredible speed (advertised as 30-80 tweets per second via Apify).

  • Cost-Effective: Competitive pricing (approx. $0.50 per 1,000 tweets via the Apify platform).

💡 Use Cases

  • Market Research: Analyze trends, sentiment, and brand perception in your automated workflows.
  • Academic Research: Gather data and pipe it directly to databases or spreadsheets for social media studies.
  • Competitive Analysis: Track competitors' activities and public engagement.
  • Data Journalism: Uncover insights and patterns within Twitter data.

🛠 Usage Guidelines (Important!)

  • Historical Data Focus: This node is designed for retrieving historical data. Avoid using it in loop nodes or cron triggers for very frequent, real-time monitoring.
  • Concurrency Limits: There are limits on concurrent runs (maximum 1, with up to 5 batched queries).
  • Minimum Tweets Per Query: Aim to fetch at least 50 tweets per query (handle, keyword, etc.).
  • Single Tweet Fetching Restrictions: Fetching a single tweet by URL is generally prohibited without explicit permission. Allow a few minutes interval time minimum between workflow executions.
  • Respect Twitter's Terms of Service: Always use this tool ethically and responsibly.

🛡 Ethical Use and Data Practices

This underlying Apify actor operates without logging in to X.com. This means it does not implicitly accept any Terms of Service (ToS) that require a login, as it only processes data that is publicly displayed and accessible to everyone without authentication.

All data collected explicitly excludes sensitive personal information or non-public data. Operations are designed to be compliant with relevant EU data protection regulations, including GDPR, where applicable.


📄 Output Example

When the node executes successfully, it outputs structured JSON data for each tweet, which you can easily map to other n8n nodes:

[
    {
        "id": "1630332507265589248",
        "url": "[https://x.com/NASA/status/1630332507265589248](https://x.com/NASA/status/1630332507265589248)",
        "twitterUrl": "[https://twitter.com/NASA/status/1630332507265589248](https://twitter.com/NASA/status/1630332507265589248)",
        "full_text": "@yalhunzai We have internships open to international students...",
        "favorite_count": 14,
        "retweet_count": 9,
        "reply_count": 0,
        "author": {
            "id_str": "11348282",
            "screen_name": "NASA",
            "name": "NASA",
            "followers_count": 85752559,
            "verified": false,
            "verified_type": "Government"
        },
        "created_at": "Tue Feb 28 20:28:53 +0000 2023",
        "lang": "en"
    }
]

❓ Troubleshooting

If you encounter issues like too few results, no results, or incomplete tweet collection, check the node's input parameters. Common causes include overly restrictive filters (e.g., conflicting date ranges) or exceeding your Apify account's rate limits.

For advanced tutorials, check out the Tutorial: Scrape Twitter Data with Apify's Tweet X.com Scraper.


Other Useful APIs