json_extract
Creates, updates, deletes, gets or lists a json_extract resource.
Overview
| Name | json_extract |
| Type | Resource |
| Id | cloudflare.browser_rendering.json_extract |
Fields
The following fields are returned by SELECT queries:
- get
Returns the JSON based on a user prompt or JSON schema.
| Name | Datatype | Description |
|---|---|---|
contents | string |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | account_id | cacheTTL | Gets json from a webpage from a provided URL or HTML. Pass prompt or schema in the body. Control page loading with gotoOptions and waitFor* options. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Cloudflare account ID. |
cacheTTL | number | Cache TTL default is 5s. Set to 0 to disable. |
SELECT examples
- get
Gets json from a webpage from a provided URL or HTML. Pass prompt or schema in the body. Control page loading with gotoOptions and waitFor* options.
SELECT
contents
FROM cloudflare.browser_rendering.json_extract
WHERE account_id = '{{ account_id }}' -- required
AND cacheTTL = '{{ cacheTTL }}'
;