It’s possible to export stats to a JSON file.
$ glances --export json --export-json-file /tmp/glances.json