Kernel Browser Telemetry API
Stream live telemetry events from a browser session.
Stream live telemetry events from a browser session.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/kernel-so-browser-telemetry-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Kernel API Keys Browser Telemetry API
description: Developer tools and cloud infrastructure for AI agents to use web browsers
version: 0.1.0
servers:
- url: https://api.onkernel.com
description: API Server
security:
- bearerAuth: []
tags:
- name: Browser Telemetry
description: Stream live telemetry events from a browser session.
paths:
/browsers/{id}/telemetry:
get:
summary: Stream telemetry events via SSE
description: 'Streams browser telemetry events as a server-sent events (SSE) stream. The stream closes when the browser session terminates. Each event frame includes an id: field containing a monotonically increasing sequence number; pass it as Last-Event-ID on reconnect to resume without gaps. The event: field is never set; all frames carry JSON in the data: field. A keepalive comment frame is sent every 15 seconds when no events arrive. Returns 404 if the browser session does not exist. If telemetry was not enabled on the session, the stream opens but no events are delivered.
'
operationId: streamBrowserTelemetry
tags:
- Browser Telemetry
security:
- bearerAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: string
description: Browser session ID
- name: Last-Event-ID
in: header
schema:
type: string
description: Last event sequence number for SSE reconnection (sent by SSE clients on reconnect)
responses:
'200':
description: SSE stream of telemetry events
headers:
X-SSE-Content-Type:
description: Media type of SSE data events (always application/json).
schema:
type: string
const: application/json
content:
text/event-stream:
schema:
$ref: '#/components/schemas/BrowserTelemetryEventEnvelope'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalError'
x-codeSamples:
- lang: JavaScript
source: "import Kernel from '@onkernel/sdk';\n\nconst client = new Kernel({\n apiKey: process.env['KERNEL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.browsers.telemetry.stream('id');\n\nconsole.log(response.event);"
- lang: Python
source: "import os\nfrom kernel import Kernel\n\nclient = Kernel(\n api_key=os.environ.get(\"KERNEL_API_KEY\"), # This is the default and can be omitted\n)\nfor telemetry in client.browsers.telemetry.stream(\n id=\"id\",\n):\n print(telemetry)"
- lang: Go
source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/kernel/kernel-go-sdk\"\n\t\"github.com/kernel/kernel-go-sdk/option\"\n)\n\nfunc main() {\n\tclient := kernel.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tstream := client.Browsers.Telemetry.StreamStreaming(\n\t\tcontext.TODO(),\n\t\t\"id\",\n\t\tkernel.BrowserTelemetryStreamParams{},\n\t)\n\tfor stream.Next() {\n\t\tfmt.Printf(\"%+v\\n\", stream.Current())\n\t}\n\terr := stream.Err()\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n"
components:
schemas:
BrowserPageTabOpenedEvent:
type: object
description: A new browser tab or target was opened (CDP Target.attachedToTarget for page targets). Fires before a CDP session is attached to the new target, so session_id, frame_id, loader_id, and nav_seq are absent; this event does not compose BrowserEventContext. Consumers reading context fields generically should treat it as a special case.
required:
- ts
- type
- source
properties:
ts:
type: integer
format: int64
description: Event timestamp in Unix microseconds.
type:
type: string
const: page_tab_opened
source:
$ref: '#/components/schemas/BrowserEventSource'
data:
type: object
additionalProperties: false
properties:
target_id:
type: string
description: CDP target identifier for the newly opened tab.
target_type:
$ref: '#/components/schemas/BrowserTargetType'
url:
type: string
description: Initial URL of the new tab.
title:
type: string
description: Initial page title of the new tab.
opener_id:
type: string
description: Target identifier of the tab that opened this one, if any.
truncated:
type: boolean
description: True if the data field was truncated due to size limits.
BrowserPageNavigationSettledEvent:
type: object
description: Emitted when page_dom_content_loaded and page_layout_settled have both fired for the same navigation, indicating the page is loaded and visually stable. Independent of network_idle; a single pending request does not block it.
required:
- ts
- type
- source
properties:
ts:
type: integer
format: int64
description: Event timestamp in Unix microseconds.
type:
type: string
const: page_navigation_settled
source:
$ref: '#/components/schemas/BrowserEventSource'
data:
$ref: '#/components/schemas/BrowserEventContext'
truncated:
type: boolean
description: True if the data field was truncated due to size limits.
BrowserNetworkRequestEvent:
type: object
description: A browser network request sent event.
required:
- ts
- type
- source
properties:
ts:
type: integer
format: int64
description: Event timestamp in Unix microseconds.
type:
type: string
const: network_request
source:
$ref: '#/components/schemas/BrowserEventSource'
data:
allOf:
- $ref: '#/components/schemas/BrowserEventContext'
- type: object
properties:
request_id:
type: string
description: CDP request identifier, unique within the session.
method:
type: string
description: HTTP method as sent on the wire (e.g. GET, POST).
document_url:
type: string
description: URL of the document that initiated the request.
headers:
$ref: '#/components/schemas/BrowserHttpHeaders'
description: Request headers.
resource_type:
type: string
description: CDP Network.ResourceType for the request, passed through as-is from Chrome. Known values include Document, Fetch, XHR, Script, Stylesheet, Image, Media, Font, TextTrack, EventSource, WebSocket, Manifest, Prefetch, Other, and more.
initiator_type:
type: string
description: CDP Initiator.type indicating what caused the request, passed through as-is from Chrome. Known values include script, parser, preload, and other.
post_data:
type: string
description: Request body for POST/PUT requests, if available.
is_redirect:
type: boolean
description: True if this request is the result of a redirect.
redirect_url:
type: string
description: Original URL before the redirect, present when is_redirect is true.
truncated:
type: boolean
description: True if the data field was truncated due to size limits.
BrowserEventContext:
type: object
description: Browser event context stamped by the browser monitor onto all CDP-sourced events. Identifies the target, frame, and navigation epoch in which the event occurred.
properties:
session_id:
type: string
description: CDP session identifier for the target connection.
target_id:
type: string
description: Browser target identifier (stable across navigations within a tab).
target_type:
$ref: '#/components/schemas/BrowserTargetType'
frame_id:
type: string
description: CDP frame identifier within the target.
loader_id:
type: string
description: CDP document loader identifier, reset on each navigation.
url:
type: string
description: URL relevant to this event — page URL for navigation and page events, request URL for network events.
nav_seq:
type: integer
format: int64
description: Monotonically increasing navigation sequence number, incremented on each top-level navigation within the target.
BrowserPageDomContentLoadedEvent:
type: object
description: A browser DOMContentLoaded event (CDP Page.domContentEventFired).
required:
- ts
- type
- source
properties:
ts:
type: integer
format: int64
description: Event timestamp in Unix microseconds.
type:
type: string
const: page_dom_content_loaded
source:
$ref: '#/components/schemas/BrowserEventSource'
data:
allOf:
- $ref: '#/components/schemas/BrowserEventContext'
- type: object
properties:
cdp_timestamp:
type: number
description: Chrome monotonic clock value in seconds at which DOMContentLoaded fired, relative to browser process start (not Unix epoch). Use ts for wall-clock time.
truncated:
type: boolean
description: True if the data field was truncated due to size limits.
BrowserMonitorDisconnectedEvent:
type: object
description: The CDP connection to Chrome was lost. Telemetry events may be dropped until monitor_reconnected arrives. Treat any in-progress computed state (network_idle, page_layout_settled) as unreliable until then.
required:
- ts
- type
- source
properties:
ts:
type: integer
format: int64
description: Event timestamp in Unix microseconds.
type:
type: string
const: monitor_disconnected
source:
$ref: '#/components/schemas/BrowserEventSource'
data:
type: object
additionalProperties: false
properties:
reason:
type: string
description: 'Reason for the disconnection. chrome_restarted: Chrome process restarted.'
enum:
- chrome_restarted
truncated:
type: boolean
description: True if the data field was truncated due to size limits.
BrowserTelemetryEventEnvelope:
type: object
description: 'Envelope wrapping a browser telemetry event with its monotonic sequence number. Each SSE data: frame carries one envelope as JSON. The seq value is also emitted as the SSE id: field so clients can pass it as Last-Event-ID on reconnect.
'
required:
- seq
- event
properties:
seq:
type: integer
format: int64
minimum: 1
description: 'Process-monotonic sequence number assigned by the browser VM. Pass as Last-Event-ID on reconnect to resume without gaps. Gaps in received seq values indicate dropped events.
'
event:
$ref: '#/components/schemas/BrowserTelemetryEvent'
additionalProperties: false
ErrorDetail:
type: object
properties:
code:
type: string
description: Lower-level error code providing more specific detail
example: invalid_input
message:
type: string
description: Further detail about the error
example: Provided version string is not semver compliant
BrowserPageNavigationEvent:
type: object
description: A browser page navigation started event (CDP Page.frameNavigated). Carries nav context fields inline but not nav_seq, as this event resets the navigation epoch.
required:
- ts
- type
- source
properties:
ts:
type: integer
format: int64
description: Event timestamp in Unix microseconds.
type:
type: string
const: page_navigation
source:
$ref: '#/components/schemas/BrowserEventSource'
data:
type: object
additionalProperties: false
properties:
url:
type: string
description: URL navigated to.
frame_id:
type: string
description: CDP frame identifier of the navigated frame.
parent_frame_id:
type: string
description: Parent frame identifier for subframe navigations; absent for top-level navigations.
loader_id:
type: string
description: New CDP document loader identifier assigned for this navigation.
session_id:
type: string
description: CDP session identifier.
target_id:
type: string
description: Browser target identifier.
target_type:
$ref: '#/components/schemas/BrowserTargetType'
truncated:
type: boolean
description: True if the data field was truncated due to size limits.
BrowserTargetType:
type: string
description: CDP target type of the page that produced the event.
enum:
- page
- background_page
- service_worker
- shared_worker
- other
BrowserPageLayoutSettledEvent:
type: object
description: A browser layout settled event emitted 1 second after page load with no intervening layout shifts, indicating visual stability. Each layout shift resets the 1-second timer.
required:
- ts
- type
- source
properties:
ts:
type: integer
format: int64
description: Event timestamp in Unix microseconds.
type:
type: string
const: page_layout_settled
source:
$ref: '#/components/schemas/BrowserEventSource'
data:
$ref: '#/components/schemas/BrowserEventContext'
truncated:
type: boolean
description: True if the data field was truncated due to size limits.
BrowserHttpHeaders:
type: object
description: HTTP headers map forwarded as-is from CDP without normalization. Values are typically strings but may be any JSON type.
additionalProperties: true
BrowserNetworkIdleEvent:
type: object
description: A browser network idle event emitted after a 500ms quiet period with no in-flight HTTP requests.
required:
- ts
- type
- source
properties:
ts:
type: integer
format: int64
description: Event timestamp in Unix microseconds.
type:
type: string
const: network_idle
source:
$ref: '#/components/schemas/BrowserEventSource'
data:
$ref: '#/components/schemas/BrowserEventContext'
truncated:
type: boolean
description: True if the data field was truncated due to size limits.
BrowserMonitorScreenshotEvent:
type: object
description: A periodic screenshot of the browser viewport.
required:
- ts
- type
- source
properties:
ts:
type: integer
format: int64
description: Event timestamp in Unix microseconds.
type:
type: string
const: monitor_screenshot
source:
$ref: '#/components/schemas/BrowserEventSource'
data:
type: object
additionalProperties: false
properties:
png:
type: string
contentEncoding: base64
description: Base64-encoded PNG screenshot of the browser viewport.
truncated:
type: boolean
description: True if the data field was truncated due to size limits.
BrowserEventSource:
type: object
description: Provenance metadata identifying which producer emitted the event.
required:
- kind
properties:
kind:
type: string
enum:
- cdp
- kernel_api
- extension
- local_process
description: 'Event producer. cdp: Chrome DevTools Protocol events from the browser. kernel_api: Kernel API server. extension: injected Chrome extension. local_process: system process running alongside the browser.'
event:
type: string
description: Producer-specific event name (e.g. Runtime.consoleAPICalled for CDP-sourced console events, Runtime.exceptionThrown for uncaught exceptions).
metadata:
type: object
description: Producer-specific context (e.g. CDP target/session/frame IDs).
additionalProperties:
type: string
BrowserPageLoadEvent:
type: object
description: A browser page load event (CDP Page.loadEventFired).
required:
- ts
- type
- source
properties:
ts:
type: integer
format: int64
description: Event timestamp in Unix microseconds.
type:
type: string
const: page_load
source:
$ref: '#/components/schemas/BrowserEventSource'
data:
allOf:
- $ref: '#/components/schemas/BrowserEventContext'
- type: object
properties:
cdp_timestamp:
type: number
description: Chrome monotonic clock value in seconds at which the load event fired, relative to browser process start (not Unix epoch). Use ts for wall-clock time.
truncated:
type: boolean
description: True if the data field was truncated due to size limits.
BrowserNetworkLoadingFailedEvent:
type: object
description: A browser network loading failed event. If the request was already in flight when CDP attached (no prior network_request was emitted for it), url, frame_id, loader_id, and resource_type are absent; BrowserEventContext is partially populated in that case.
required:
- ts
- type
- source
properties:
ts:
type: integer
format: int64
description: Event timestamp in Unix microseconds.
type:
type: string
const: network_loading_failed
source:
$ref: '#/components/schemas/BrowserEventSource'
data:
allOf:
- $ref: '#/components/schemas/BrowserEventContext'
- type: object
properties:
request_id:
type: string
description: CDP request identifier matching the originating network_request event.
error_text:
type: string
description: Network error description (e.g. net::ERR_CONNECTION_REFUSED).
canceled:
type: boolean
description: True if the request was canceled by the browser or page script.
resource_type:
type: string
description: CDP Network.ResourceType for the request, passed through as-is from Chrome. Known values include Document, Fetch, XHR, Script, Stylesheet, Image, Media, Font, TextTrack, EventSource, WebSocket, Manifest, Prefetch, Other, and more.
truncated:
type: boolean
description: True if the data field was truncated due to size limits.
BrowserInteractionKeyEvent:
type: object
description: A browser keyboard event captured via injected page script.
required:
- ts
- type
- source
properties:
ts:
type: integer
format: int64
description: Event timestamp in Unix microseconds.
type:
type: string
const: interaction_key
source:
$ref: '#/components/schemas/BrowserEventSource'
data:
allOf:
- $ref: '#/components/schemas/BrowserEventContext'
- type: object
properties:
key:
type: string
description: Key value from the KeyboardEvent (e.g. Enter, Backspace, a).
selector:
type: string
description: CSS selector path to the element that had focus when the key was pressed.
tag:
type: string
description: HTML tag name of the focused element in uppercase (e.g. INPUT, TEXTAREA, DIV).
truncated:
type: boolean
description: True if the data field was truncated due to size limits.
BrowserMonitorReconnectedEvent:
type: object
description: The CDP connection to Chrome was successfully re-established after a disconnection. Events emitted during the gap are lost. Computed state is reset, so navigation and network tracking restart fresh from this point.
required:
- ts
- type
- source
properties:
ts:
type: integer
format: int64
description: Event timestamp in Unix microseconds.
type:
type: string
const: monitor_reconnected
source:
$ref: '#/components/schemas/BrowserEventSource'
data:
type: object
additionalProperties: false
properties:
reconnect_duration_ms:
type: integer
format: int64
description: Wall-clock time in milliseconds taken to reconnect after the disconnection.
truncated:
type: boolean
description: True if the data field was truncated due to size limits.
BrowserInteractionScrollSettledEvent:
type: object
description: A browser scroll settled event emitted after scroll position stops changing, captured via injected page script.
required:
- ts
- type
- source
properties:
ts:
type: integer
format: int64
description: Event timestamp in Unix microseconds.
type:
type: string
const: interaction_scroll_settled
source:
$ref: '#/components/schemas/BrowserEventSource'
data:
allOf:
- $ref: '#/components/schemas/BrowserEventContext'
- type: object
properties:
from_x:
type: integer
description: Scroll x-position at the start of the scroll gesture in CSS pixels.
from_y:
type: integer
description: Scroll y-position at the start of the scroll gesture in CSS pixels.
to_x:
type: integer
description: Final scroll x-position after the gesture settled in CSS pixels.
to_y:
type: integer
description: Final scroll y-position after the gesture settled in CSS pixels.
target_selector:
type: string
description: CSS selector path to the scrolled element.
truncated:
type: boolean
description: True if the data field was truncated due to size limits.
Error:
type: object
required:
- code
- message
properties:
code:
type: string
description: Application-specific error code (machine-readable)
example: bad_request
message:
type: string
description: Human-readable error description for debugging
example: 'Missing required field: app_name'
details:
type: array
description: Additional error details (for multiple errors)
items:
$ref: '#/components/schemas/ErrorDetail'
inner_error:
$ref: '#/components/schemas/ErrorDetail'
BrowserConsoleLogEvent:
type: object
description: A browser console log event (console.log, console.info, console.warn, etc.).
required:
- ts
- type
- source
properties:
ts:
type: integer
format: int64
description: Event timestamp in Unix microseconds.
type:
type: string
const: console_log
source:
$ref: '#/components/schemas/BrowserEventSource'
data:
allOf:
- $ref: '#/components/schemas/BrowserEventContext'
- type: object
properties:
level:
type: string
description: CDP Runtime.consoleAPICalled type, passed through unfiltered from Chrome. error is routed to console_error events instead; all other CDP console types appear here. See CDP spec for the full enum.
text:
type: string
description: First console argument coerced to string.
args:
type: array
description: All console arguments coerced to strings.
items:
type: string
stack_trace:
$ref: '#/components/schemas/BrowserCallStack'
truncated:
type: boolean
description: True if the data field was truncated due to size limits.
BrowserCallStack:
type: object
description: CDP Runtime.StackTrace representing the JavaScript call stack at the time of an event. Fields use CDP naming conventions rather than snake_case to match the Chrome DevTools Protocol wire format.
required:
- callFrames
properties:
description:
type: string
description: Optional label for the stack trace (e.g. async cause).
callFrames:
type: array
description: Ordered list of call frames, outermost first.
items:
type: object
required:
- functionName
- scriptId
- url
- lineNumber
- columnNumber
properties:
functionName:
type: string
description: JavaScript function name, or empty string for anonymous functions.
scriptId:
type: string
description: CDP script identifier.
url:
type: string
description: URL or name of the script file.
lineNumber:
type: integer
description: Zero-based line number within the script.
columnNumber:
type: integer
description: Zero-based column number within the line.
parent:
$ref: '#/components/schemas/BrowserCallStack'
description: Parent stack trace for async stacks.
BrowserMonitorReconnectFailedEvent:
type: object
description: The CDP connection to Chrome could not be re-established after exhausting all reconnection attempts. No further telemetry events will arrive on this session.
required:
- ts
- type
- source
properties:
ts:
type: integer
format: int64
description: Event timestamp in Unix microseconds.
type:
type: string
const: monitor_reconnect_failed
source:
$ref: '#/components/schemas/BrowserEventSource'
data:
type: object
additionalProperties: false
properties:
reason:
type: string
description: 'Reason for the reconnection failure. reconnect_exhausted: all retry attempts were used up without successfully restoring the CDP connection.'
enum:
- reconnect_exhausted
truncated:
type: boolean
description: True if the data field was truncated due to size limits.
BrowserPageLayoutShiftEvent:
type: object
description: A browser cumulative layout shift (CLS) event from the Performance Timeline API.
required:
- ts
- type
- source
properties:
ts:
type: integer
format: int64
description: Event timestamp in Unix microseconds.
type:
type: string
const: page_layout_shift
source:
$ref: '#/components/schemas/BrowserEventSource'
data:
allOf:
- $ref: '#/components/schemas/BrowserEventContext'
- type: object
properties:
source_frame_id:
type: string
description: CDP frame identifier of the frame where the layout shift occurred.
time:
type: number
description: Performance Timeline timestamp of the layout shift in milliseconds.
duration:
type: number
description: Duration of the layout shift entry in milliseconds (always 0 for layout shifts per spec).
layout_shift_details:
type: object
additionalProperties: false
description: PerformanceLayoutShift attributes from the Performance Timeline entry.
properties:
value:
type: number
description: Layout shift score for this entry (contribution to CLS).
had_recent_input:
type: boolean
description: True if the layout shift was preceded by user input within 500ms, excluding it from CLS.
truncated:
type: boolean
description: True if the data field was truncated due to size limits.
BrowserTelemetryEvent:
oneOf:
- $ref: '#/components/schemas/BrowserConsoleLogEvent'
- $ref: '#/components/schemas/BrowserConsoleErrorEvent'
- $ref: '#/components/schemas/BrowserNetworkRequestEvent'
- $ref: '#/components/schemas/BrowserNetworkResponseEvent'
- $ref: '#/components/schemas/BrowserNetworkLoadingFailedEvent'
- $ref: '#/components/schemas/BrowserNetworkIdleEvent'
- $ref: '#/components/schemas/BrowserPageNavigationEvent'
- $ref: '#/components/schemas/BrowserPageDomContentLoadedEvent'
- $ref: '#/components/schemas/BrowserPageLoadEvent'
- $ref: '#/components/schemas/BrowserPageTabOpenedEvent'
- $ref: '#/components/schemas/BrowserPageLayoutShiftEvent'
- $ref: '#/components/schemas/BrowserPageLcpEvent'
- $ref: '#/components/schemas/BrowserPageLayoutSettledEvent'
- $ref: '#/components/schemas/BrowserPageNavigationSettledEvent'
- $ref: '#/components/schemas/BrowserInteractionClickEvent'
- $ref: '#/components/schemas/BrowserInteractionKeyEvent'
- $ref: '#/components/schemas/BrowserInteractionScrollSettledEvent'
- $ref: '#/components/schemas/BrowserMonitorScreenshotEvent'
- $ref: '#/components/schemas/BrowserMonitorDisconnectedEvent'
- $ref: '#/components/schemas/BrowserMonitorReconnectedEvent'
- $ref: '#/components/schemas/BrowserMonitorReconnectFailedEvent'
- $ref: '#/components/schemas/BrowserMonitorInitFailedEvent'
discriminator:
propertyName: type
mapping:
console_log: '#/components/schemas/BrowserConsoleLogEvent'
console_error: '#/components/schemas/BrowserConsoleErrorEvent'
network_request: '#/components/schemas/BrowserNetworkRequestEvent'
network_response: '#/components/schemas/BrowserNetworkResponseEvent'
network_loading_failed: '#/components/schemas/BrowserNetworkLoadingFailedEvent'
network_idle: '#/components/schemas/BrowserNetworkIdleEvent'
page_navigation: '#/components/schemas/BrowserPageNavigationEvent'
page_dom_content_loaded: '#/components/schemas/BrowserPageDomContentLoadedEvent'
page_load: '#/components/schemas/BrowserPageLoadEvent'
page_tab_opened: '#/compone
# --- truncated at 32 KB (42 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/kernel-so/refs/heads/main/openapi/kernel-so-browser-telemetry-api-openapi.yml