-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Create rest-api-beta #20343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Create rest-api-beta #20343
Changes from 6 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
4958eeb
Create rest-api-beta
kathayl ea37c08
Update rest-api-beta
kathayl f6262f9
Update src/content/changelog/browser-rendering/rest-api-beta
kathayl 3991778
Update and rename rest-api-beta to 2025-02-27-br-rest-api-beta.mdx
kathayl 1739e14
Merge branch 'production' into kathayl-patch-9
kodster28 a5bb244
Update 2025-02-27-br-rest-api-beta.mdx
kathayl 82611bb
Merge branch 'production' into kathayl-patch-9
kodster28 ffc9d16
Update 2025-02-27-br-rest-api-beta.mdx
kathayl 7056db6
Updated url and name
kodster28 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
src/content/changelog/browser-rendering/2025-02-27-br-rest-api-beta.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| --- | ||
| title: New Quick Actions REST API is in open beta! | ||
| description: We've released a new Quick Actions REST API in open beta. | ||
| products: | ||
| - browser-rendering | ||
| date: 2025-02-27T12:00:00Z | ||
| --- | ||
|
|
||
| We've released a new Quick Actions REST API for [Browser Rendering](/browser-rendering/) in open beta, making interacting with browsers easier than ever. This new API provides endpoints for common browser actions, with more to be added in the future. | ||
|
|
||
| With the **Quick Actions REST API** you can: | ||
| - **Capture screenshots** – Use `/screenshot` to take a screenshot of a webpage from provided URL or HTML. | ||
| - **Generate PDFs** – Use `/pdf` to convert web pages into PDFs. | ||
| - **Extract HTML content** – Use `/content` to retrieve the full HTML from a page. | ||
| **Snapshot (HTML + Screenshot)** – Use `/snapshot` to capture both the page's HTML and a screenshot in one request | ||
| - **Scrape Web Elements** – Use `/scrape` to extract specific elements from a page. | ||
|
|
||
| For example, to capture a screenshot: | ||
|
|
||
| ```bash title="Screenshot example" | ||
| curl -X POST 'https://api.cloudflare.com/client/v4/accounts/<accountId>/browser-rendering/screenshot' \ | ||
| -H 'Authorization: Bearer <apiToken>' \ | ||
| -H 'Content-Type: application/json' \ | ||
| -d '{ | ||
| "html": "Hello World!", | ||
| "screenshotOptions": { | ||
| "type": "webp", | ||
| "omitBackground": true | ||
| } | ||
| }' \ | ||
| --output "screenshot.webp" | ||
| ``` | ||
|
|
||
| Learn more in our [documentation](/browser-rendering/quick-actions-rest-api/). | ||
kathayl marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.