Parse HTML Form to Structured JSON
API Request
{
"url": "https://demo.gaffa.dev/simulate/form?loadTime=3&showModal=true&modalDelay=5&formType=address",
"proxy_location": null,
"async": false,
"max_cache_age": 0,
"settings": {
"record_request": false,
"actions": [
{
"type": "parse_json",
"data_schema": {
"name": "AddressFormSchema",
"description": "Extracts fields, labels, and placeholders from the demo address form",
"fields": [
{
"type": "string",
"name": "form_title",
"description": "The heading or title of the form"
},
{
"type": "object",
"name": "full_name",
"description": "Full name input field",
"fields": [
{
"type": "string",
"name": "label",
"description": "The visible label text"
},
{
"type": "string",
"name": "placeholder",
"description": "Placeholder text shown in the input"
},
{
"type": "string",
"name": "input_name",
"description": "The name attribute of the input element"
}
]
},
{
"type": "object",
"name": "address_line_1",
"description": "First address line input field",
"fields": [
{
"type": "string",
"name": "label",
"description": "The visible label text"
},
{
"type": "string",
"name": "placeholder",
"description": "Placeholder text shown in the input"
},
{
"type": "string",
"name": "input_name",
"description": "The name attribute of the input element"
}
]
},
{
"type": "object",
"name": "address_line_2",
"description": "Second address line input field",
"fields": [
{
"type": "string",
"name": "label",
"description": "The visible label text"
},
{
"type": "string",
"name": "placeholder",
"description": "Placeholder text shown in the input"
},
{
"type": "string",
"name": "input_name",
"description": "The name attribute of the input element"
}
]
},
{
"type": "object",
"name": "city",
"description": "City input field",
"fields": [
{
"type": "string",
"name": "label",
"description": "The visible label text"
},
{
"type": "string",
"name": "placeholder",
"description": "Placeholder text shown in the input"
},
{
"type": "string",
"name": "input_name",
"description": "The name attribute of the input element"
}
]
},
{
"type": "object",
"name": "postcode",
"description": "Postcode or ZIP code input field",
"fields": [
{
"type": "string",
"name": "label",
"description": "The visible label text"
},
{
"type": "string",
"name": "placeholder",
"description": "Placeholder text shown in the input"
},
{
"type": "string",
"name": "input_name",
"description": "The name attribute of the input element"
}
]
},
{
"type": "object",
"name": "country",
"description": "Country selection dropdown",
"fields": [
{
"type": "string",
"name": "label",
"description": "The visible label text"
},
{
"type": "string",
"name": "input_name",
"description": "The name attribute of the select element"
},
{
"type": "array",
"name": "options",
"description": "Available country options in the dropdown",
"fields": [
{
"type": "string",
"name": "value",
"description": "The option value or text"
}
]
}
]
}
]
},
"instruction": "Extract all visible form fields from this address form, including their labels, input names, placeholders, and for dropdown fields, list all available options.",
"model": "gpt-4o-mini",
"output_type": "inline"
}
]
}
}Actions
Response
Last updated