Skip to content

Commit 723bcf0

Browse files
kathaylToriLindsay
andauthored
Create faq.mdx (#25806)
* Create faq.mdx * Update faq.mdx make header * Update content-endpoint.mdx * Update json-endpoint.mdx * Update links-endpoint.mdx * Update markdown-endpoint.mdx * Update pdf-endpoint.mdx * Update scrape-endpoint.mdx * Update screenshot-endpoint.mdx * Update snapshot.mdx * Update content-endpoint.mdx * Update json-endpoint.mdx * Update links-endpoint.mdx * Update markdown-endpoint.mdx * Update scrape-endpoint.mdx * Update screenshot-endpoint.mdx * Update snapshot.mdx * Update src/content/docs/browser-rendering/rest-api/markdown-endpoint.mdx Co-authored-by: ToriLindsay <[email protected]> * Update src/content/docs/browser-rendering/rest-api/markdown-endpoint.mdx Co-authored-by: ToriLindsay <[email protected]> * Update src/content/docs/browser-rendering/rest-api/markdown-endpoint.mdx Co-authored-by: ToriLindsay <[email protected]> --------- Co-authored-by: ToriLindsay <[email protected]>
1 parent c2a84c9 commit 723bcf0

File tree

9 files changed

+75
-9
lines changed

9 files changed

+75
-9
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ console.log(content);
4343

4444
## Advanced usage
4545

46+
:::note[Looking for more parameters?]
47+
Visit the [Browser Rendering PDF API reference](/api/resources/browser_rendering/subresources/content/methods/create/) for all available parameters, such as setting HTTP credentials using `authenticate`, setting `cookies`, and customizing load behavior using `gotoOptions`.
48+
:::
49+
4650
Navigate to `https://cloudflare.com/` but block images and stylesheets from loading. Undesired requests can be blocked by resource type (`rejectResourceTypes`) or by using a regex pattern (`rejectRequestPattern`). The opposite can also be done, only allow requests that match `allowRequestPattern` or `allowResourceTypes`.
4751

4852
```bash
@@ -63,3 +67,8 @@ Many more options exist, like setting HTTP headers using `setExtraHTTPHeaders`,
6367
file="setting-custom-user-agent"
6468
product="browser-rendering"
6569
/>
70+
71+
<Render
72+
file="faq"
73+
product="browser-rendering"
74+
/>

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,10 @@ console.log(json);
274274

275275
## Advanced Usage
276276

277+
:::note[Looking for more parameters?]
278+
Visit the [Browser Rendering PDF API reference](/api/resources/browser_rendering/subresources/json/methods/create/) for all available parameters, such as setting HTTP credentials using `authenticate`, setting `cookies`, and customizing load behavior using `gotoOptions`.
279+
:::
280+
277281
### Using a custom model (BYO API Key)
278282

279283
Browser Rendering can use a custom model for which you supply credentials. List the model(s) in the `custom_ai` array:
@@ -354,3 +358,8 @@ In this example, Browser Rendering first calls Anthropic's Claude Sonnet 4 model
354358
file="setting-custom-user-agent"
355359
product="browser-rendering"
356360
/>
361+
362+
<Render
363+
file="faq"
364+
product="browser-rendering"
365+
/>

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ console.log(links);
123123
</TabItem> </Tabs>
124124
## Advanced usage
125125

126+
:::note[Looking for more parameters?]
127+
Visit the [Browser Rendering PDF API reference](/api/resources/browser_rendering/subresources/links/methods/create/) for all available parameters, such as setting HTTP credentials using `authenticate`, setting `cookies`, and customizing load behavior using `gotoOptions`.
128+
:::
129+
126130
### Retrieve only visible links
127131

128132
Set the `visibleLinksOnly` parameter to `true` to only return links that are visible on the page. By default, this is set to `false`.
@@ -233,3 +237,8 @@ curl -X POST 'https://api.cloudflare.com/client/v4/accounts/<accountId>/browser-
233237
file="setting-custom-user-agent"
234238
product="browser-rendering"
235239
/>
240+
241+
<Render
242+
file="faq"
243+
product="browser-rendering"
244+
/>

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

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ import { Tabs, TabItem, Render } from "~/components";
99

1010
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.
1111

12+
## Common use cases
13+
14+
- **Content extraction:** Convert a blog post or article into Markdown format for storage or further processing.
15+
- **Static site generation:** Retrieve structured Markdown content for use in static site generators like Jekyll or Hugo.
16+
- **Automated summarization:** Extract key content from web pages while ignoring CSS, scripts, or unnecessary elements.
17+
1218
## Basic usage
1319

1420
### Using a URL
@@ -74,6 +80,10 @@ curl -X 'POST' 'https://api.cloudflare.com/client/v4/accounts/<accountId>/browse
7480

7581
## Advanced usage
7682

83+
:::note[Looking for more parameters?]
84+
Visit the [Browser Rendering PDF API reference](/api/resources/browser_rendering/subresources/markdown/methods/create/) for all available parameters, such as setting HTTP credentials using `authenticate`, setting `cookies`, and customizing load behavior using `gotoOptions`.
85+
:::
86+
7787
You can refine the Markdown extraction by using the `rejectRequestPattern` parameter. In this example, requests matching the given regex pattern (such as CSS files) are excluded.
7888

7989
```bash
@@ -98,8 +108,7 @@ curl -X 'POST' 'https://api.cloudflare.com/client/v4/accounts/<accountId>/browse
98108
product="browser-rendering"
99109
/>
100110

101-
## Potential use-cases
102-
103-
1. **Content extraction:** Convert a blog post or article into Markdown format for storage or further processing.
104-
2. **Static site generation:** Retrieve structured Markdown content for use in static site generators like Jekyll or Hugo.
105-
3. **Automated summarization:** Extract key content from web pages while ignoring CSS, scripts, or unnecessary elements.
111+
<Render
112+
file="faq"
113+
product="browser-rendering"
114+
/>

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,8 @@ curl -X POST 'https://api.cloudflare.com/client/v4/accounts/<accountId>/browser-
198198
file="setting-custom-user-agent"
199199
product="browser-rendering"
200200
/>
201-
}' \
202-
--output "paginated.pdf"
203-
```
201+
202+
<Render
203+
file="faq"
204+
product="browser-rendering"
205+
/>

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,16 @@ Many more options exist, like setting HTTP credentials using `authenticate`, set
104104

105105
## Advanced Usage
106106

107+
:::note[Looking for more parameters?]
108+
Visit the [Browser Rendering PDF API reference](/api/resources/browser_rendering/subresources/scrape/methods/create/) for all available parameters, such as setting HTTP credentials using `authenticate`, setting `cookies`, and customizing load behavior using `gotoOptions`.
109+
:::
110+
107111
<Render
108112
file="setting-custom-user-agent"
109113
product="browser-rendering"
110114
/>
115+
116+
<Render
117+
file="faq"
118+
product="browser-rendering"
119+
/>

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ For more options to control the final screenshot, like `clip`, `captureBeyondVie
6868

6969
## Advanced usage
7070

71+
:::note[Looking for more parameters?]
72+
Visit the [Browser Rendering PDF API reference](/api/resources/browser_rendering/subresources/screenshot/methods/create/) for all available parameters, such as setting HTTP credentials using `authenticate`, setting `cookies`, and customizing load behavior using `gotoOptions`.
73+
:::
74+
7175
### Capture a screenshot of an authenticated page
7276

7377
Some webpages require authentication before you can view their content. To capture a screenshot of these pages, you must provide valid session cookies. The following example navigates to a page that requires login. By providing a valid cookie in the `cookies` array, Browser Rendering will be able to access the secure content in order to capture the screenshot.
@@ -164,3 +168,8 @@ Many more options exist, like setting HTTP credentials using `authenticate`, set
164168
file="setting-custom-user-agent"
165169
product="browser-rendering"
166170
/>
171+
172+
<Render
173+
file="faq"
174+
product="browser-rendering"
175+
/>

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ console.log(snapshot.content);
6464

6565
## Advanced usage
6666

67+
:::note[Looking for more parameters?]
68+
Visit the [Browser Rendering PDF API reference](/api/resources/browser_rendering/subresources/snapshot/methods/create/) for all available parameters, such as setting HTTP credentials using `authenticate`, setting `cookies`, and customizing load behavior using `gotoOptions`.
69+
:::
70+
6771
The `html` property in the JSON payload, it sets the html to `<html><body>Advanced Snapshot</body></html>` then does the following steps:
6872

6973
1. Disable JavaScript.
@@ -107,4 +111,7 @@ curl -X POST 'https://api.cloudflare.com/client/v4/accounts/<accountId>/browser-
107111
product="browser-rendering"
108112
/>
109113

110-
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.
114+
<Render
115+
file="faq"
116+
product="browser-rendering"
117+
/>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## Troubleshooting
2+
3+
If you have questions or encounter an error, see the [Browser Rendering FAQ and troubleshooting guide](/browser-rendering/faq/).

0 commit comments

Comments
 (0)