How to pass coordinates to Map Matching API on python


First of all thanks for a great tool!

This is probably just me don’t understanding the requests package, but how do I pass the coordinates to the map matching API on Python? I am following the documentation here, but I don’t quite get how to pass the gpx/coordinates?

Thanks in advance, Álvaro

The Python example in the docs seems to be missing the gpx file. Here is a working example:

api_key = "YOUR_API_KEY"
url = f"{api_key}"
gpx_file_path = "/path/to/some.gpx"
with open(gpx_file_path, "rb") as gpx_file:
    gpx_content =
headers = {"Content-Type": "application/gpx+xml"}
response =, headers=headers, data=gpx_content)

if response.status_code == 200:
    print("Request successful!")
    print(f"Request failed with status code: {response.status_code}")

Amazing, thank you very much!