Curl
Python Requests
Zingu Apis
Javascript Fetch
curl 'https://api.weather.gov/zones/forecast?area=TX&include_geometry=true&limit=5' \
-H 'User-Agent: robustapi-example'
import requests
resp = requests.get(
"https://api.weather.gov/zones/forecast",
params={
'area': 'TX',
'include_geometry': 'true',
'limit': '5',
},
headers={
'User-Agent': 'robustapi-example',
},
)
data = resp.json()
import zingu_apis
api = zingu_apis.api("weather")
result = api.fetch("zones/{type}", area="TX", include_geometry="true", limit=5)
for item in result:
print(item)
const resp = await fetch("https://api.weather.gov/zones/forecast?area=TX&include_geometry=true&limit=5", {
headers: {
"User-Agent": "robustapi-example",
},
});
const data = await resp.json();