For AI agents: a documentation index is available at /llms.txt
Skip to main content

Extract Content from a URL

Fetch the fully rendered HTML of any page, including content generated by JavaScript, using the Browserless /content endpoint.

Prerequisites

Steps

Use the /content REST endpoint to retrieve fully rendered HTML. No WebSocket connection needed.

View Full Code on GitHub

1. Build the request

The /content endpoint returns the full rendered HTML of a page after JavaScript execution:

https://production-sfo.browserless.io/content?token=YOUR_API_TOKEN_HERE

2. Send the request

curl -X POST \
"https://production-sfo.browserless.io/content?token=YOUR_API_TOKEN_HERE" \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{ "url": "https://example.com" }'

3. Check the output

The response body is raw HTML: the full DOM as it exists after JavaScript has run, not just the original server response.

Next steps