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

@nhinguyen122026/antibot-scraper-client

v1.0.2

Published

High-performance Node.js & TypeScript client for Anti-Bot & TLS Fingerprint Edge Scraper API for AI Agents, LLMs, and RAG pipelines.

Readme

@nhinguyen122026/antibot-scraper-client

High-performance Node.js & TypeScript client for the Anti-Bot & TLS Fingerprint Edge Scraper API. Engineered for AI Agents, LLM context retrieval, and modern RAG pipelines.

npm version License: MIT TypeScript


✨ Features

  • 🛡️ Authentic TLS/JA3/JA4 Fingerprint Impersonation: Bypasses Cloudflare, Akamai, and perimeter bot detection by spoofing full browser TLS handshakes.
  • 🤖 LLM & Agent Native: Extracts clean, dense Markdown ready to be fed directly into GPT-4o, Claude 3.5 Sonnet, or Gemini 1.5/2.0 context windows.
  • ⚡ Zero External Dependencies: Powered by native fetch with AbortController timeout handling. Compatible with Node 18+, Bun, Deno, and Cloudflare Workers.
  • 🔄 Autonomous Challenge Retries: Automated fallback retry mechanism with browser profile rotation upon detecting Cloudflare Turnstile or WAF challenges.
  • 📘 Full TypeScript Definitions: First-class type safety with detailed JSDoc documentation.

📦 Installation

npm install @nhinguyen122026/antibot-scraper-client
# or
pnpm add @nhinguyen122026/antibot-scraper-client
# or
yarn add @nhinguyen122026/antibot-scraper-client

🚀 Quick Start

1. Basic Markdown Extraction

import { AntiBotScraperClient } from '@nhinguyen122026/antibot-scraper-client';

const scraper = new AntiBotScraperClient({
  apiKey: process.env.RAPIDAPI_KEY // Optional if using free tier
});

async function main() {
  const result = await scraper.scrape({
    url: 'https://news.ycombinator.com',
    output_format: 'markdown',
    profile_id: 'chrome124_win'
  });

  console.log(`Scraped ${result.content_length} bytes in ${result.duration_ms}ms`);
  console.log(`TLS Fingerprint: ${result.tls_fingerprint}`);
  console.log(result.content);
}

main();

2. Streamlined Content Shortcut

const { AntiBotScraperClient } = require('@nhinguyen122026/antibot-scraper-client');

const scraper = new AntiBotScraperClient();

async function run() {
  // Returns raw markdown string directly
  const markdown = await scraper.scrapeContent('https://en.wikipedia.org/wiki/Artificial_intelligence');
  console.log(markdown.slice(0, 500));
}

run();

🤖 RAG & AI Agent Integration

LangChain / LlamaIndex Document Loader Pattern

import { AntiBotScraperClient } from '@nhinguyen122026/antibot-scraper-client';

const scraper = new AntiBotScraperClient();

async function loadWebDocumentForRAG(url: string) {
  const response = await scraper.scrape({
    url,
    output_format: 'markdown',
    timeout: 25
  });

  return {
    pageContent: response.content,
    metadata: {
      source: response.url,
      finalUrl: response.final_url,
      retrievedAt: new Date().toISOString(),
      tlsProfile: response.profile_used
    }
  };
}

⚙️ Configuration & Options

AntiBotScraperClient(options)

  • apiKey (string, optional): Your RapidAPI subscription key.
  • baseUrl (string, optional): Custom endpoint override.
  • defaultTimeout (number, default: 30000): HTTP client timeout in milliseconds.

scraper.scrape(options)

| Option | Type | Default | Description | |---|---|---|---| | url | string | (required) | Target webpage URL to fetch | | output_format | 'markdown' \| 'raw_html' \| 'text' | 'markdown' | Format of extracted content | | profile_id | string | 'chrome124_win' | TLS fingerprint profile: chrome124_win, chrome120_mac, safari17_mac, edge101_win | | timeout | number | 20 | Upstream scraper timeout in seconds | | max_retries | number | 2 | Number of automated challenge retry attempts |


🛡️ Error Handling

import { AntiBotScraperClient, AntiBotScraperError } from '@nhinguyen122026/antibot-scraper-client';

const scraper = new AntiBotScraperClient();

try {
  const res = await scraper.scrape({ url: 'https://protected-site.com' });
} catch (err) {
  if (err instanceof AntiBotScraperError) {
    console.error(`Scrape Error [Status ${err.statusCode}]:`, err.message);
    console.error('Raw details:', err.rawData);
  } else {
    console.error('Network or timeout error:', err);
  }
}

📄 License

MIT © Duong Y Nhi