{"id":11081,"library":"impit-linux-x64-musl","title":"Impit JavaScript Bindings (Linux x64 Musl)","description":"Impit provides high-performance HTTP client bindings with advanced fingerprinting capabilities, primarily targeting web scraping and automation scenarios. This specific package, `impit-linux-x64-musl`, delivers the compiled x86_64 Linux Musl libc binary for the Node.js implementation. It is typically consumed as a platform-specific dependency by the main `impit-node` package, which exposes a Fetch API-compatible interface to JavaScript developers. The project is under active development, with frequent releases across its JavaScript and Python clients. Key features in recent versions (currently `impit-node@0.13.0`) include emulation profiles for OkHTTP and custom HTTP/2 SETTINGS, enhanced error reporting for Node.js bindings, and improved stability through JavaScript-layer handling of redirects and cookies. Its core differentiation lies in its ability to mimic various browser and client fingerprints to evade sophisticated bot detection systems.","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-musl","lang":"bash","label":"npm"},{"cmd":"yarn add impit-linux-x64-musl","lang":"bash","label":"yarn"},{"cmd":"pnpm add impit-linux-x64-musl","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"The `fetch` function provided by Impit is a named export, not a default export. While CommonJS `require` might work in some contexts, `impit-node` primarily promotes ESM `import` usage.","wrong":"import fetch from 'impit-node';","symbol":"fetch","correct":"import { fetch } from 'impit-node';"},{"note":"The `ImpitClient` class is a named export, used for creating instances with shared configurations. ESM `import` is the recommended way to use it.","wrong":"const ImpitClient = require('impit-node').ImpitClient;","symbol":"ImpitClient","correct":"import { ImpitClient } from 'impit-node';"},{"note":"This is Impit's custom `RequestInit` type definition, which extends the standard Fetch API `RequestInit`. Use `import type` for type-only imports to ensure proper tree-shaking and avoid potential runtime issues.","wrong":"import { RequestInit } from 'impit-node';","symbol":"RequestInit","correct":"import { type RequestInit } from 'impit-node';"}],"quickstart":{"code":"import { ImpitClient, fetch, RequestInit } from 'impit-node';\n\nasync function runImpitExample() {\n  const impitClient = new ImpitClient({\n    // Emulate a specific browser fingerprint for advanced anti-bot detection\n    fingerprint: 'chrome-100',\n    // Global timeout for all requests made with this client\n    timeout: 30000, // 30 seconds\n    // Whether to follow redirects globally\n    followRedirects: true,\n  });\n\n  try {\n    console.log('--- Using ImpitClient instance ---');\n    const clientResponse = await impitClient.fetch('https://httpbin.org/get', {\n      headers: {\n        'X-Client-Header': 'ImpitClient',\n      },\n      // Per-request redirect override (new in 0.12.0)\n      redirect: 'manual'\n    } as RequestInit);\n\n    if (clientResponse.ok) {\n      const data = await clientResponse.json();\n      console.log('Client response status:', clientResponse.status);\n      console.log('Client response headers (content-type):', clientResponse.headers.get('Content-Type'));\n      console.log('Client response data (origin):', data.origin);\n    } else {\n      console.error('Client request failed:', clientResponse.status, await clientResponse.text());\n    }\n\n    console.log('\\n--- Using direct fetch function ---');\n    const directResponse = await fetch('https://httpbin.org/anything', {\n      fingerprint: 'firefox-99', // Can specify fingerprint per-request\n      method: 'POST',\n      headers: {\n        'Content-Type': 'application/json',\n        'X-Direct-Fetch-Header': 'ImpitGlobalFetch',\n      },\n      body: JSON.stringify({ message: 'Hello from Impit direct fetch!' }),\n      // Disable timeout for this specific request (check impit-node changelog for exact version)\n      timeout: null\n    } as RequestInit);\n\n    if (directResponse.ok) {\n      const data = await directResponse.json();\n      console.log('Direct fetch response status:', directResponse.status);\n      console.log('Direct fetch data (method):', data.method);\n      console.log('Direct fetch data (json):', data.json);\n    } else {\n      console.error('Direct fetch failed:', directResponse.status, await directResponse.text());\n    }\n  } catch (error) {\n    console.error('An error occurred:', error);\n  }\n}\n\nrunImpitExample();","lang":"typescript","description":"Demonstrates how to initialize an `ImpitClient` with global options and perform requests, along with using the standalone `fetch` function for per-request configuration, including fingerprinting, custom headers, and timeout options."},"warnings":[{"fix":"Upgrade to `impit-node@0.9.1` or newer. This version significantly reworks redirect and cookie handling to occur in the JavaScript layer, resolving these stability issues.","message":"High-concurrency usage in `impit-node` versions prior to `0.9.1` could lead to segmentation faults and instability, particularly due to internal handling of redirects and cookies within the Rust layer.","severity":"breaking","affected_versions":"<0.9.1"},{"fix":"Upgrade to `impit-node@0.10.0` or newer to ensure proper `AbortSignal` listener cleanup and prevent memory leaks. If upgrading is not possible, avoid reusing `AbortSignal` instances or implement manual listener detachment.","message":"Memory leaks could occur in `impit-node` versions prior to `0.10.0` when `AbortSignal` instances were reused across multiple `fetch()` calls, due to uncleaned listeners.","severity":"gotcha","affected_versions":"<0.10.0"},{"fix":"Upgrade to `impit-node@0.9.2` or newer. Now, passing an empty string (e.g., `{'Sec-Fetch-User': ''}`) in the `headers` option will correctly filter out the header before the request is sent.","message":"Prior to `impit-node@0.9.2`, it was not possible to explicitly remove impersonated headers (e.g., `Sec-Fetch-User`). Setting their value to an empty string would result in an empty header being sent, rather than the header being omitted entirely. This limited granular control over default impersonations.","severity":"gotcha","affected_versions":"<0.9.2"},{"fix":"Upgrade to `impit-node@0.9.0` or newer. This version implements `BufferSlice` for safer `Buffer` handling, mitigating these memory corruption issues.","message":"In `impit-node` versions before `0.9.0`, direct manipulation or handling of Node.js `Buffer` objects in certain scenarios could lead to double-free memory errors due to how `napi-rs` managed memory ownership.","severity":"gotcha","affected_versions":"<0.9.0"},{"fix":"Upgrade to `impit-node@0.12.0` or newer to utilize the `redirect` option within `RequestInit` for fine-grained, per-request redirect management.","message":"The `redirect` option in `RequestInit` for per-request redirect control was introduced in `impit-node@0.12.0`. In older versions, redirect behavior was solely controlled by the client-level `followRedirects` setting, offering less flexibility.","severity":"gotcha","affected_versions":"<0.12.0"}],"env_vars":null,"last_verified":"2026-04-19T00:00:00.000Z","next_check":"2026-07-18T00:00:00.000Z","problems":[{"fix":"Upgrade `impit-node` to `0.9.1` or later to leverage JS-based redirect/cookie management, significantly improving stability.","cause":"High-concurrency usage of `impit-node` versions `<0.9.1` causing issues with internal Rust-based redirect/cookie handling.","error":"Segmentation fault"},{"fix":"Upgrade `impit-node` to `0.10.0` or later, or ensure `AbortSignal` instances are not reused across `fetch` calls in older versions.","cause":"Listeners on `AbortSignal` instances were not properly cleaned up in `impit-node` versions `<0.10.0` when the signal was reused across multiple `fetch` calls.","error":"Memory Leak detected (e.g., during AbortSignal reuse)"},{"fix":"Use `import { fetch } from 'impit-node';` for ESM, or `const { fetch } = require('impit-node');` for CJS.","cause":"Attempting to import `fetch` as a default export (`import fetch from 'impit-node';`) or using incorrect CommonJS `require` syntax. `fetch` is a named export.","error":"TypeError: (0 , impit_node_1.fetch) is not a function"},{"fix":"Refer to the `impit-node` documentation for a list of currently supported fingerprint strings (e.g., `'chrome-100'`, `'firefox-99'`). Ensure your `impit-node` version is recent enough to support the desired fingerprint profile.","cause":"Using an unsupported, misspelled, or outdated fingerprint string in `ImpitClient` or `fetch` options. Newer fingerprints like `okhttp` or specific browser versions are added in later releases.","error":"Error: Bad argument: fingerprint is not a recognized type"}],"ecosystem":"npm"}