Zomato which is one of the most popular restaurant search engines provides free api service...
If curl is used in api request, works perfectly;
curl -X GET --header "Accept: application/json" --header "user_key: MY_API_KEY_HERE" "https://developers.zomato.com/api/v2.1/geocode?lat=41.10867962215988&lon=29.01834726333618"
But Python's requests
library is used, it doesn't work. When I execute the code below;
import requests
r = requests.get("https://developers.zomato.com/api/v2.1/geocode?lat=41.10867962215988&lon=29.01834726333618", headers={"user_key": "MY_API_KEY_HERE", "Accept": "application/json"});
interpreter returns the error below;
requests.exceptions.ProxyError: Cannot connect to proxy. Socket error: Tunnel connection failed: 403 Forbidden.
Several attempts made via pyCurl
library but unfortunately result is the same; 403 Forbidden
How can I tackle this issue?