Parse JSON
Beta Feature: This feature is currently in beta and restricted to approved users. If you're are interested in trying it, please contact support and we can enable this feature for your account.
Type: parse_json
Use AI to parse web content from text into a pre-defined data schema and return it as a JSON object.
This feature currently works for online PDFs and web page text.
Parameters
data_schema_id
string
The id of the data schema you have defined that you want to transform the content into.
You must provide a data_schema
or data_schema_id
with your request.
data_schema
json
A JSON object describing the data_schema you want to transform the content into.
You must provide a data_schema
or data_schema_id
with your request.
instruction
string
A custom instruction, in addition to any detail you have added to the data schema, that you want to include with this particular parse.
model
string
`
The AI model you wish to use to parse the content into JSON.
Default: gpt-4o-mini
Accepted: ["gpt-4o-mini"]
input_token_cap
int
The max number of source input tokens that will be passed to the AI model to parse. This can be used to prevent unnecessary credit usage. If your source input is longer than the token cap, it will be abbreviated. Default: 1,000,000
selector
string
The selector that defines an element you want to parse the content of - this is useful if you are only interested in the contents of a certain element.
output_type
string
Should the action output be saved to a file where a URL will be returned or should the parsed JSON object be included directly in the request.
Default: file
Accepted: ["file", "inline"]
See universal parameters.
Pricing
The credits this action uses depends on the model used. Here are the current supported models and their pricing:
gpt-4o-mini
1 credit per 10,000 input tokens
4 credits per 10,000 output tokens
Last updated