Overview
By default, AI agents return natural language responses in markdown format. To get structured data, use theoutputType parameter to specify the desired format.
Output Types:
When using
structured_json or structured_csv, WebRun validates the output against your schema before returning it.
Output Type: text
The default output type returns natural language responses formatted as markdown. NooutputSchema is required.
Request Example
Response
The response contains markdown-formatted text:Output Type: structured_json
Usestructured_json to get validated JSON output. The outputSchema parameter accepts a standard JSON Schema object that defines the expected response structure.
Supported JSON Schema Types
string- Text valuesnumber- Numeric values (integers and decimals)boolean- True/false valuesobject- Nested objects with defined propertiesarray- Arrays with defined item structure
Request Example
Response
The response is guaranteed to match your schema:When using
outputType: "structured_json", the response is guaranteed to match your schema. The data.message field contains a valid JSON string that can be directly parsed.Output Type: structured_csv
Usestructured_csv to get CSV formatted output. The outputSchema parameter accepts an array of column names that define the CSV structure.
Request Example
Response
The response contains CSV formatted data with the specified columns:Parsing CSV Response
When using
outputType: "structured_csv", the outputSchema must be an array of column name strings. The first row of the output will be the header row containing these column names.