You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/browser-rendering/rest-api/json-endpoint.mdx
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ The `/json` endpoint leverages [Workers AI](/workers-ai/) for data extraction. U
27
27
28
28
This example captures webpage data by providing both a prompt and a JSON schema. The prompt guides the extraction process, while the JSON schema defines the expected structure of the output.
29
29
30
-
```bash {11-13} collapse={15-48}
30
+
```bash
31
31
curl --request POST 'https://api.cloudflare.com/client/v4/accounts/CF_ACCOUNT_ID/browser-rendering/json' \
32
32
--header 'authorization: Bearer CF_API_TOKEN' \
33
33
--header 'content-type: application/json' \
@@ -63,7 +63,7 @@ curl --request POST 'https://api.cloudflare.com/client/v4/accounts/CF_ACCOUNT_ID
63
63
```
64
64
65
65
66
-
```json output {11-13} collapse={15-48}
66
+
```json output collapse={15-48}
67
67
{
68
68
"success": true,
69
69
"result": {
@@ -128,7 +128,7 @@ curl --request POST 'https://api.cloudflare.com/client/v4/accounts/CF_ACCOUNT_ID
128
128
129
129
In this case, you supply a JSON schema via the `response_format` parameter. The schema defines the structure of the extracted data.
130
130
131
-
```bash {11-13} collapse={15-48}
131
+
```bash
132
132
curl --request POST 'https://api.cloudflare.com/client/v4/accounts/CF_ACCOUNT_ID/browser-rendering/json' \
133
133
--header 'authorization: Bearer CF_API_TOKEN' \
134
134
--header 'content-type: application/json' \
@@ -160,7 +160,7 @@ curl --request POST 'https://api.cloudflare.com/client/v4/accounts/CF_ACCOUNT_ID
0 commit comments