This problem is individual to certain APIs. I don’t believe you’re going to be able to force an API that doesn’t work as a web app to work. I don’t understand the technical reasons for this but I’ve come to accept it.
What I did for measuring distances is to use the Haversine formula and create the math for it in Thunkable. It takes a ton of blocks to do but it works really fast and really well.
Tatian