MCPcopy Index your code
hub / github.com/apify/fingerprint-suite

github.com/apify/fingerprint-suite @v2.1.83

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.1.83 ↗ · + Follow
159 symbols 398 edges 44 files 41 documented · 26%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Fingerprinting suite

<a href="https://www.npmjs.com/package/fingerprint-injector" rel="nofollow"><img src="https://img.shields.io/npm/v/fingerprint-injector/latest.svg" alt="NPM dev version" data-canonical-src="https://img.shields.io/npm/v/fingerprint-injector/next.svg" style="max-width: 100%;"></a>
<a href="https://discord.gg/jyEM2PRvMU" rel="nofollow"><img src="https://img.shields.io/discord/801163717915574323?label=discord" alt="Chat on discord" data-canonical-src="https://img.shields.io/discord/801163717915574323?label=discord" style="max-width: 100%;"></a>

fingerprint-suite is a handcrafted assembly of tools for browser fingerprint generation and injection. Today's websites are increasingly using fingerprinting to track users and identify them. With the help of fingerprint-suite you can generate and inject browser fingerprints into your browser, allowing you to fly your scrapers under the radar.

Would you like to work with us on our fingerprinting tools or similar projects? We are hiring!

Overview

fingerprint-suite is a modular toolkit for browser fingerprint generation and injection. It consists of the following npm packages, which you can use separately, or together:

  • header-generator: generates configurable, realistic HTTP headers
  • fingerprint-generator: generates realistic browser fingerprints, affecting the HTTP headers and browser JS APIs
  • fingerprint-injector: injects browser fingerprints into your Playwright or Puppeteer managed browser instance
  • generative-bayesian-network: our fast implementation of a Bayesian generative network used to generate realistic browser fingerprints

Quick start

The following example shows how to use the fingerprinting tools to camouflage your Playwright-managed Chromium instance.

import { chromium } from 'playwright';
import { newInjectedContext } from 'fingerprint-injector';

(async () => {
    const browser = await chromium.launch({ headless: false });
    const context = await newInjectedContext(browser, {
        // Constraints for the generated fingerprint (optional)
        fingerprintOptions: {
            devices: ['mobile'],
            operatingSystems: ['ios'],
        },
        // Playwright's newContext() options (optional, random example for illustration)
        newContextOptions: {
            geolocation: {
                latitude: 51.50853,
                longitude: -0.12574,
            },
        },
    });

    const page = await context.newPage();
    // ... your code using `page` here
})();

Here is the same example using Puppeteer:

import puppeteer from 'puppeteer';
import { newInjectedPage } from 'fingerprint-injector';

(async () => {
    const browser = await puppeteer.launch({ headless: false });
    const page = await newInjectedPage(browser, {
        // constraints for the generated fingerprint
        fingerprintOptions: {
            devices: ['mobile'],
            operatingSystems: ['ios'],
        },
    });

    // ... your code using `page` here
    await page.goto('https://example.com');
})();

Support

If you find any bug or issue with any of the fingerprinting tools, please submit an issue on GitHub. For questions, you can ask on Stack Overflow or contact support@apify.com

Contributing

Your code contributions are welcome and you'll be praised for eternity! If you have any ideas for improvements, either submit an issue or create a pull request. For contribution guidelines and the code of conduct, see CONTRIBUTING.md.

License

This project is licensed under the Apache License 2.0 - see the LICENSE.md file for details.

Extension points exported contracts — how you extend this code

FingeprintingEngine (Interface)
(no doc) [4 implementers]
test/antibot-services/live-testing/engine/vanilla-playwright.ts
NodeDefinition (Interface)
* Bayesian network node definition.
packages/generative-bayesian-network/src/bayesian-node.ts
EnhancedFingerprint (Interface)
(no doc)
packages/fingerprint-injector/src/fingerprint-injector.ts
FingerprintGeneratorOptions (Interface)
(no doc)
packages/fingerprint-generator/src/fingerprint-generator.ts
BrowserSpecification (Interface)
(no doc)
packages/header-generator/src/header-generator.ts
TestResult (Interface)
(no doc)
test/antibot-services/live-testing/utils/generateReport.ts
HeaderGeneratorOptions (Interface)
(no doc)
packages/header-generator/src/header-generator.ts
GetContextOptions (Interface)
(no doc)
test/antibot-services/live-testing/engine/vanilla-playwright.ts

Core symbols most depended-on inside this repo

getFingerprint
called by 26
packages/fingerprint-generator/src/fingerprint-generator.ts
getHeaders
called by 15
packages/header-generator/src/header-generator.ts
overridePropertyWithProxy
called by 7
packages/fingerprint-injector/src/utils.js
replace
called by 7
packages/fingerprint-injector/src/utils.js
attachFingerprintToPlaywright
called by 7
packages/fingerprint-injector/src/fingerprint-injector.ts
orderHeaders
called by 5
packages/header-generator/src/header-generator.ts
generateSample
called by 4
packages/generative-bayesian-network/src/bayesian-network.ts
saveNetworkDefinition
called by 4
packages/generative-bayesian-network/src/bayesian-network.ts

Shape

Function 78
Method 52
Class 20
Interface 9

Languages

TypeScript97%
Python3%

Modules by API surface

packages/fingerprint-injector/src/utils.js38 symbols
packages/header-generator/src/header-generator.ts16 symbols
packages/generative-bayesian-network/src/bayesian-node.ts15 symbols
packages/fingerprint-injector/src/fingerprint-injector.ts14 symbols
test/antibot-services/live-testing/engine/vanilla-playwright.ts8 symbols
packages/generative-bayesian-network/src/bayesian-network.ts8 symbols
packages/generator-networks-creator/src/generator-networks-creator.ts7 symbols
packages/generative-bayesian-network/src/utils.ts7 symbols
packages/header-generator/src/utils.ts6 symbols
packages/fingerprint-generator/src/fingerprint-generator.ts6 symbols
test/antibot-services/live-testing/cloudflare.ts5 symbols
apify_fingerprint_datapoints/__init__.py5 symbols

For agents

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

⬇ download graph artifact