Actions
When making a Browser Request you can specify a list of actions you wish for us to carry out on the requested web page. These actions conform to the following format:
Universal Parameters
All actions have the following parameters:
Name | Type | Required | Description |
---|---|---|---|
|
| The type name of the action. | |
|
| Should execution of further actions continue or throw an error if this action fails.
Default: | |
|
| A customId to help you find the action in the response.
Default: |
Action Execution
Actions are carried out in the order they are submitted. Every action type has a continue_on_fail
parameter which, if set to false
will cause execution to finish if any action failed. Setting this to true
ensures that all actions are carried out.
Custom Id
As shown above, you can submit a customId with each action you submit to the API. We'll include this Id in the outputs from the browser request so you can find a certain action's output and/or status easily in the response.
Response Format
When a browser request has completed, information on an action's execution
Supported Actions
The Gaffa API supports the following actions detailed below. Click the "read more" buttons to read more information about each type.
Actions without outputs
scroll
Scroll to a particular point on the page or, in the case of pages with infinite scrolling, scroll until a given time has elapsed.
wait
Wait for a given time to elapse or an element to appear on page before proceeding to the next action.
Actions with outputs
generate_simplified_dom
Generate a simplified version of the DOM
capture_snapshot
Create a completely static version of the web page which can be accessed offline
Last updated