import requests response = requests.get('https://httpbin.org/ip') print('Az IP címe: {0}'.format(response.json()['origin']))