{"id":11080,"library":"impit-linux-x64-gnu","title":"Impit Native Binary (Linux x64 GNU)","description":"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.","status":"active","version":"0.13.0","language":"javascript","source_language":"en","source_url":"https://github.com/apify/impit","tags":["javascript"],"install":[{"cmd":"npm install impit-linux-x64-gnu","lang":"bash","label":"npm"},{"cmd":"yarn add impit-linux-x64-gnu","lang":"bash","label":"yarn"},{"cmd":"pnpm add impit-linux-x64-gnu","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"The primary class for instantiating the Impit client. While this entry describes a native binary, users interact with the main `@apify/impit` package, which dynamically loads the correct platform-specific binary.","wrong":"const Impit = require('@apify/impit');","symbol":"Impit","correct":"import { Impit } from '@apify/impit';"},{"note":"Type definition for the client configuration options. Best imported as a type alongside the main Impit class for TypeScript projects.","symbol":"ImpitOptions","correct":"import { Impit, type ImpitOptions } from '@apify/impit';"},{"note":"The `RequestInit` type, extending standard Fetch API options, is used for per-request configuration. This package's `RequestInit` allows specific Impit options like `redirect` and `timeout`.","symbol":"RequestInit","correct":"import { Impit, type RequestInit } from '@apify/impit';"}],"quickstart":{"code":"import { Impit } from '@apify/impit';\n\nasync function fetchData() {\n  const impit = new Impit({\n    client: 'chrome_100', // Emulate Chrome 100 fingerprint\n    // Other common options include:\n    // proxyUrl: process.env.PROXY_URL ?? 'http://user:pass@proxy.example.com:8000',\n    // followRedirects: true,\n    // timeout: 30_000, // 30 seconds\n  });\n\n  try {\n    console.log('Fetching data with Impit...');\n    const response = await impit.fetch('https://httpbin.org/get', {\n      headers: {\n        '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',\n        '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',\n        'Accept-Encoding': 'gzip, deflate, br',\n        'Accept-Language': 'en-US,en;q=0.9'\n      },\n      // Per-request options, e.g., to override instance-level redirect setting\n      redirect: 'manual', // or 'follow', 'error'\n      timeout: 10_000, // Per-request timeout of 10 seconds\n    });\n\n    if (response.ok) {\n      const data = await response.json();\n      console.log('Successfully fetched data:', data);\n    } else {\n      console.error(`Request failed with status: ${response.status} - ${response.statusText}`);\n      const errorBody = await response.text();\n      console.error('Response body:', errorBody);\n    }\n  } catch (error) {\n    console.error('An error occurred during fetch:', error);\n  }\n}\n\nfetchData();","lang":"typescript","description":"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."},"warnings":[{"fix":"Thoroughly test existing scraping flows when upgrading to `0.9.1` or later, especially those involving multiple redirects, intricate cookie management, or single-page applications. Consult the changelog for any specific migration notes.","message":"In version `0.9.1`, the internal handling of redirects and cookies shifted from Rust to JavaScript. While intended to fix high-concurrency segmentation faults, this fundamental change in core request processing might introduce subtle behavioral differences or new edge cases for complex scraping scenarios compared to previous versions. Users relying on very specific redirect or cookie behavior should re-verify functionality.","severity":"breaking","affected_versions":">=0.9.1"},{"fix":"Ensure you are on the latest stable version of `@apify/impit`. Implement robust error handling and resource cleanup. If persistent issues occur, consider isolating Impit operations into worker threads or separate processes.","message":"As a native Node.js module built with `napi-rs`, Impit's stability can occasionally be affected by memory management issues, particularly in high-concurrency environments or when interacting with Node.js `Buffer` objects. While versions `0.9.0` and `0.10.0` included fixes for double-free errors and AbortSignal listener leaks, developers should monitor memory usage and potential segmentation faults in stress tests.","severity":"gotcha","affected_versions":"<0.10.0 (resolved issues), but still a consideration for native modules in general"},{"fix":"Regularly update to the latest `@apify/impit` version to benefit from updated fingerprints and anti-detection mechanisms. Monitor target website responses for changes in blocking patterns. Consider implementing custom headers or client profiles if default ones are insufficient.","message":"The effectiveness of 'fingerprinting' and 'impersonation' relies on keeping the emulated browser/client profiles up-to-date with real-world browser behavior. As websites evolve their bot detection, Impit's built-in fingerprints might become stale, leading to increased detection and blocking. This requires continuous maintenance from the library developers and awareness from users.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure your development and deployment environments have necessary build tools (e.g., `build-essential` on Linux). Verify that your Node.js version is compatible with the version specified in the package's `engines` field (`>= 10`). Consider using official Docker images or pre-built binaries where available to avoid build issues.","message":"Native Node.js modules, including `impit-linux-x64-gnu`, can sometimes fail to install or load correctly due to missing system dependencies (like C/C++ build tools) or ABI incompatibilities between Node.js versions. This typically manifests as 'Cannot find module' or 'Failed to load native module' errors.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-19T00:00:00.000Z","next_check":"2026-07-18T00:00:00.000Z","problems":[{"fix":"Try reinstalling the main package: `npm rebuild @apify/impit` or `npm install --force @apify/impit`. Ensure your system has `node-gyp` dependencies if building from source. For deployment, ensure the correct binary for your target platform is present or built.","cause":"The `@apify/impit` package failed to locate or load the correct platform-specific binary (like `impit-linux-x64-gnu`). This often happens if the `postinstall` script failed, or if the `optionalDependencies` for the binary were not correctly resolved for your system.","error":"Error: Cannot find module '@apify/impit/binary_name_for_your_platform' or similar native module loading error."},{"fix":"Increase the `timeout` option in the `Impit` constructor or `fetch` call (e.g., `timeout: 60_000` for 60 seconds). Inspect the target website's behavior and consider implementing retry logic with exponential backoff. Ensure your proxy (if used) is responsive.","cause":"The HTTP request initiated by Impit did not receive a response within the configured timeout period. This could be due to slow network, server unresponsiveness, or target website deliberately delaying responses for bot detection.","error":"Error: Request timed out after Xms."},{"fix":"Verify network connectivity from the machine running Impit to the target. Double-check `proxyUrl` configuration for typos or incorrect credentials. Ensure any firewalls or security groups allow outbound connections on the necessary ports.","cause":"Indicates a network-level issue where Impit couldn't establish or maintain a connection to the target server or proxy. This might be a firewall issue, incorrect proxy configuration, or the target server being offline/unreachable.","error":"Error: ETIMEDOUT (Connection timed out) or ECONNREFUSED (Connection refused)"},{"fix":"For development or trusted environments (use with caution in production), you might need to disable TLS verification by setting a specific option in Impit, if available, or configuring the underlying `NODE_TLS_REJECT_UNAUTHORIZED='0'` (discouraged). The correct fix usually involves correctly configuring your proxy's CA certificates or adding the custom CA to your system's trust store.","cause":"The TLS/SSL certificate of the target server could not be verified, often encountered when using proxies that re-encrypt traffic, or when dealing with self-signed certificates. This results from untrusted certificates in the chain.","error":"Error: certificate verify failed"}],"ecosystem":"npm"}