For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
DiscordDashboard
DocumentationAPI ReferenceCookbook
DocumentationAPI ReferenceCookbook
  • API Reference
    • POSTStart instance
    • GETGet instance by ID
    • GETList all instances
    • GETList all browser authentication states
      • POSTTake screenshot
      • GETGet stream URL
      • POSTRun computer actions
      • POSTRun bash actions
      • POSTRun edit actions
      • POSTRun file actions
      • POSTUpload a file to the instance
      • POSTStop instance
      • POSTPause instance
      • POSTResume instance
  • SDK Reference
    • Python SDK
    • TypeScript SDK
Logo
DiscordDashboard
API ReferenceInstance

Run file actions

POST
https://api.scrapybara.com/v1/instance/:instance_id/file
POST
/v1/instance/:instance_id/file
1import requests
2
3url = "https://api.scrapybara.com/v1/instance/instance_id/file"
4
5payload = { "command": "command" }
6headers = {
7 "x-api-key": "<apiKey>",
8 "Content-Type": "application/json"
9}
10
11response = requests.post(url, json=payload, headers=headers)
12
13print(response.json())
1{
2 "output": "output",
3 "error": "error",
4 "base64_image": "base64_image",
5 "system": "system"
6}
Was this page helpful?
Previous

Upload a file to the instance

Next
Built with

Authentication

x-api-keystring
API Key authentication via header

Path parameters

instance_idstringRequired

Request

This endpoint expects an object.
commandstringRequired
pathstringOptional
contentstringOptional
modestringOptional
encodingstringOptional
view_rangelist of integersOptional
recursivebooleanOptional
srcstringOptional
dststringOptional
old_strstringOptional
new_strstringOptional
lineintegerOptional
textstringOptional
lineslist of integersOptional
all_occurrencesbooleanOptional
patternstringOptional
case_sensitivebooleanOptional
line_numbersbooleanOptional

Response

Successful Response
outputstring
errorstring
base64_imagestring
systemstring

Errors

422
Instance File Request Unprocessable Entity Error