{
  "openapi": "3.0.1",
  "info": {
    "title": "Playwright MCP Server — Browser Automation via MCP Protocol",
    "description": "Model Context Protocol (MCP) server providing Playwright browser automation tools. Navigate, click, fill forms, take screenshots, evaluate JS — all via WebSocket MCP transport for AI agents.",
    "version": "1.0",
    "x-build-id": "ywPsCRuG6pHYlKO6a"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/junipr~playwright-mcp-server/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-junipr-playwright-mcp-server",
        "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/junipr~playwright-mcp-server/runs": {
      "post": {
        "operationId": "runs-sync-junipr-playwright-mcp-server",
        "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/junipr~playwright-mcp-server/run-sync": {
      "post": {
        "operationId": "run-sync-junipr-playwright-mcp-server",
        "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",
        "properties": {
          "transport": {
            "title": "MCP Transport",
            "enum": [
              "websocket",
              "sse"
            ],
            "type": "string",
            "description": "MCP transport type. WebSocket is recommended for bidirectional communication.",
            "default": "websocket"
          },
          "maxSessionDurationSecs": {
            "title": "Max Session Duration (seconds)",
            "minimum": 60,
            "maximum": 7200,
            "type": "integer",
            "description": "Maximum session duration in seconds before auto-shutdown.",
            "default": 1800
          },
          "idleTimeoutSecs": {
            "title": "Idle Timeout (seconds)",
            "minimum": 30,
            "maximum": 1800,
            "type": "integer",
            "description": "Seconds of inactivity before auto-shutdown.",
            "default": 300
          },
          "maxConcurrentSessions": {
            "title": "Max Concurrent Sessions",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum simultaneous browser contexts. Each session is fully isolated.",
            "default": 1
          },
          "headless": {
            "title": "Headless Mode",
            "type": "boolean",
            "description": "Run browser in headless mode. Always true on Apify infrastructure.",
            "default": true
          },
          "viewport": {
            "title": "Default Viewport",
            "type": "object",
            "description": "Default viewport size for new browser sessions. Example: { \"width\": 1280, \"height\": 720 }",
            "default": {
              "width": 1280,
              "height": 720
            }
          },
          "userAgent": {
            "title": "User Agent",
            "type": "string",
            "description": "Custom user agent string. Leave empty for a realistic auto-generated user agent.",
            "default": ""
          },
          "locale": {
            "title": "Browser Locale",
            "type": "string",
            "description": "Browser locale for new sessions (e.g. en-US, de-DE, ja-JP).",
            "default": "en-US"
          },
          "timezone": {
            "title": "Browser Timezone",
            "type": "string",
            "description": "Browser timezone ID (e.g. America/New_York, Europe/London).",
            "default": "America/New_York"
          },
          "geolocation": {
            "title": "Geolocation Override",
            "type": "object",
            "description": "Override browser geolocation. Example: { \"latitude\": 40.7128, \"longitude\": -74.0060 }",
            "default": {}
          },
          "blockResources": {
            "title": "Block Resource Types",
            "type": "array",
            "description": "Resource types to block for faster page loads. Options: image, stylesheet, font, media, script.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "extraHTTPHeaders": {
            "title": "Extra HTTP Headers",
            "type": "object",
            "description": "Additional HTTP headers sent with every browser request. Example: { \"Authorization\": \"Bearer token\" }",
            "default": {}
          },
          "authToken": {
            "title": "Auth Token",
            "type": "string",
            "description": "Bearer token required for MCP connection. Leave empty to use Apify's built-in authentication."
          },
          "allowedOrigins": {
            "title": "Allowed CORS Origins",
            "type": "array",
            "description": "CORS allowed origins for WebSocket connections. Use [\"*\"] to allow all.",
            "items": {
              "type": "string"
            },
            "default": [
              "*"
            ]
          },
          "allowedDomains": {
            "title": "Allowed Domains",
            "type": "array",
            "description": "If set, browser can only navigate to these domains. Empty = all domains allowed.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "blockDomains": {
            "title": "Blocked Domains",
            "type": "array",
            "description": "Domains the browser cannot navigate to.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy settings. Defaults to Apify datacenter proxies.",
            "default": {
              "useApifyProxy": true
            }
          },
          "enabledTools": {
            "title": "Enabled MCP Tools",
            "type": "array",
            "description": "MCP tools to enable. Use [\"*\"] to enable all tools. Options: navigate, click, fill, screenshot, evaluate, select, hover, scroll, waitFor, getContent, getCookies, setCookies, keyboard, pdf.",
            "items": {
              "type": "string"
            },
            "default": [
              "*"
            ]
          },
          "screenshotFormat": {
            "title": "Default Screenshot Format",
            "enum": [
              "png",
              "jpeg",
              "webp"
            ],
            "type": "string",
            "description": "Default format for screenshots.",
            "default": "png"
          },
          "screenshotQuality": {
            "title": "Screenshot Quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "JPEG/WebP quality (1-100). Ignored for PNG.",
            "default": 80
          },
          "maxScreenshotWidth": {
            "title": "Max Screenshot Width (px)",
            "minimum": 100,
            "maximum": 7680,
            "type": "integer",
            "description": "Maximum screenshot width in pixels.",
            "default": 1920
          },
          "maxScreenshotHeight": {
            "title": "Max Screenshot Height (px)",
            "minimum": 100,
            "maximum": 16384,
            "type": "integer",
            "description": "Maximum screenshot height in pixels. Full-page screenshots exceeding this are truncated.",
            "default": 1080
          },
          "maxEvaluateTimeoutMs": {
            "title": "Max Evaluate Timeout (ms)",
            "minimum": 1000,
            "maximum": 120000,
            "type": "integer",
            "description": "Maximum execution time for JavaScript evaluate calls.",
            "default": 30000
          },
          "saveScreenshotsToKV": {
            "title": "Save Screenshots to KV Store",
            "type": "boolean",
            "description": "Save screenshots to Apify Key-Value Store for later retrieval.",
            "default": true
          },
          "saveSessionLogs": {
            "title": "Save Session Logs",
            "type": "boolean",
            "description": "Log all MCP tool calls and results to the dataset.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}