I know about: https://check.torproject.org/
It uses HTML which can change at any moment, and is intended for humans.
I'm looking for some URL (or other method) which wastes as little resources as possible to tell me whether the connection is going over Tor or not, for the purpose of auto-verifying that "Tor is still running/working". Something which just returns a minimal JSON blob or even just a "0" or "1" would be ideal.
Is there such a thing?