| [ Web Proxy ] |
| Viewing: https://developers.cloudflare.com/api/resources/browser_rendering/subresources/json/methods/create | [Back] [Original] |
Gets json from a webpage from a provided URL or HTML. Pass prompt or schema in the body. Control page loading with gotoOptions and waitFor* options.
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYYThe previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
X-Auth-Email: user@example.comThe previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194Browser Rendering WriteThe maximum duration allowed for the browser action to complete after the page has loaded (such as taking screenshots, extracting content, or generating PDFs). If this time limit is exceeded, the action stops and returns a timeout error.
Adds a <script> tag into the page with the desired URL or content.
Adds a <link rel="stylesheet"> tag into the page with the desired URL or a <style type="text/css"> tag with the content.
Only allow requests that match the provided regex patterns, eg. /^.*.(css). Reject rules are applied first.
Only allow requests that match the provided resource types, eg. image or script. Reject rules are applied first.
Check options.
Optional list of custom AI models to use for the request. The models will be tried in the order provided, and in case a model returns an error, the next one will be used as fallback.
Check options.
Set the content of the page, eg: <h1>Hello World!!</h1>. Either html or url must be set.
Block undesired requests that match the provided regex patterns, eg. /^.*.(css).
Block undesired requests that match the provided resource types, eg. image or script.
Schema for the response format. More information here: https://developers.cloudflare.com/workers-ai/json-mode/
Wait for the selector to appear in page. Check options.
Origin response headers, lowercased. Repeated headers are joined with a newline. Credential and transport-only headers that do not survive rendering are omitted.
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/browser-rendering/json \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
-d '{
"html": "<h1>Hello World!</h1>",
"url": "https://www.example.com/"
}'{
"meta": {
"finalUrl": "finalUrl",
"headers": {
"foo": "string"
},
"redirectChain": [
{
"headers": {
"foo": "string"
},
"status": 0,
"url": "url"
}
],
"status": 0,
"title": "title"
},
"result": {
"foo": {}
},
"success": true,
"errors": [
{
"code": 0,
"message": "message"
}
]
}{
"errors": [
{
"code": 2001,
"message": "Rate limit exceeded"
}
],
"success": false
}{
"meta": {
"finalUrl": "finalUrl",
"headers": {
"foo": "string"
},
"redirectChain": [
{
"headers": {
"foo": "string"
},
"status": 0,
"url": "url"
}
],
"status": 0,
"title": "title"
},
"result": {
"foo": {}
},
"success": true,
"errors": [
{
"code": 0,
"message": "message"
}
]
}{
"errors": [
{
"code": 2001,
"message": "Rate limit exceeded"
}
],
"success": false
}| Web Proxy Viewer | New URL | Original Page |