API how to get list of pool ranges

I have hundreds of routers
would likt to automatically compile list of DHCP pool ranges
telnet /ip pool print
does the trick but slow, unreliable, results must be parsed

[ 26820] > ip pool print
# NAME                               RANGES
0 dhcp_pool1                        10.112.72.6-10.112.72.50

OK… just pick an API client in your favorite programming language, and try doing it. For each router, you simply need to send the command “/ip/pool/print”, and inspect the replies to get the actual pool names and ranges.