Retrieve

POST

Retrieve data from webpage based on a url and natural language command that guides agents data extraction process.

The function can create a new session or be used as part of a session.

Request

This endpoint expects an object.
cmdstringRequiredDefaults to

A specific natural language instruction on data the agent should extract.

urlstringOptional

The URL to create or continue session from.

session_idstringOptional

Continues the session with session_id if provided.

localbooleanOptional

Boolean flag to indicate if session to be run locally or in the cloud (Default: False). If set to true, the session will be run locally via your chrome extension. If set to false, the session will be run in the cloud.

fieldslist of stringsOptional

List of fields (columns) to be outputted in data.

format"json" or "markdown"Optional
Allowed values: jsonmarkdown

The format of the response data. (Default: json)

max_itemsdoubleOptionalDefaults to 100

Maximum number of data items to retrieve. (Default: 100)

full_pagebooleanOptional

Flag to retrieve full page (Default: True). If set to false, the data will only be retrieved from the current session viewport.

render_jsbooleanOptional

Flag to include rich JS and ARIA elements in data retrieved. (Default: False)

scroll_to_bottombooleanOptional

Flag to scroll to the bottom of the page (Default: False). If set to true, the page will be scrolled to the bottom for a maximum of 5 seconds before data is retrieved.

modestringOptionalDefaults to fast

The mode you would like to use for the session. ‘standard’, ‘fast’ or ‘ludicrous’

include_screenshotbooleanOptional

Flag to include a screenshot with the response. (Default: False)

optional_paramsmap from strings to anyOptional

Additional optional parameters for the session.

Response

This endpoint returns an object.
messagestring

information relating to response

urlstring

The last accessed URL during the session.

statusstring

The current status of the session.

datalist of maps from strings to any

Array of data objects, each containing data requested in fields.

screenshotstringOptional

image url of the screenshot taken during the session.

session_idstringOptional

The unique identifier for the session.