import requests target_url = 'https://openwrt.club/ip' myip = requests.get(target_url) print(myip.json()){'ip': '18.212.236.240', 'Country': 'US'}