Log in, then extract JSON
Requires a Pro license
Sign into ZRM, switch to the APAC region, open the sales report, and have the formatter return it as JSON, saved to sales_report.json. This example uses Anthropic for both the navigator and the formatter with the key in ANTHROPIC_API_KEY, but any supported provider works.
zshot -t llm_json -f sales_report.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://$ANTHROPIC_API_KEY@" \
--llm-format-model "anthropic://$ANTHROPIC_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://THE_ANTHROPIC_API_KEY@",
"navigator_credential": {
"username": "success@zshot-app.com",
"password": "password"
},
"llm_format_model": "anthropic://THE_ANTHROPIC_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" }
}
}
}
}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://'$ANTHROPIC_API_KEY'@","navigator_credential":{"username": "success@zshot-app.com","password": "password"}, "llm_format_model": "anthropic://'$ANTHROPIC_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" } } } }}' \
-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 linesThe navigator drives the app with --navigate; the formatter shapes the rendered page into JSON with --llm-format-prompt constrained by the JSON Schema in --llm-format-expects. See LLM JSON.