well, I would have to check that better, but nevertheless as I was saying , and because playwright-mcp basically has its toolset locally, there's no need to perform external calls. I did a small experiment of exposing a toolsetProvider, you can take a look at https://github.com/cloudflare/playwright-mcp/pull/20, check the example for usage (this depends on our merge of playwright-mcp 0.0.30 which was not released yet, we only released a new release of playwright today)
btw do you ever see cloudflare/playwright not force me to use the browser rendering api? i'd love to be able to use playwright-core inside workers to communicate with either my own CDP endpoint over ws or providers like browser base.
i noticed (at least the currently published 0.10 release) is doing a few things like overriding the host (setting a fake host), expecting session id query parameters to decide when to use connect (easy to bypass), checking for binding in the query param (easy to bypass) but also chunking the ws messages presumably due to limitation in the browser render api.
for the time being it's not possible. We could in theory allow both scenarios, but from my experience, if the browser is not in the same network, we get lots of latency. For instance, a simple
newPage
newPage
call triggers 50 CDP calls, and if each takes 50ms, it's a full second just to open a new page
true, but also depends on the customer use case whether 1s is acceptable or not. ie if it's an async job running in the background, then 1s doesn't really matter
This adds support for using any ws CDP based server to connect to, without breaking existing usage of the browser rendering api. Example usage with Browserbase: import { Browserbase } from &#39...
@Kathy curious if ya'll would be interested to make the @Cloudflare/playwright package work also for customers not using the browser rendering API (yet). by supporting this, you'll help me keep an easy migration path (back) to cloudflare
Hi, I found that using the /content endpoint we can not set the returned HTML type. Others like Crawl4ai allow us to set raw, cleaned HTML and markdown. I think CF should implement it.
The /markdown endpoint retrieves a webpage's content and converts it into Markdown format. You can specify a URL and optional parameters to refine the extraction process.
Thank you, but I need the other 2 ones: raw HTML for getting invisible metadata and cleaned HTML for visible content. i think both Firecrawl and Crawl4ai features would inspire Browser Rendering PMs and devs a lot.
Is it possible to make the /markdown api return both the original html and the extracted markdown? I'm building something that requires verifying results afterwards, which need a "snapshot" of original html dom (like wayback machine).
Rate limits are enforced with a fixed per second fill rate. For example, the workers paid limit of 60 requests per minute translates to 1 request per second. This means you cannot send all 60 requests at once; the API expects them to be spread evenly over the minute.
The /content endpoint instructs the browser to navigate to a website and capture the fully rendered HTML of a page, including the head section, after JavaScript execution. This is ideal for capturing content from JavaScript-heavy or interactive websites.
I don’t want to make 2 request for a single scrape. I’m thinking that for /json or /markdown endpoint, the original content is already available, could have an option to just return both json/markdown and original content.
I just saw "Currently, the Cloudflare dashboard displays usage metrics exclusively for the Workers Bindings method. Usage data for the REST API is not yet available in the dashboard. We are actively working on adding REST API usage metrics to the dashboard.". How do I monitor my usage somewhere else?
Does anyone use this api for retrieving the opengraph meta data of a website? Are there any configurations which I have to consider for best practice? Appreciate any help
Browser Rendering uses a managed Chromium environment that includes a standard set of fonts. When you generate a screenshot or PDF, text is rendered using the fonts available in this environment.
Hey i was trying to use the Rest API enpoint /content to get client side rendered content from Algolias instantsearch. I tried everything but i didn't get any items.