Introduction
PinchTab provides a REST API for programmatic browser control. The API runs on port 9867 and allows you to manage browser instances, control tabs, navigate pages, and automate user interactions.All API endpoints communicate with Chrome via the DevTools Protocol (CDP). PinchTab handles the complexity of CDP and exposes a simple REST interface.
Base URL
Architecture
PinchTab uses an instance-scoped architecture:PinchTab Server
HTTP server on port 9867 that manages all instances and routes requests
Chrome Instances
Independent Chrome processes, each with its own profile and tabs
Profiles
Chrome user data directories that store cookies, history, and settings
Tabs
Individual browser pages within an instance
API Categories
| Category | Endpoints | Purpose |
|---|---|---|
| Instances | /instances/* | Create, list, and manage browser instances |
| Profiles | /profiles/* | Manage browser profiles (user data directories) |
| Tabs | /tabs/* | List and manage tabs across instances |
| Navigation | /tabs/{id}/navigate | Navigate tabs to URLs |
| Actions | /tabs/{id}/action, /tabs/{id}/actions | Click, type, fill, press, hover, scroll |
| Snapshot | /tabs/{id}/snapshot | Get accessibility tree (page structure) |
| Evaluation | /tabs/{id}/evaluate | Execute JavaScript in pages |
| Screenshots | /tabs/{id}/screenshot | Capture page screenshots |
/tabs/{id}/pdf | Export pages to PDF | |
| Cookies | /tabs/{id}/cookies | Get and set cookies |
| Stealth | /stealth/status, /fingerprint/rotate | Stealth mode and fingerprint rotation |
| Metrics | /metrics, /tabs/{id}/metrics | Performance and memory metrics |
| Downloads | /tabs/{id}/download, /tabs/{id}/upload | File download and upload handling |
| Screencast | /screencast | Live tab preview streaming |
Quick Start Example
Here’s a complete workflow that creates an instance, navigates to a page, takes a snapshot, and captures a screenshot:Response Format
All API responses use JSON format (except binary endpoints like screenshots and PDFs).Success Response
Error Response
HTTP Status Codes
| Code | Meaning | When |
|---|---|---|
| 200 | OK | Successful GET/POST request |
| 201 | Created | Resource created (instance, profile) |
| 204 | No Content | Successful DELETE |
| 400 | Bad Request | Invalid JSON, missing required fields |
| 404 | Not Found | Instance, profile, or tab not found |
| 423 | Locked | Tab is locked by another owner |
| 500 | Internal Server Error | Chrome error or server issue |
Authentication
Authentication is optional. If configured, use Bearer token authentication.
BRIDGE_TOKEN environment variable when starting the server:
Rate Limiting
PinchTab does not enforce rate limits by default. For production use, consider implementing rate limiting at the reverse proxy level.ID Formats
PinchTab uses hash-based IDs for security:- Profiles:
prof_XXXXXXXX(8-character hash) - Instances:
inst_XXXXXXXX(8-character hash) - Tabs:
tab_XXXXXXXX(8-character hash)
SDKs and Libraries
PinchTab uses a standard REST API. You can use any HTTP client:Next Steps
Authentication
Learn about API authentication and security
Instances API
Create and manage browser instances
Navigation
Navigate tabs to URLs
Actions API
Automate clicks, typing, and interactions
Design Principles
- Instance-Scoped — All operations target a specific instance
- Stateful — Cookies, history, and sessions persist within instances
- Multi-Agent Safe — Each agent can use its own isolated instance
- Profile-Based — Each instance uses a Chrome profile for state persistence
- Hash-Based IDs — Secure IDs prevent guessing and information leakage