Skip to content
How to use the Fingerprint API

Generate a fingerprint, inject it, blend in.

Request a coherent, real-world browser fingerprint over a simple REST call, then apply its fields to Playwright, Puppeteer, or Selenium so your automation reports one plausible, consistent machine.

1. Getting started

Grab an API key from your dashboard, then request a fingerprint./generate synthesizes a fresh, unique identity;/random returns a real pooled one.

generate.sh
# Generate a fresh, coherent fingerprint (quota deducts on success)
curl "https://api.capzy.ai/fingerprint/generate?key=YOUR_API_KEY&format=chromium&tags=Windows&country=us"
  • Filter with tags (Windows, macOS, Linux, Android, iOS) and country (ISO alpha-2).
  • format=chromium returns injection-ready fields; format=raw returns the full data.
  • Quota deducts only on a successful generation.

2. Apply it in your automation

Set the machine-level fields (userAgent, viewport, locale, timezone) on the browser, then match the JS-visible navigator to the same machine before any page script runs.

playwright.py
import requests
from playwright.sync_api import sync_playwright

# 1. Generate a coherent fingerprint for a Windows visitor in the US
fp = requests.get("https://api.capzy.ai/fingerprint/generate", params={
    "key": "YOUR_API_KEY",
    "format": "chromium",   # injection-ready
    "tags": "Windows",
    "country": "us",
}).json()

rect = fp["screen"]["screenRect"]

with sync_playwright() as p:
    browser = p.chromium.launch()
    # 2. Apply the machine-level fields on the context
    context = browser.new_context(
        user_agent=fp["userAgent"]["userAgent"],
        locale=fp["intl"]["languages"][0],
        timezone_id=fp["intl"]["timeZone"],
        viewport={"width": rect["width"], "height": rect["height"]},
        device_scale_factor=fp["screen"]["deviceScaleFactor"],
    )
    # 3. Match the JS-visible navigator to the SAME machine (before page scripts)
    context.add_init_script(f"""
      Object.defineProperty(navigator, 'hardwareConcurrency', {{ get: () => {fp['navigator']['hardwareConcurrency']} }});
      Object.defineProperty(navigator, 'deviceMemory', {{ get: () => {fp['navigator']['deviceMemory']} }});
      Object.defineProperty(navigator, 'platform', {{ get: () => '{fp['userAgent']['platform']}' }});
    """)
    page = context.new_page()
    page.goto("https://example.com")
    print(page.title())
    browser.close()

Firefox and Safari fingerprints work the same way. The capability fields present on Chromium (deviceMemory, hardwareConcurrency, client hints) are omitted where a real browser would not expose them.

3. Response formats

chromium injection-ready

The exact fields you set on the browser: userAgent, screen, intl, navigator, webgl. Use it for the examples above.

raw full data

The complete fingerprint payload (canvas, fonts, visitor_id, webgl_properties) for storage or your own injector.

4. Keep it coherent

A fingerprint is one plausible real machine, not a bag of random fields. Two rules keep it believable:

Apply fields together

Set userAgent, client hints, and navigator from the same response. Overriding the UA while the client hints report the original browser is the number-one automation tell.

One fingerprint per identity

Reuse the same fingerprint for a given profile/session. Rotating fields mid-session looks like a machine that changed hardware.

Match proxy geography

Pair the country you request with an egress IP in that country so timezone, language, and IP agree.

5. FAQ

random vs generate — which endpoint?

/fingerprint/random returns a real, previously-harvested device from the pool (cheap). /fingerprint/generate synthesizes a fresh, unique one under hard consistency constraints (quota deducts only on success). Use generate when you need a one-of-a-kind identity.

chromium vs raw format?

chromium is injection-ready: the exact fields you set on the browser (userAgent, screen, intl, navigator). raw returns the full fingerprint data (canvas, fonts, visitor_id, webgl_properties) for storage or your own injector.

Do I need to set the Sec-CH-UA headers too?

The fingerprint is derived as one machine, so the userAgent, client-hint headers, and navigator all agree. The #1 tell is overriding the UA but leaving client hints reporting the original browser, so apply the fields together and don't hand-edit one in isolation.

How do I target a country or OS?

Pass country (ISO alpha-2, drives languages + timezone + voices) and tags (Windows, macOS, Linux, Android, iOS). See the parameter table on the Fingerprint API page.

Ready to start?

Get an API key and generate your first coherent fingerprint.

Get your API key