Skip to content

Commit 5335a26

Browse files
minor fixes
1 parent 161492d commit 5335a26

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

src/content/docs/browser-rendering/quick-actions-rest-api/scrape-endpoint.mdx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,14 @@ curl -X POST 'https://api.cloudflare.com/client/v4/accounts/<accountId>/browser-
1414
-H 'Authorization: Bearer <apiToken>' \
1515
-H 'Content-Type: application/json' \
1616
-d '{
17-
"url": "https://example.com/",
18-
"elements": {
19-
"selectors": ["h1", ".article"]
20-
}
21-
}'
17+
"url": "https://example.com/",
18+
"elements": [{
19+
"selector": "h1"
20+
},
21+
{
22+
"selector": "a"
23+
}]
24+
}
2225
```
2326
2427
### JSON response

src/content/docs/browser-rendering/quick-actions-rest-api/screenshot-endpoint.mdx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ curl -X POST 'https://api.cloudflare.com/client/v4/accounts/<accountId>/browser-
3232
-d '{
3333
"url": "https://cloudflare.com/",
3434
"screenshotOptions": {
35-
"type": "webp",
3635
"omitBackground": true,
37-
"quality": 80
3836
},
3937
"viewport": {
4038
"width": 1280,
@@ -77,9 +75,7 @@ curl -X POST 'https://api.cloudflare.com/client/v4/accounts/<accountId>/browser-
7775
- `url` _(string)_ - The webpage URL to take a screenshot of.
7876
- `html` _(string)_ - Instead of a URL, allows rendering custom HTML for the screenshot.
7977
- `screenshotOptions` _(object)_ - Configures the screenshot format and quality.
80-
- `type` _(string)_ - Defines the image format (`jpeg`, `png`, `webp`).
8178
- `omitBackground` _(boolean)_ - Removes the default white background when taking a screenshot.
82-
- `quality` _(number)_ - (For JPEG/WebP) Compression quality from 0 to 100\.
8379
- `viewport` _(object)_ - Sets the browser viewport dimensions for rendering.
8480
- `width` _(number)_ - Viewport width in pixels.
8581
- `height` _(number)_ - Viewport height in pixels.

0 commit comments

Comments
 (0)