Until someone chimes in with a secret endpoint that exposes the hub variables, the best hack I can think of would be to write the variable value to a device attribute whenever it changes (using Rule Machine) and expose the device via Maker API where you can then pull the device info via HTTP.
If you need to store a string you could either write a custom device driver or could use the virtual OMNI sensor as suggested here: Virtual device type to store text string? - #2 by dan.t
Depending on where and how the hub variable is used, it might be simpler just to store the variable value in the device attribute in the first place and not use the hub variable at all.