browser_get_app_state
Extract server-side rendered application state from SPAs like Next.js and Nuxt to access embedded data before client-side rendering modifies the page.
Instructions
Extract embedded SPA framework state (Next.js, Nuxt, Remix, GitHub, Apollo, Redux SSR) in one CDP call. Returns parsed payloads with framework labels. Use BEFORE browser_eval or browser_get_dom on SPAs where rendered HTML is sparse. Pass selectors to target specific window globals (e.g. 'window:MY_STATE'). Caveats: Only extracts SSR-injected state — client-only runtime state requires browser_eval.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| selectors | No | Optional override list of CSS selectors / window globals to probe. Window globals must be prefixed with 'window:' (e.g. 'window:__INITIAL_STATE__'). When omitted, scans the standard list (Next.js, GitHub react-app, Nuxt, Apollo, Remix, Redux SSR, JSON-LD). | |
| maxBytes | No | Maximum bytes per individual payload (default 4000). Larger payloads are stringified and truncated. | |
| tabId | No | Tab ID from browser_connect. Omit to use the first page tab. | |
| port | No | Chrome/Edge CDP remote debugging port. | |
| includeContext | No | When true, append activeTab and readyState context to the response. |