{ "openapi": "3.0.3", "info": { "title": "Steel Browser Instance API", "description": "Documentation for controlling a single instance of Steel Browser", "version": "0.0.1" }, "components": { "securitySchemes": {}, "schemas": { "ScrapeRequest": { "title": "ScrapeRequest", "type": "object", "properties": { "url": { "type": "string" }, "format": { "type": "array", "items": { "type": "string", "enum": [ "html", "readability", "cleaned_html", "markdown" ] } }, "screenshot": { "type": "boolean" }, "pdf": { "type": "boolean" }, "proxyUrl": { "type": "string" }, "delay": { "type": "number" }, "logUrl": { "type": "string" } }, "required": [ "url" ], "additionalProperties": false }, "ScrapeResponse": { "title": "ScrapeResponse", "type": "object", "properties": { "content": { "type": "object", "additionalProperties": {} }, "metadata": { "type": "object", "properties": { "title": { "type": "string" }, "ogImage": { "type": "string" }, "ogTitle": { "type": "string" }, "urlSource": { "type": "string" }, "description": { "type": "string" }, "ogDescription": { "type": "string" }, "statusCode": { "type": "integer" }, "language": { "type": "string" }, "timestamp": { "type": "string", "format": "date-time" }, "published_timestamp": { "type": "string", "format": "date-time" } }, "required": [ "statusCode" ], "additionalProperties": false }, "links": { "type": "array", "items": { "type": "object", "properties": { "url": { "type": "string" }, "text": { "type": "string" } }, "required": [ "url", "text" ], "additionalProperties": false } }, "screenshot": { "type": "string" }, "pdf": { "type": "string" } }, "required": [ "content", "metadata", "links" ], "additionalProperties": false }, "ScreenshotRequest": { "title": "ScreenshotRequest", "type": "object", "properties": { "url": { "type": "string" }, "proxyUrl": { "type": "string" }, "delay": { "type": "number" }, "fullPage": { "type": "boolean" }, "logUrl": { "type": "string" } }, "required": [ "url" ], "additionalProperties": false }, "ScreenshotResponse": { "title": "ScreenshotResponse" }, "PDFRequest": { "title": "PDFRequest", "type": "object", "properties": { "url": { "type": "string" }, "proxyUrl": { "type": "string" }, "delay": { "type": "number" }, "logUrl": { "type": "string" } }, "required": [ "url" ], "additionalProperties": false }, "PDFResponse": { "title": "PDFResponse" }, "CreateSession": { "title": "CreateSession", "type": "object", "properties": { "sessionId": { "type": "string", "format": "uuid", "description": "Unique identifier for the session" }, "proxyUrl": { "type": "string", "description": "Proxy URL to use for the session" }, "userAgent": { "type": "string", "description": "User agent string to use for the session" }, "sessionContext": { "type": "object", "additionalProperties": {}, "description": "Session context to use for the session" }, "isSelenium": { "type": "boolean", "description": "Indicates if Selenium is used in the session" }, "logSinkUrl": { "type": "string", "description": "Log sink URL to use for the session" }, "extensions": { "type": "array", "items": { "type": "string" }, "description": "Extensions to use for the session" }, "timezone": { "type": "string", "description": "Timezone to use for the session" }, "dimensions": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" } }, "required": [ "width", "height" ], "additionalProperties": false, "description": "Dimensions to use for the session" } }, "required": [ "sessionId" ], "additionalProperties": false }, "SessionDetails": { "title": "SessionDetails", "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "description": "Unique identifier for the session" }, "createdAt": { "type": "string", "format": "date-time", "description": "Timestamp when the session started" }, "status": { "type": "string", "enum": [ "live", "released", "failed" ], "description": "Status of the session" }, "duration": { "type": "integer", "description": "Duration of the session in milliseconds" }, "eventCount": { "type": "integer", "description": "Number of events processed in the session" }, "timeout": { "type": "integer", "description": "Session timeout duration in milliseconds" }, "creditsUsed": { "type": "integer", "description": "Amount of credits consumed by the session" }, "websocketUrl": { "type": "string", "description": "URL for the session's WebSocket connection" }, "debugUrl": { "type": "string", "description": "URL for debugging the session" }, "sessionViewerUrl": { "type": "string", "description": "URL to view session details" }, "userAgent": { "type": "string", "description": "User agent string used in the session" }, "proxy": { "type": "string", "description": "Proxy server used for the session" }, "solveCaptcha": { "type": "boolean", "description": "Indicates if captcha solving is enabled" }, "isSelenium": { "type": "boolean", "description": "Indicates if Selenium is used in the session" } }, "required": [ "id", "createdAt", "status", "duration", "eventCount", "timeout", "creditsUsed", "websocketUrl", "debugUrl", "sessionViewerUrl" ], "additionalProperties": false }, "LaunchRequest": { "title": "LaunchRequest", "type": "object", "properties": { "options": { "type": "object", "properties": { "args": { "type": "array", "items": { "type": "string" } }, "chromiumSandbox": { "type": "boolean" }, "devtools": { "type": "boolean" }, "downloadsPath": { "type": "string" }, "headless": { "type": "boolean" }, "ignoreDefaultArgs": { "anyOf": [ { "type": "boolean" }, { "type": "array", "items": { "type": "string" } } ] }, "proxyUrl": { "type": "string" }, "timeout": { "type": "number" }, "tracesDir": { "type": "string" } }, "additionalProperties": false }, "req": {}, "stealth": { "type": "boolean" }, "cookies": { "type": "array" }, "userAgent": { "type": "string" }, "extensions": { "type": "array", "items": { "type": "string" } }, "logSinkUrl": { "type": "string" }, "customHeaders": { "type": "object", "additionalProperties": { "type": "string" } }, "timezone": { "type": "string" }, "dimensions": { "type": "object", "properties": { "width": { "type": "number" }, "height": { "type": "number" } }, "required": [ "width", "height" ], "additionalProperties": false, "nullable": true } }, "required": [ "options" ], "additionalProperties": false }, "LaunchResponse": { "title": "LaunchResponse", "type": "object", "properties": { "success": { "type": "boolean" } }, "required": [ "success" ], "additionalProperties": false } } }, "paths": { "/v1/scrape": { "post": { "operationId": "scrape", "summary": "Scrape a URL", "tags": [ "Browser Actions" ], "description": "Scrape a URL", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScrapeRequest" } } } }, "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScrapeResponse" } } } } } } }, "/v1/screenshot": { "post": { "operationId": "screenshot", "summary": "Take a screenshot", "tags": [ "Browser Actions" ], "description": "Take a screenshot", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScreenshotRequest" } } } }, "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScreenshotResponse" } } } } } } }, "/v1/pdf": { "post": { "operationId": "pdf", "summary": "Get the PDF content of a page", "tags": [ "Browser Actions" ], "description": "Get the PDF content of a page", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PDFRequest" } } } }, "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PDFResponse" } } } } } } }, "/v1/health": { "get": { "operationId": "health", "summary": "Check if the server and browser are running", "tags": [ "Health" ], "description": "Check if the server and browser are running", "responses": { "200": { "description": "Default Response" } } } }, "/v1/sessions": { "post": { "operationId": "launch_browser_session", "summary": "Launch a browser session", "tags": [ "Sessions" ], "description": "Launch a browser session", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateSession" } } } }, "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionDetails" } } } } } }, "get": { "operationId": "get_sessions", "summary": "Get all sessions (only returns current session)", "tags": [ "Sessions" ], "description": "Get all sessions (only returns current session)", "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionDetails" } } } } } } }, "/v1/sessions/{sessionId}": { "get": { "operationId": "get_session_details", "summary": "Get session details", "tags": [ "Sessions" ], "description": "Get session details", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "sessionId", "required": true } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionDetails" } } } } } } }, "/v1/sessions/{sessionId}/context": { "get": { "operationId": "get_browser_context", "summary": "Get a browser context", "tags": [ "Sessions" ], "description": "Get a browser context", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "sessionId", "required": true } ], "responses": { "200": { "description": "Default Response" } } } }, "/v1/sessions/{sessionId}/release": { "post": { "operationId": "release_browser_session", "summary": "Release a browser session", "tags": [ "Sessions" ], "description": "Release a browser session", "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "sessionId", "required": true } ], "responses": { "200": { "description": "Default Response" } } } }, "/v1/sessions/release": { "post": { "operationId": "release_browser_sessions", "summary": "Release browser sessions", "tags": [ "Sessions" ], "description": "Release browser sessions", "responses": { "200": { "description": "Default Response" } } } }, "/v1/devtools/inspector.html": { "get": { "operationId": "getDevtoolsUrl", "summary": "Get the URL for the DevTools inspector", "tags": [ "CDP" ], "description": "Get the URL for the DevTools inspector", "responses": { "200": { "description": "Default Response" } } } } }, "servers": [] }