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
@@ -21,7 +21,7 @@ The `/json` endpoint extracts structured data from a webpage. You can specify th
21
21
22
22
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.
23
23
24
-
```bash
24
+
```bash {11-13} collapse={15-48}
25
25
curl --request POST 'https://api.cloudflare.com/client/v4/accounts/CF_ACCOUNT_ID/browser-rendering/json' \
26
26
--header 'authorization: Bearer CF_API_TOKEN' \
27
27
--header 'content-type: application/json' \
@@ -57,7 +57,7 @@ curl --request POST 'https://api.cloudflare.com/client/v4/accounts/CF_ACCOUNT_ID
57
57
```
58
58
59
59
60
-
```json output
60
+
```json output {11-13} collapse={15-48}
61
61
{
62
62
"success": true,
63
63
"result": {
@@ -122,7 +122,7 @@ curl --request POST 'https://api.cloudflare.com/client/v4/accounts/CF_ACCOUNT_ID
122
122
123
123
In this case, you supply a JSON schema via the `response_format` parameter. The schema defines the structure of the extracted data.
124
124
125
-
```bash
125
+
```bash {11-13} collapse={15-48}
126
126
curl --request POST 'https://api.cloudflare.com/client/v4/accounts/CF_ACCOUNT_ID/browser-rendering/json' \
127
127
--header 'authorization: Bearer CF_API_TOKEN' \
128
128
--header 'content-type: application/json' \
@@ -154,7 +154,7 @@ curl --request POST 'https://api.cloudflare.com/client/v4/accounts/CF_ACCOUNT_ID
0 commit comments