curl -fL "https://portal.opentopography.org/API/globaldem?demtype=AW3D30&south=-20&north=5&west=-75&east=-50&outputFormat=GTiff&API_Key=YOUR_KEY" \
-o response
import requests
r = requests.get("https://portal.opentopography.org/API/globaldem?demtype=AW3D30&south=-20&north=5&west=-75&east=-50&outputFormat=GTiff&API_Key=YOUR_KEY")
r.raise_for_status()
open("response", "wb").write(r.content)
const res = await fetch("https://portal.opentopography.org/API/globaldem?demtype=AW3D30&south=-20&north=5&west=-75&east=-50&outputFormat=GTiff&API_Key=YOUR_KEY");
console.log(res.status, res.headers.get("content-type"));