Most services share data as JSON over HTTP. This asks the free Open-Meteo API for the current temperature in Bern, no account needed.
import requests url = "https://api.open-meteo.com/v1/forecast" params = {"latitude": 46.95, "longitude": 7.45, "current": "temperature_2m"} response = requests.get(url, params=params, timeout=10) response.raise_for_status() data = response.json() print(f"Bern right now: {data['current']['temperature_2m']}°C")