Skip to content

Commit b78e12b

Browse files
committed
add dynamic content info to all ednpoints
1 parent 883dfb6 commit b78e12b

File tree

8 files changed

+45
-4
lines changed

8 files changed

+45
-4
lines changed

src/content/docs/browser-rendering/rest-api/json-endpoint.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,3 +354,9 @@ In this example, Browser Rendering first calls Anthropic's Claude Sonnet 4 model
354354
file="setting-custom-user-agent"
355355
product="browser-rendering"
356356
/>
357+
358+
<Render
359+
file="single-page-application"
360+
product="browser-rendering"
361+
/>
362+

src/content/docs/browser-rendering/rest-api/links-endpoint.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,3 +233,9 @@ curl -X POST 'https://api.cloudflare.com/client/v4/accounts/<accountId>/browser-
233233
file="setting-custom-user-agent"
234234
product="browser-rendering"
235235
/>
236+
237+
<Render
238+
file="single-page-application"
239+
product="browser-rendering"
240+
/>
241+

src/content/docs/browser-rendering/rest-api/markdown-endpoint.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,9 @@ curl -X 'POST' 'https://api.cloudflare.com/client/v4/accounts/<accountId>/browse
103103
1. **Content extraction:** Convert a blog post or article into Markdown format for storage or further processing.
104104
2. **Static site generation:** Retrieve structured Markdown content for use in static site generators like Jekyll or Hugo.
105105
3. **Automated summarization:** Extract key content from web pages while ignoring CSS, scripts, or unnecessary elements.
106+
107+
<Render
108+
file="single-page-application"
109+
product="browser-rendering"
110+
/>
111+

src/content/docs/browser-rendering/rest-api/pdf-endpoint.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,3 +142,9 @@ curl -X POST https://api.cloudflare.com/client/v4/accounts/<acccountID>/browser-
142142
file="setting-custom-user-agent"
143143
product="browser-rendering"
144144
/>
145+
146+
<Render
147+
file="single-page-application"
148+
product="browser-rendering"
149+
/>
150+

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,9 @@ Many more options exist, like setting HTTP credentials using `authenticate`, set
108108
file="setting-custom-user-agent"
109109
product="browser-rendering"
110110
/>
111+
112+
<Render
113+
file="single-page-application"
114+
product="browser-rendering"
115+
/>
116+

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,3 +164,9 @@ Many more options exist, like setting HTTP credentials using `authenticate`, set
164164
file="setting-custom-user-agent"
165165
product="browser-rendering"
166166
/>
167+
168+
<Render
169+
file="single-page-application"
170+
product="browser-rendering"
171+
/>
172+

src/content/docs/browser-rendering/rest-api/snapshot.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,8 @@ curl -X POST 'https://api.cloudflare.com/client/v4/accounts/<accountId>/browser-
108108
/>
109109

110110
Many more options exist, like setting HTTP credentials using `authenticate`, setting `cookies`, and using `gotoOptions` to control page load behaviour - check the endpoint [reference](/api/resources/browser_rendering/subresources/snapshot/) for all available parameters.
111+
112+
<Render
113+
file="single-page-application"
114+
product="browser-rendering"
115+
/>

src/content/partials/browser-rendering/single-page-application.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
When scraping a Single Page Application (SPA) with dynamic content, you must ensure the page has fully loaded. To do this, you have two main options:
44

55
:::note
6-
1. Use `waitForSelector` to wait for a specific element to appear on the page. This is often the most reliable and efficient method.
7-
2. Use `goToOptions` with "networkidle0" or "networkidle2"
8-
- `"networkidle0"` waits for all network connections to be idle, meaning all resources (including asynchronous JavaScript) have been loaded
9-
- `"networkidle2"` is a more efficient alternative that waits until there are only two or fewer ongoing network connections
6+
Use `waitForSelector` to wait for a specific element to appear on the page. This is often the most reliable and efficient method.
7+
Use `goToOptions` with "networkidle0" or "networkidle2"
8+
- `"networkidle0"` waits for all network connections to be idle, meaning all resources (including asynchronous JavaScript) have been loaded
9+
- `"networkidle2"` is a more efficient alternative that waits until there are only two or fewer ongoing network connections
1010
:::

0 commit comments

Comments
 (0)