Probably you can use some of this Python snippets here, that make use of swisstopo's services:
You could additionally user the "sr" parameter to get the response in e.g. LV03 or LV95, which would be easier for the distance calculcation.
This are just some very simple example scripts based on simplified calculations that do not take the curvature of earth into account.
So probably not suitable, if you need exact numbers. But at least you can see which services might be useful for you to start digging.
Cheers and have a nice weekend