MCPcopy Create free account
hub / github.com/apify/impit

github.com/apify/impit @js-0.14.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release js-0.14.2 ↗ · + Follow
602 symbols 1,867 edges 55 files 71 documented · 12% 4 cross-repo links updated 7d agopy-0.13.1 · 2026-06-25★ 52910 open issues

Browse by type

Functions 347 Types & classes 255
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

impit | browser impersonation made simple

impit is a rust library that allows you to impersonate a browser and make requests to websites. It is built on top of reqwest, rustls and tokio and supports HTTP/1.1, HTTP/2, and HTTP/3.

The library provides a simple API for making requests to websites, and it also allows you to customize the request headers, use proxies, custom timeouts and more.

use impit::cookie::Jar;
use impit::{impit::Impit, fingerprint::database as fingerprints};

#[tokio::main]
async fn main() {
    let impit = Impit::<Jar>::builder()
        .with_fingerprint(fingerprints::firefox_144::fingerprint())
        .with_http3()
        .build()
        .unwrap();

    let response = impit
        .get(String::from("https://example.com"), None, None)
        .await;

    match response {
        Ok(response) => {
            println!("{}", response.text().await.unwrap());
        }
        Err(e) => {
            println!("{:#?}", e);
        }
    }
}

Other projects

If you'd prefer to use impit from a Node.js application, check out the impit-node folder, or download the package from npm:

npm install impit

The interface is the same as the native fetch.

import { Impit } from 'impit';

// Set up the Impit instance
const impit = new Impit({
    browser: "chrome", // or "firefox"
    proxyUrl: "http://localhost:8080",
    ignoreTlsErrors: true,
});

// Use the `fetch` method as you would with the built-in `fetch` function
const response = await impit.fetch("https://example.com");

console.log(response.status);
console.log(response.headers);
console.log(await response.text());
// console.log(await response.json());
// ...

Usage from Rust

Technically speaking, the impit project is a somewhat thin wrapper around reqwest that provides a more ergonomic API for making requests to websites. The real strength of impit is that it uses patched versions of rustls and other libraries that allow it to make browser-like requests.

Note that if you want to use this library in your rust project, you have to add the following dependencies to your Cargo.toml file:

[dependencies]
impit = { git="https://github.com/apify/impit.git", branch="master" }

[patch.crates-io]
rustls = { git="https://github.com/apify/rustls.git" }
h2 = { git="https://github.com/apify/h2.git" }

Without the patched dependencies, the project won't build.

Note that you also have to build your project with rustflags = "--cfg reqwest_unstable", otherwise, the build will also fail. This is because impit uses unstable features of reqwest (namely http3 support), which are not available in the stable version of the library.

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Method 270
Class 239
Function 77
Enum 14
Interface 2

Languages

TypeScript39%
Rust35%
Python26%

Modules by API surface

impit-node/index.d.ts68 symbols
impit-node/errors.js65 symbols
impit-node/dts-header.d.ts62 symbols
impit-python/test/basic_client_test.py52 symbols
impit-python/test/async_client_test.py44 symbols
impit/src/impit.rs35 symbols
impit-python/test/no_client_test.py33 symbols
impit-python/src/response.rs22 symbols
impit-node/index.wrapper.js22 symbols
impit/src/fingerprint/mod.rs15 symbols
impit-node/src/response.rs15 symbols
impit-python/src/client.rs14 symbols

For agents

$ claude mcp add impit \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page