Skip to main content
The Kernel Python and TypeScript SDKs and the Kernel CLI work with querying.ai Browser. Set the SDK’s base URL to https://api.querying.ai/browser and its API key to your querying.ai vt_ key. Features, limits, concurrency and prices are on the Browser API page.

1. Set your API key

2. Create a browser and drive it

  • stealth: true gives the browser a fresh fingerprint, a residential exit and automatic captcha solving. Traffic through the residential exit is billed per GB. See Billing.
  • browser_live_view_url opens the live view in any browser tab. kernel.browsers.live_view.create(session_id) issues a read-only (default) or control URL; scope and ttl_seconds set the access and an optional expiry.
  • cdp_ws_url carries a token for this session, so Playwright connects with no API key. Puppeteer connects with puppeteer.connect({ browserWSEndpoint: browser.cdp_ws_url }).
  • Deleting the browser stops its charges. A browser that has no client connected for timeout_seconds (60 by default) ends on its own.

3. Send an HTTP request through the browser

browsers.curl sends a request through the browser’s network and returns the status and body:
browsers.request, browsers.stream and browsers.fetch are unavailable at this base URL. Use browsers.curl.

4. Keep a site signed in with Managed Auth

Store the site’s login as a credential and link it to a profile with a connection. login() signs the profile in. The connection then checks the login every health_check_interval seconds (3600 by default, at least 300) and signs in again with the credential when the site has signed the profile out.
  • A browser that opens the profile starts signed in to the site.
  • A login that needs a person, such as an SMS or email code, an account choice or an approval, pauses at hosted_url, where the person finishes it in the live view. When an automatic re-login needs a person, the connection moves to NEEDS_AUTH with an error_code such as sms_code_required, and can_reauth_reason names what the next login needs. With a totp_secret on the credential, re-logins enter authenticator codes themselves.
  • auth.connections.timeline(id) lists logins, re-logins and health checks. Call login() right before work that needs the session: while the profile is signed in, it reaches SUCCESS at once.
  • Health checks and re-logins run in headful browsers billed as browser time. Once a check finds the profile signed out, a connection that cannot sign in again on its own is not checked until the next login(). See Billing.

Kernel CLI

Point the CLI at the same base URL:
Next: Browserbase SDK, Credits and limits.