Skip to main content
POST
/
browser
/
sessions
/
{id}
/
content
Get Content
curl --request POST \
  --url https://api.example.com/browser/sessions/{id}/content \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "<string>",
  "format": "<string>",
  "proxyUrl": "<string>",
  "headers": {}
}
'
{
  "url": "<string>",
  "content": "<string>",
  "format": "<string>"
}

Overview

Returns the content of the session’s active page. If url is supplied, the session navigates there first. The response format can be raw HTML, cleaned Markdown, or plain text.

Path Parameters

id
string
required
Browser session ID (UUID).

Body

url
string
Optional URL to navigate to before capturing content. If omitted, captures whatever is currently loaded in the active tab.
format
string
default:"html"
Output format. One of html, markdown, text.
proxyUrl
string
Optional per-request proxy override.
headers
object
Extra request headers applied when url is set.

Example Request

curl -X POST "https://api.scrapengine.io/api/v1/browser/sessions/baa3f390-fa6e-4a24-b84a-a575a5f3a9c7/content" \
  -H "Authorization: Bearer $SCRAPENGINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "format": "markdown" }'

Response

Success Response (200)

url
string
Effective URL of the captured page (after any redirects).
content
string
Page content in the requested format.
format
string
Echoed format — one of html, markdown, text.
Example Response:
{
  "url": "https://example.com/",
  "content": "# Example Domain\n\nThis domain is for use in illustrative examples...",
  "format": "markdown"
}

Error Responses

StatusDescription
400Invalid body — unknown format or malformed url.
401Unauthorized — invalid or missing API key.
404Session not found or not owned by the caller.
503The browser session is temporarily unreachable.