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-media-upload

v0.3.2

Published

n8n node for uploading media to Twitter/X

Readme

n8n Twitter Media Upload & Tweet Metrics Node

A custom n8n node that enables:

  • Uploading media to Twitter/X using the Media Upload API
  • Extracting comprehensive analytics from any public tweet (no API credentials required)

Setup Instructions

1. Get Twitter API Credentials

  1. Go to the Twitter Developer Portal
    https://developer.twitter.com/en/portal/dashboard

  2. Create a new Project and App

  3. Navigate to your app’s Keys and Tokens tab

  4. Generate and save the following:

    • API Key (Consumer Key)
    • API Key Secret (Consumer Secret)
    • Access Token
    • Access Token Secret

2. Configure Credentials in n8n

  1. In n8n, go to Credentials
  2. Click Add Credential
  3. Search for Twitter Media Upload API
  4. Fill in:
    • Consumer Key
    • Consumer Secret
    • Access Token
    • Access Token Secret
  5. Click Save

Usage

Operation 1: Upload Media

Upload media files to Twitter and retrieve a media_id for use in tweets.

Requirements

  • Twitter API credentials
  • Binary data input

Configuration

  • Select Upload Media operation
  • Choose your Twitter credentials
  • Set Binary Property Name (default: data)
  • Select Media Type (PNG, JPEG, MP4, etc.)
  • Execute the node

Output

{
  "media_id": "1234567890123456789",
  "media_id_string": "1234567890123456789",
  "size": 123456,
  "expires_after_secs": 86400,
  "media_type": "image/png"
}

Operation 2: Search Tweet Metrics

Extract comprehensive analytics from any public tweet without requiring Twitter API credentials.


Requirements

  • Public Tweet URL
  • Internet access
  • No authentication required

Configuration

  1. Select Search Tweet Metrics operation
  2. Enter the Tweet URL
    Example:
    https://x.com/username/status/1234567890
  3. (Optional) Set Timeout
    Default: 25000ms
  4. Execute the node

Output

{
  "tweet": {
    "id": "",
    "url": "",
    "created_at": "Tue Oct 14 17:24:08 +0000 2025",
    "language": "en",
    "views": 2049,
    "likes": 5,
    "retweets": 0,
    "replies": 0,
    "quotes": 0,
    "bookmarks": 0,
    "hashtags": [""],
    "mentions": [],
    "source": "Twitter Web App",
    "full_text": "Tweet content here...",
    "engagement_rate": 0.0092701589
  },
  "author": {
    "user_id": "",
    "username": "",
    "profile": "",
    "bio": "Everything @HyperliquidX...",
    "location": "",
    "website": "",
    "followers": 1699,
    "verified": false
  }
}

Metrics Included

Tweet Metrics

  • Views
  • Likes
  • Retweets
  • Replies
  • Quotes
  • Bookmarks
  • Hashtags
  • Mentions
  • Full text content
  • Engagement rate calculation
  • Source application
  • Language detection

Author Metrics

  • User ID
  • Username
  • Profile URL
  • Bio
  • Location
  • Website
  • Follower count
  • Verification status

Common Issues

Could Not Extract Tweet Data

  • Ensure the tweet URL is correct
  • Confirm the tweet is public
  • Verify the tweet has not been deleted
  • Check if the account is private
  • Increase timeout value

Timeout Errors

  • Increase timeout (default: 25000ms)
  • Check network connectivity
  • Retry execution