{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Browser Agent — Web Automation & JSON Extraction",
    "description": "About 4× faster AI browser agent: give a URL and a plain-English task. It clicks, fills and submits forms, logs in with 2FA, uploads files and returns the answer plus structured JSON in your schema. Median task 13 s. No LLM API key needed. $0.01 per step.",
    "version": "1.0",
    "x-build-id": "dmAiLOh52CaDz8f9r"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/newpo~ai-browser-agent/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-newpo-ai-browser-agent",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/newpo~ai-browser-agent/runs": {
      "post": {
        "operationId": "runs-sync-newpo-ai-browser-agent",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/newpo~ai-browser-agent/run-sync": {
      "post": {
        "operationId": "run-sync-newpo-ai-browser-agent",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "task",
          "startUrl"
        ],
        "properties": {
          "task": {
            "title": "Task",
            "type": "string",
            "description": "What the agent should do, in plain English. Be specific about the answer you want back, e.g. \"Find the price and stock status of 'A Light in the Attic'\" or \"Fill the contact form with name Jane Doe, email jane@example.com, message 'Hi'\". Logins can be written in the task (\"log in with user demo / password demo123\"); for real accounts prefer the encrypted Credentials field."
          },
          "startUrl": {
            "title": "Start URL",
            "type": "string",
            "description": "The page the agent opens first."
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "fast",
              "accurate"
            ],
            "type": "string",
            "description": "Fast (default) suits lookups, searches and forms. Accurate also looks at a screenshot of the page when unsure and can run read-only code to read data: higher success on hard sites, date pickers and long tables (53% vs 48% of tasks on our 78-task real-site benchmark), for an extra $0.01 per step.",
            "default": "fast"
          },
          "maxSteps": {
            "title": "Max steps",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Upper bound on browser actions. You pay only for steps actually taken; this caps the cost of a run. Most tasks need 2–20.",
            "default": 50
          },
          "outputSchema": {
            "title": "Output data schema (optional)",
            "type": "object",
            "description": "Get structured JSON back in the `data` field. Use a JSON Schema, or the shorthand {\"title\": \"string\", \"price\": \"number\", \"tags\": [\"string\"]}. Values are taken only from the pages the agent visited (missing ones are null) and validated against the schema. Leave empty for no structured output (data: null) — or simply describe the JSON you want in the task."
          },
          "credentials": {
            "title": "Credentials (encrypted)",
            "type": "array",
            "description": "Optional logins. Values are never shown to the AI — it only sees the names — and are typed only on the listed origins. kind: username | password | text | totp (base32 seed; the current 6-digit code is typed). Example: [{\"name\":\"github_user\",\"kind\":\"username\",\"value\":\"me\",\"origins\":[\"https://github.com\"]},{\"name\":\"github_pw\",\"kind\":\"password\",\"value\":\"…\",\"origins\":[\"https://github.com\"]}]"
          },
          "files": {
            "title": "Files for upload",
            "type": "array",
            "description": "Optional files the agent may upload into file inputs (e.g. a CV). The agent picks the right one by name and description. Items: {\"url\": \"https://…\", \"name\": \"resume.pdf\", \"description\": \"my CV\"}. Max 5 files, 10 MB each."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. Datacenter proxy is included in the step price; RESIDENTIAL adds a per-step surcharge.",
            "default": {
              "useApifyProxy": false
            }
          },
          "screenshot": {
            "title": "Save final screenshot",
            "type": "boolean",
            "description": "Store a PNG of the last page in the key-value store and link it in the result.",
            "default": true
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}