GET /api/sites/:slug/views/:state/:view
Navigates to the page state and executes the view’s extraction code against the live DOM. Returns structured data.
When you call this endpoint, the execution server:
- Looks up the manifest for the site
- Finds the target state and view
- Opens a new browser page
- Navigates to the state’s URL
- Waits for the DOM to settle
- Runs the view’s extraction code
- Returns the result as JSON
Path parameters
The site identifier (e.g.,
example-com).The state name from the manifest (e.g.,
HomePage, SearchResults).The view name within the state (e.g.,
product_list, user_profile).Query parameters
If the state’s URL pattern contains template variables (e.g.,/products/{id}), pass the values as query parameters:
Example
Response fields
| Field | Type | Description |
|---|---|---|
ok | boolean | true on success |
data | any | The structured data extracted by the view |
state | string | The state name where the view was executed |
steps | array | Ordered list of steps the executor performed |
Error responses
| Status | Body |
|---|---|
404 | { "error": "Manifest not found" } |
404 | { "error": "State 'BadState' not found" } |
404 | { "error": "Route 'bad_view' not found" } |
429 | { "error": "Max concurrent executions (3) reached. Try again later." } |
500 | { "error": "View 'product_list' failed: <message>" } |