I have a large set of latitude/longitude coordinates and would like to get the elevation for each. I want to use the OpenElevation API. According to their API Docs, I can get elevation data through the URL: https://api.open-elevation.com/api/v1/lookup?locations=10,10|20,20|41.161758,-8.583933. As you can see from the example URL, it is possible to get many elevations in a single request (provided you are using POST). However, when I try to implement the example they have used:
elevation = requests.post('https://api.open-elevation.com/api/v1/lookup', params={"locations": "10,10"}).content
print(elevation)
This is the result:
b'{"error": "Invalid JSON."}'
The URL being submitted is: https://api.open-elevation.com/api/v1/lookup?locations=10%2C10 which is definitely in incorrect format.