Skip to content
vVectorly

Vectorly

BlogContactDocs

Jump to

Data models

Reference documentation for data models and schemas used in the Vectorly API.

Routine

A routine represents a reusable web automation workflow.

JSONJSON

Fields

FieldTypeDescription
idstringUnique routine identifier
namestringMachine-readable routine name
descriptionstringHuman-readable description
created_bystringUser ID of the user who created the routine
organization_idstringOrganization ID that the routine belongs to
is_publicbooleanWhether the routine is publicly viewable
routine_statusstringStatus: "draft", "active", "archived"
incognitobooleanWhether to use incognito mode when executing
tagsstring[]Tags for categorizing the routine (e.g., ["travel", "api"])
parametersParameter[]List of parameter definitions (see Parameter model)
operationsOperation[]List of operations to execute
created_atintegerUnix timestamp (seconds) when routine was created
updated_atintegerUnix timestamp (seconds) when routine was last updated

Parameter

Defines an input parameter for a routine.

JSONJSON

Fields

FieldTypeDescription
namestringParameter name (used in API calls)
typestringData type: "string", "number", "boolean", "date", "enum"
requiredbooleanWhether the parameter is required
descriptionstringHuman-readable description
defaultanyDefault value if not provided
validationobjectType-specific validation rules

Operations

Operations define the individual steps in a routine workflow. Each operation has a type field that determines its behavior and additional fields specific to that operation type.

Navigate

Navigates the browser to a specified URL.

JSONJSON
FieldTypeDescription
typestringMust be "navigate"
urlstringThe URL to navigate to

Sleep

Pauses execution for a specified duration.

JSONJSON
FieldTypeDescription
typestringMust be "sleep"
timeout_secondsnumberNumber of seconds to pause

Fetch

Makes an HTTP request to an endpoint and optionally stores the result.

JSONJSON
FieldTypeDescription
typestringMust be "fetch"
endpointEndpointThe endpoint configuration to fetch
session_storage_keystring | nullKey to store the result in session storage (optional)
data_sanitizerobject | nullData sanitizer configuration (optional)

Return

Returns a value from session storage as the routine result.

JSONJSON
FieldTypeDescription
typestringMust be "return"
session_storage_keystringThe session storage key containing the value to return

Click

Clicks on an element identified by a CSS selector.

Note: This operation automatically validates element visibility to avoid clicking hidden honeypot traps. Only visible, interactable elements will be clicked.

JSONJSON
FieldTypeDescription
typestringMust be "click"
selectorstringCSS selector to find the element to click
buttonstringMouse button: "left", "right", or "middle" (default: "left")
click_countintegerNumber of clicks to perform (default: 1)
timeout_msintegerMaximum wait time in milliseconds (default: 20000)
ensure_visiblebooleanWhether to scroll element into view before clicking (default: true)

Input Text

Types text into an input element.

Note: This operation automatically validates element visibility to avoid typing into hidden honeypot inputs. Only visible, interactable elements will receive input.

JSONJSON
FieldTypeDescription
typestringMust be "input_text"
selectorstringCSS selector to find the input element
textstringText to type into the element
clearbooleanWhether to clear existing text before typing (default: false)
timeout_msintegerMaximum wait time in milliseconds (default: 20000)

Press

Presses a keyboard key.

JSONJSON
FieldTypeDescription
typestringMust be "press"
keystringKeyboard key to press (e.g., "Enter", "Tab", "Escape")

Wait for URL

Waits for the current URL to match a regex pattern.

JSONJSON
FieldTypeDescription
typestringMust be "wait_for_url"
url_regexstringRegex pattern to match against window.location.href
timeout_msintegerMaximum wait time in milliseconds (default: 20000)

Scroll

Scrolls the page or a specific element.

JSONJSON
FieldTypeDescription
typestringMust be "scroll"
selectorstring | nullCSS selector for element to scroll. If null, scrolls the window
xinteger | nullAbsolute x position to scroll to (window only)
yinteger | nullAbsolute y position to scroll to (window only)
delta_xinteger | nullRelative x scroll amount
delta_yinteger | nullRelative y scroll amount
behaviorstringScroll behavior: "auto" or "smooth" (default: "auto")
timeout_msintegerMaximum wait time for element in milliseconds (default: 20000)

Return HTML

Returns HTML content from the page or a specific element.

JSONJSON
FieldTypeDescription
typestringMust be "return_html"
scopestringEither "page" (returns document.documentElement.outerHTML) or "element" (returns selected element's HTML) (default: "page")
selectorstring | nullCSS selector for element (required if scope is "element")
timeout_msintegerMaximum wait time in milliseconds (default: 20000)

Get Cookies

Get all cookies (including HttpOnly) via CDP and store them in session storage.

This operation uses the Chrome DevTools Protocol's Network.getAllCookies() method to retrieve all cookies, including HttpOnly cookies that are not accessible via document.cookie in JavaScript.

JSONJSON
FieldTypeDescription
typestringMust be "get_cookies"
session_storage_keystringThe session storage key to save the cookies to
domain_filterstringDomain to filter cookies by. Use wildcard "*" to get all cookies (default: "*")

Download

Downloads a file from an endpoint and returns it as base64 in the routine result.

This operation fetches a binary file (PDF, image, audio, etc.) from an endpoint, converts it to base64, and directly sets it as the routine's result. This is typically the last operation in a routine.

JSONJSON
FieldTypeDescription
typestringMust be "download"
endpointEndpointThe endpoint configuration to download from
filenamestringFilename for the downloaded file (e.g., "report.pdf", "image.png")

JS Evaluate

Evaluates JavaScript code in the browser context.

Note: The JavaScript code must be wrapped in an IIFE (Immediately Invoked Function Expression): (function() { ... })() or (() => { ... })(). This is validated at the data model level.

Allowed:
  • Promises and async/await (e.g., new Promise(), .then(), await)
  • setTimeout/setInterval (useful for polling)
  • Loops (while, for, do) - timeout prevents infinite loops
  • Synchronous JavaScript operations
  • DOM manipulation
Not allowed:
  • Dynamic code generation: eval, Function
  • Network / exfiltration: fetch, XMLHttpRequest, WebSocket, sendBeacon
  • Persistent event hooks: addEventListener, MutationObserver, IntersectionObserver
  • Navigation / lifecycle control: window.close
JSONJSON
FieldTypeDescription
typestringMust be "js_evaluate"
jsstringJavaScript code in IIFE format: (function() { ... })() or (() => { ... })()
timeout_secondsnumberMaximum execution time in seconds (default: 5.0, max: 10.0)
session_storage_keystring | nullOptional session storage key to store the evaluation result

Execution

Represents the result of executing a routine.

JSONJSON

Fields

FieldTypeDescription
execution_idstringUnique execution identifier (UUID)
routine_idstringID of the executed routine
routine_namestringName of the executed routine
statusstringExecution status: "pending", "running", "completed", "failed"
resultResult | nullExecution result (see Result below)
errorstring | nullError message if execution failed
created_atstringExecution start time (ISO 8601)
completed_atstring | nullExecution completion time (ISO 8601)
duration_secondsnumber | nullTotal execution time in seconds

Result

Represents the output of a routine.

FieldTypeDescription
okbooleanWhether the routine execution was successful
errorstring | nullError message from the routine execution
warningsstring[]Warnings from the routine execution
operations_metadataOperationMetadata[]Per-operation execution metadata (see below)
placeholder_resolutionobjectResolved placeholder values from the execution
is_base64booleanWhether data is base64-encoded binary content
content_typestring | nullMIME type of the data (e.g., "application/pdf")
filenamestring | nullSuggested filename for binary data
dataobject | array | string | nullData returned by the routine

OperationMetadata

Metadata collected during each operation's execution.

FieldTypeDescription
typestringThe operation type (e.g., "navigate", "fetch", "click")
duration_secondsnumberHow long the operation took to execute
detailsobjectOperation-specific data (e.g., HTTP status codes)
errorstring | nullError message if the operation failed

Validation result

Returned by validation endpoints.

Valid response

JSONJSON

Invalid response

JSONJSON

Fields

FieldTypeDescription
validbooleanWhether validation passed
errorsarrayList of validation errors (empty if valid)

List endpoints support pagination via query parameters.

Query parameters

ParameterTypeDefaultDescription
limitinteger20Maximum items to return (1-100)
offsetinteger0Number of items to skip

Paginated response

JSONJSON
v

Vectorly

Copyright © 2026 Vectorly

This site is protected by reCAPTCHA.

Google Privacy Policy and Terms of Service apply.

Website

v

Vectorly

Copyright © 2026 Vectorly

This site is protected by reCAPTCHA.

Google Privacy Policy and Terms of Service apply.

Website