🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

nitter-scraper

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nitter-scraper

A Twitter scraper that uses Nitter to fetch tweets without authentication

1.0.3
latest
npm
Version published
Weekly downloads
15
66.67%
Maintainers
0
Weekly downloads
 
Created
Source

Nitter Scraper

A TypeScript package for scraping tweets from Nitter without authentication.

Installation

# Install as a library
npm install nitter-scraper

# Or install globally to use as CLI
npm install -g nitter-scraper

Usage

As a Library

import { fetchTweets } from "nitter-scraper";

async function main() {
  const tweets = await fetchTweets("username", 3); // username without @, max pages (optional)
  console.log(`Found ${tweets.length} tweets`);
}

main().catch(console.error);

As a CLI Tool

# Run the scraper using Bun
bun run cli

# Or if installed globally
nitter-scraper

Features

  • Fetches tweets from Nitter without authentication
  • Handles pagination automatically
  • Built-in rate limiting protection
  • TypeScript support

API

fetchTweets

fetchTweets(username: string, maxPages?: number): Promise<Tweet[]>

Parameters:

  • username: Twitter username to scrape (without @)
  • maxPages: Maximum number of pages to fetch (default: 3)

Tweet Type

interface Tweet {
  id: string;
  text: string;
  username: string;
  created_at: string;
  timestamp: number | null;
}

License

MIT

Keywords

twitter

FAQs

Package last updated on 18 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts