API reference
Choose your interface:
| Reference | What you’ll find |
|---|---|
| Python package | Session, Page, handles, response data and exceptions |
| Python plugins | Plugin installers, factories and host context |
| Node package | Session and page methods, options, event records and TypeScript types |
| CLI | Commands, flags, defaults and accepted values |
For a complete program and its expected output, start with the tutorials.
Find the object you need
Section titled “Find the object you need”| You want to work with | Use |
|---|---|
| Cookies and request defaults | Session |
| Navigation, evaluation, input and routes | Page |
| Original HTTP bytes and metadata | Page’s response snapshot |
| Current serialized DOM | page.html(); await it in Node |
| A DOM node or JavaScript object kept for later use | ElementHandle / JSHandle; dispose when finished |
| Browser subsystems and their limits | Browser support |
| Extraction and custom host callbacks | Plugins |
Python timeouts are seconds; Node timeouts are milliseconds. A session owns its pages. Navigation invalidates the previous realm’s handles.
See browser support for the JavaScript APIs available inside a page. The references above describe the Python, Node.js and CLI interfaces.