Skip to main content
POST
/
v1
/
tools
/
fetch-webpage
Get Webpage Content
curl --request POST \
  --url https://api.anchorbrowser.io/v1/tools/fetch-webpage \
  --header 'Content-Type: application/json' \
  --header 'anchor-api-key: <api-key>' \
  --data '{
  "url": "<string>",
  "format": "html",
  "wait": 123,
  "new_page": true,
  "page_index": 123,
  "return_partial_on_timeout": true
}'
"<string>"

Authorizations

anchor-api-key
string
header
required

API key passed in the header

Query Parameters

sessionId
string

An optional browser session identifier to reference an existing running browser session. If provided, the tool will execute within that browser session.

Body

application/json
url
string

The URL of the webpage to fetch content from. When left empty, the current webpage is used.

format
enum<string>

The output format of the content.

Available options:
html,
markdown
wait
integer

The time to wait for dynamic content to load in milliseconds.

new_page
boolean

Whether to create a new page for the content.

page_index
integer

The index of the page to fetch content from. Overides new_page.

return_partial_on_timeout
boolean

Whether to return partial content if the content is not loaded within the 20 seconds.

Response

The fetched webpage content in the specified format.

The rendered content of the webpage.