Impit Native Binary (Linux x64 GNU)

0.13.0 · active · verified Sun Apr 19

Impit is a low-level, high-performance HTTP client designed for advanced web scraping and automation tasks that require sophisticated anti-bot evasion. It achieves this by emulating various browser and HTTP client fingerprints, including popular Chrome versions, OkHTTP, and custom HTTP/2 SETTINGS, to make requests appear as legitimate traffic. The current stable JavaScript version is 0.13.0, with a release cadence of new features and bug fixes every few weeks to months. This particular package, `impit-linux-x64-gnu`, provides the specific x64 Linux binary component for the main `@apify/impit` JavaScript library, which handles the orchestration and API. Its key differentiators include native performance via Rust bindings and granular control over network parameters like headers, redirects, and cookies, enabling highly customizable and stealthy web interactions.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates initializing the Impit client with a browser fingerprint and making a basic GET request to httpbin.org with custom headers, showcasing the `fetch` API and per-request redirect and timeout options.

import { Impit } from '@apify/impit';

async function fetchData() {
  const impit = new Impit({
    client: 'chrome_100', // Emulate Chrome 100 fingerprint
    // Other common options include:
    // proxyUrl: process.env.PROXY_URL ?? 'http://user:pass@proxy.example.com:8000',
    // followRedirects: true,
    // timeout: 30_000, // 30 seconds
  });

  try {
    console.log('Fetching data with Impit...');
    const response = await impit.fetch('https://httpbin.org/get', {
      headers: {
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36',
        'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
        'Accept-Encoding': 'gzip, deflate, br',
        'Accept-Language': 'en-US,en;q=0.9'
      },
      // Per-request options, e.g., to override instance-level redirect setting
      redirect: 'manual', // or 'follow', 'error'
      timeout: 10_000, // Per-request timeout of 10 seconds
    });

    if (response.ok) {
      const data = await response.json();
      console.log('Successfully fetched data:', data);
    } else {
      console.error(`Request failed with status: ${response.status} - ${response.statusText}`);
      const errorBody = await response.text();
      console.error('Response body:', errorBody);
    }
  } catch (error) {
    console.error('An error occurred during fetch:', error);
  }
}

fetchData();

view raw JSON →