Forum Academy Marketplace Showcase Pricing Features

Need help - Distance calculating API

Hi there,
I’m creating a function to choose the closest location from a list of results from a search,
I figured I’ll need to use a location - distance calculator ,I don’t like google so I chose a company called Geoapify (https://www.geoapify.com/route-matrix-api)
I believe I was able to create and api connection successfully,
The problem is, I don’t understand on how would I input the information so I can get the distance from point A to point B to point C and even point D…
I’ve been playing with it for days and no luck with this,
Is anyone able to explain what do I need to do in order for me to be able to input my locations and get back the distance from the api??
thank you in advance