Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

nokk (Python)

Undetectable headless-browser engine, one pip install away.

nokk is a lightweight, Chrome-fingerprinted headless-browser engine (V8 + a minimal DOM, no rendering) that speaks the Chrome DevTools Protocol. This package embeds the prebuilt nokk binary — there is no browser to download, no Rust toolchain to install, and no Docker. pip install nokk, call launch(), and connect your existing Playwright or pyppeteer script over CDP.

pip install nokk

Alpha. Prebuilt wheels: Linux x86_64 and aarch64, macOS on Apple Silicon, Windows x64.

Quick start

Playwright

import nokk
from playwright.sync_api import sync_playwright

with nokk.launch() as server, sync_playwright() as pw:
    browser = pw.chromium.connect_over_cdp(server.ws_endpoint)
    page = browser.new_page()
    page.goto("https://example.com")
    print(page.title())

pyppeteer

import asyncio, nokk
from pyppeteer import connect

async def main():
    with nokk.launch() as server:
        browser = await connect(browserWSEndpoint=server.ws_endpoint)
        page = await browser.newPage()
        await page.goto("https://example.com")
        print(await page.title())

asyncio.run(main())

Async launcher

launch() is a quick synchronous call. In an async program, use launch_async() so nothing blocks the event loop:

import asyncio, nokk
from playwright.async_api import async_playwright

async def main():
    async with await nokk.launch_async() as server, async_playwright() as pw:
        browser = await pw.chromium.connect_over_cdp(server.ws_endpoint)
        page = await browser.new_page()
        await page.goto("https://example.com")
        print(await page.title())

asyncio.run(main())

Give an AI agent a stealth browser (MCP)

nokk ships an MCP server, so an AI agent (Claude Desktop, Claude Code, …) can browse and scrape through nokk's fingerprinted engine instead of a headful browser that anti-bots flag. With uv, register uvx nokk-mcp:

{
  "mcpServers": {
    "nokk": { "command": "uvx", "args": ["nokk-mcp", "--rotate-fingerprint"] }
  }
}

Without uv, install the extra and register it:

pip install "nokk[mcp]"
{
  "mcpServers": {
    "nokk": { "command": "python", "args": ["-m", "nokk.mcp", "--rotate-fingerprint"] }
  }
}

Use the python from the environment where you installed nokk[mcp] (its full path if the client doesn't share your shell). Tools: open, read_text, read_html, click, fill, evaluate, links, solve_challenge, challenge_state, reset. Run it directly with python -m nokk.mcp; it accepts --proxy, --rotate-fingerprint, --geoip-timezone, --session-store, --workers, --no-auto-solve.

Cloudflare challenges are solved on the way by default: open returns the page behind "Just a moment…", and its challenge field says what it met.

Cloudflare challenges

With auto_solve=True, a navigation that lands on Cloudflare's "Just a moment…" page or a Turnstile widget returns only once it is through.

with nokk.launch(auto_solve=True) as server, sync_playwright() as pw:
    page = pw.chromium.connect_over_cdp(server.ws_endpoint).new_page()
    page.goto("https://www.scrapingcourse.com/cloudflare-challenge")
    print(page.title())  # the page behind the challenge

Or on demand, for a Playwright page (solve_challenge_async / challenge_state_async for the async API):

state = nokk.challenge_state(page)
# {"kind": "cloudflare-interstitial" | "turnstile-widget" | "datadome" | "none", "solvable": …}
if state["solvable"]:
    r = nokk.solve_challenge(page, timeout=30)
    # {"status": "cleared" | "token-issued" | "cleared-but-stuck" | "timeout" | "needs-human", "solved": …, "presses": …}

Nobody passes selectors: the engine finds and presses the checkbox itself.

launch() options

nokk.launch() starts the CDP server on a free port and returns a NokkServer (a context manager). All arguments are keyword-only:

Argument Default Meaning
host "127.0.0.1" Address to bind.
port 0 TCP port; 0 picks a free one.
workers engine default Isolate worker threads.
max_contexts engine default Cap on concurrent contexts before backpressure.
proxy None Upstream proxy, e.g. socks5://host:1080 or http://user:pass@host:port.
session_store None Directory for persistent named-session cookie jars.
rotate_fingerprint False Give each browser context its own coherent fingerprint (OS/UA/screen/WebGL + matching TLS).
geoip_timezone False Derive each context's timezone/locale from its proxy's exit IP.
allow_trackers False Load ad/analytics/tracker subresources (blocked by default).
no_images False Do not load images (<img>, CSS backgrounds, image preloads).
auto_solve None Solve Cloudflare challenges on every navigation; True = 30 s budget, a number = seconds.
args None Extra raw CLI arguments passed to the binary.
timeout 30.0 Seconds to wait for the server to accept connections.
# Each browser context looks like a different machine, timezone matched to its proxy.
with nokk.launch(rotate_fingerprint=True, geoip_timezone=True) as server:
    ...

The server also shuts down automatically at interpreter exit; with or server.close() stops it immediately.

Point at a locally built binary during development with the NOKK_BINARY environment variable.

Licensed under either of MIT or Apache-2.0, at your option.

Metadata

Release files for nokk 0.1.46a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for nokk 0.1.46a1
File Actions
nokk-0.1.46a1-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for nokk-0.1.46a1-py3-none-win_amd64.whl
nokk-0.1.46a1-py3-none-manylinux_2_31_x86_64.whl Python 3 none Linux glibc 2.31+ x86-64 Details for nokk-0.1.46a1-py3-none-manylinux_2_31_x86_64.whl
nokk-0.1.46a1-py3-none-manylinux_2_31_aarch64.whl Python 3 none Linux glibc 2.31+ ARM64 Details for nokk-0.1.46a1-py3-none-manylinux_2_31_aarch64.whl
nokk-0.1.46a1-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for nokk-0.1.46a1-py3-none-macosx_11_0_arm64.whl

Total release size: 109.4 MB

Release files / nokk-0.1.46a1-py3-none-win_amd64.whl

Download URL nokk-0.1.46a1-py3-none-win_amd64.whl
Size 27.3 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
88518c7de50674accd2abe2d129fe6aef36a5d74dcf6835cd1f8aadd9b880c84
BLAKE2b-256 checksum
How to use checksums
ce6d4b65e3b83d1635be5f9b3c524741633e8b7fcbccc55286eb2699afc00704
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

Release files / nokk-0.1.46a1-py3-none-manylinux_2_31_x86_64.whl

Download URL nokk-0.1.46a1-py3-none-manylinux_2_31_x86_64.whl
Size 28.4 MB
Tags Linux glibc 2.31+ x86-64 Python 3
SHA-256 checksum
How to use checksums
60f7e20e936fa0b9a58893fc68c5aa133d6c0d7d8b3aabce663a1c012171d53b
BLAKE2b-256 checksum
How to use checksums
f8818d8571393cc9a81984ef68e15dfde2c7b151fa6b53d2b4fbaff4ccd6c2b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

Release files / nokk-0.1.46a1-py3-none-manylinux_2_31_aarch64.whl

Download URL nokk-0.1.46a1-py3-none-manylinux_2_31_aarch64.whl
Size 27.7 MB
Tags Linux glibc 2.31+ ARM64 Python 3
SHA-256 checksum
How to use checksums
b058fe72e8fab7afccedfdac000c9521e20457f5bf1dce14af4e9a97e0cde6dc
BLAKE2b-256 checksum
How to use checksums
e0ec8cb2dbef01fffcadfd833d57b7405c79071c8131ff448a4c126cdef8e0b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

Release files / nokk-0.1.46a1-py3-none-macosx_11_0_arm64.whl

Download URL nokk-0.1.46a1-py3-none-macosx_11_0_arm64.whl
Size 26.1 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a320e699e3e10b70ad74e2f74728fdadbe945f83c60bfff9a3c96af877f8236b
BLAKE2b-256 checksum
How to use checksums
8b4c71b45d887401554cae6b61a079e17568f7d3b556316cc38b2c5ecb454c33
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

Security for nokk 0.1.46a1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 4 files in this release have been uploaded with provenance metadata.

Select from 4 files

Attestation for nokk-0.1.46a1-py3-none-win_amd64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page