Log in, then extract JSON
Sign into ZRM, switch to the APAC region, open the sales report, and have the formatter return it as JSON constrained by a JSON Schema, saved to sales_report.json. This example uses Anthropic for both the navigator and the formatter, using an API key you must provide.
zshot -f sales_report.json \
-t llm_json \
--navigate "Login, change the region to APAC, and click on Sales Report" \
--navigator-credential username=success@zshot-app.com \
--navigator-credential password=password \
--navigator-type "anthropic://YOUR_API_KEY@" \
--llm-format-prompt "The sales report as JSON" \
--llm-format-expects '{"type":"array","items":{"type":"object","properties":{"company":{"type":"string"},"contact":{"type":"string"},"value":{"type":"number"}}}}' \
"https://zshot-cli.com/example_assets/zrm/"{
"url": "https://zshot-cli.com/example_assets/zrm/",
"output_type": "llm_json",
"navigate": "Login, change the region to APAC, and click on Sales Report",
"navigator_type": "anthropic://YOUR_API_KEY@",
"navigator_credential": {
"username": "success@zshot-app.com",
"password": "password"
},
"llm_format_prompt": "The sales report as JSON",
"llm_format_expects": {
"type": "array",
"items": {
"type": "object",
"properties": {
"company": { "type": "string" },
"contact": { "type": "string" },
"value": { "type": "number" }
}
}
}
}curl -X POST http://127.0.0.1:3000/ \
-H "Content-Type: application/json" \
-d '{"url":"https://zshot-cli.com/example_assets/zrm/","output_type":"llm_json","navigate":"Login, change the region to APAC, and click on Sales Report","navigator_type":"anthropic://YOUR_API_KEY@","navigator_credential":{"username": "success@zshot-app.com","password": "password"}, "llm_format_prompt": "The sales report as JSON", "llm_format_expects": { "type": "array", "items": { "type": "object", "properties": { "company": { "type": "string" }, "contact": { "type": "string" }, "value": { "type": "number" } } } }}' \
-o sales_report.json[
{
"company": "Acme Staffing",
"contact": "Kyle Saito",
"value": 1272000
},
{
"company": "Globex Technologies",
"contact": "Chad Petrov",
"value": 1227000
},
{
"company": "Abstergo Procurement",
"contact": "Lena Nakamura",
"value": 1211000
},
{
"company": "Spectre Staffing",
"contact": "Roman Whitaker",
"value": 1135000
},
{
"company": "Spectre Staffing",
"contact": "Cheryl Ferreira",
"value": 1119000
},
{
"company": "Globex Technologies",
… 304 more lines