Skip to main content
Cloudflare Browser Rendering REST API for crawling websites, extracting content as markdown, taking screenshots, generating PDFs, and scraping structured data. Best for workflows needing web content extraction — converting web pages to markdown, capturing visual snapshots, or extracting structured data from rendered pages. Unlike search APIs (Brave, Exa), Cloudflare renders and extracts from specific URLs rather than searching across the web. 10 endpoints available through Lava’s AI Gateway. See the Cloudflare API docs for full documentation.
Supports both managed (Lava’s API keys) and unmanaged (bring your own credentials) mode.

Endpoints

Extract rendered HTML content from a URL

POST https://api.cloudflare.com/client/v4/accounts/ACCOUNT_ID/browser-rendering/content — $0.00015 / request
const data = await lava.gateway('https://api.cloudflare.com/client/v4/accounts/ACCOUNT_ID/browser-rendering/content', { body: {"url":"https://example.com"} });

Extract page as markdown

POST https://api.cloudflare.com/client/v4/accounts/ACCOUNT_ID/browser-rendering/markdown — $0.00015 / request
const data = await lava.gateway('https://api.cloudflare.com/client/v4/accounts/ACCOUNT_ID/browser-rendering/markdown', { body: {"url":"https://example.com"} });

Extract structured JSON from a page using a prompt

POST https://api.cloudflare.com/client/v4/accounts/ACCOUNT_ID/browser-rendering/json — $0.00015 / request
const data = await lava.gateway('https://api.cloudflare.com/client/v4/accounts/ACCOUNT_ID/browser-rendering/json', {
  body: {
"url": "https://example.com",
"prompt": "Extract the main heading and first paragraph"
},
});

Scrape specific elements from a page

POST https://api.cloudflare.com/client/v4/accounts/ACCOUNT_ID/browser-rendering/scrape — $0.00015 / request
const data = await lava.gateway('https://api.cloudflare.com/client/v4/accounts/ACCOUNT_ID/browser-rendering/scrape', { body: {"url":"https://example.com","elements":[{"selector":"h1"}]} });
POST https://api.cloudflare.com/client/v4/accounts/ACCOUNT_ID/browser-rendering/links — $0.00015 / request
const data = await lava.gateway('https://api.cloudflare.com/client/v4/accounts/ACCOUNT_ID/browser-rendering/links', { body: {"url":"https://example.com"} });

Take a DOM snapshot of a page

POST https://api.cloudflare.com/client/v4/accounts/ACCOUNT_ID/browser-rendering/snapshot — $0.00025 / request
const data = await lava.gateway('https://api.cloudflare.com/client/v4/accounts/ACCOUNT_ID/browser-rendering/snapshot', { body: {"url":"https://example.com"} });

Take screenshot of a page

POST https://api.cloudflare.com/client/v4/accounts/ACCOUNT_ID/browser-rendering/screenshot — $0.00025 / request
const data = await lava.gateway('https://api.cloudflare.com/client/v4/accounts/ACCOUNT_ID/browser-rendering/screenshot', { body: {"url":"https://example.com"} });

Generate PDF of a page

POST https://api.cloudflare.com/client/v4/accounts/ACCOUNT_ID/browser-rendering/pdf — $0.00025 / request
const data = await lava.gateway('https://api.cloudflare.com/client/v4/accounts/ACCOUNT_ID/browser-rendering/pdf', { body: {"url":"https://example.com"} });

Multi-page crawl with markdown/text extraction

POST https://api.cloudflare.com/client/v4/accounts/ACCOUNT_ID/browser-rendering/crawl — $0.001 / request
const data = await lava.gateway('https://api.cloudflare.com/client/v4/accounts/ACCOUNT_ID/browser-rendering/crawl', {
  body: {
"url": "https://example.com",
"limit": 3,
"formats": [
  "markdown"
]
},
});

Check crawl job status

GET https://api.cloudflare.com/client/v4/accounts/{id}/browser-rendering/crawl/{id} — $0.00015 / request

Next Steps

All Providers

Browse all supported AI providers

Forward Proxy

Learn how to construct proxy URLs and authenticate requests