POST v1/browser/request

For more information on browser requests, see here.

The following endpoint creates a browser request and either runs it synchronously or returns immediately with an ID so you can check it status later using this endpoint.

Create a new browser request

post

This endpoint loads the required URL in our browser and then performs the selected actions.

Authorizations
Body
proxy_locationstring | nullableOptional

The location of the proxy server that your request will be routed through, null means no proxy is used

Default: null
urlstringOptional

The url you want our browsers to visit on your behalf

asyncbooleanOptional

Whether the request should be processed asynchronously, synchronous requests can be maximum 60 seconds long.

Default: true
max_cache_ageinteger · int32 | nullableOptional

The maximum age of a cached result in seconds. 0 means the cache will never be used

Default: 0
Responses
200
The browser request response detailing the state and output of the request
application/json
post
POST /v1/browser/requests HTTP/1.1
Host: api.gaffa.dev
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 334

"{\"proxy_location\":null,\"url\":\"https://demo.gaffa.dev/simulate/table?loadTime=3&rowCount=20\",\"async\":false,\"max_cache_age\":0,\"settings\":{\"record_request\":false,\"actions\":[{\"type\":\"wait\",\"selector\":\"table\"},{\"type\":\"print\",\"size\":\"A4\",\"margin\":20}],\"time_limit\":60000,\"max_media_bandwidth\":null}}"
{"data":{"id":"brq_V2P6PqrZpycFtbc7mtXE4tsNbeg2N6","url":"https://demo.gaffa.dev/simulate/table?loadTime=3&rowCount=20","proxy_location":null,"state":"completed","credit_usage":1,"error":null,"error_reason":null,"actual_url":null,"http_status_code":200,"from_cache":false,"started_at":"2024-11-22T14:33:38.7762685+00:00","completed_at":"2024-11-22T14:33:42.7135779+00:00","running_time":null,"page_load_time":"00:00:00.1902889","actions":[{"id":"act_V2P6Q3fSHhBWAhf4BQJxj9oYbQF1V9","type":"wait","query":"wait?selector=table&timeout=20000&continue_on_fail=True","custom_id":null,"timestamp":"2024-11-22T14:33:38.9665719+00:00","output":null,"reference":null,"error":null},{"id":"act_V2P6Q6BuQhoYDAVkQMVSKkkwmUrArb","type":"print","query":"print?size=A4&margin=20&orientation=portrait&continue_on_fail=True","custom_id":null,"timestamp":"2024-11-22T14:33:42.3025888+00:00","output":"https://storage.gaffa.dev/brq/pdf/brq_V2P6PqrZpycFtbc7mtXE4tsNbeg2N6/....","reference":null,"error":null}],"video":null},"error":null,"httpCode":0}

Last updated