Skip to content

Commit c8ad009

Browse files
committed
Removed the // comments from code block
1 parent f610363 commit c8ad009

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

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

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,26 +38,29 @@ If you are on a Workers Free plan, your crawl may fail if it hits the [limit of
3838

3939
### Initiate the crawl job
4040

41-
Here is an example of how to initiate a crawl job with `url`, `limit`, `depth`, and `formats` parameters. The API will respond immediately with a job `id` you will use to retrieve the status and results of the crawl job.
41+
Here are the basic parameters you can use to initiate your crawl job:
42+
- `url` — (Required) Starts crawling from this URL
43+
- `limit` — (Optional) Maximum number of pages to crawl (default is 10, maximum is 100,000)
44+
- `depth` — (Optional) Maximum link depth to crawl from the starting URL
45+
- `formats` — (Optional) Response format (default is HTML, other options are Markdown and JSON)
4246

43-
See the [advanced usage section below](/browser-rendering/rest-api/crawl-endpoint/#initiate-the-crawl-job) for additional parameters:
47+
The API will respond immediately with a job `id` you will use to retrieve the status and results of the crawl job.
4448

49+
See the [advanced usage section below](/browser-rendering/rest-api/crawl-endpoint/#initiate-the-crawl-job) for additional parameters.
50+
51+
Here is an example that uses the basic parameters:
4552
```bash
4653
curl -X POST 'https://api.cloudflare.com/client/v4/accounts/{account_id}/browser-rendering/crawl' \
4754
-H 'Authorization: Bearer <apiToken>' \
4855
-H 'Content-Type: application/json' \
4956
-d '{
5057
51-
// Required: Starts crawling from this URL
5258
"url": "https://developers.cloudflare.com/workers/",
5359
54-
// Optional: Maximum number of pages to crawl (default is 10, maximum is 100,000)
5560
"limit": 50,
5661
57-
// Optional: Maximum link depth to crawl from the starting URL
5862
"depth": 2,
5963
60-
// Optional: Response format (default is HTML, other options are Markdown and JSON)
6164
"formats": ["markdown"]
6265
}'
6366
```
@@ -134,7 +137,7 @@ A successful cancellation will return a `200 OK` status code. The job status wil
134137

135138
## Advanced usage
136139

137-
The `/crawl` endpoint has many parameters you can use to customize your crawl. For the full list, check the [API docs[(https://developers.cloudflare.com/api/resources/browser_rendering/).
140+
The `/crawl` endpoint has many parameters you can use to customize your crawl. For the full list, check the [API docs[(https://developers.cloudflare.com/api/resources/browser_rendering/).
138141

139142
Here is an example that uses the additional parameters that are currently available, in addition to the [basic parameters shown in the example above](/browser-rendering/rest-api/crawl-endpoint/#initiate-the-crawl-job) and the [render parameter below](/browser-rendering/rest-api/crawl-endpoint/#render-a-simple-html-fetch):
140143

0 commit comments

Comments
 (0)