import requests

url = "https://weatherbit-v1-mashape.p.rapidapi.com/forecast/minutely"

querystring = {"lat":"32.71","lon":"-117.161"}

headers = {
	"X-RapidAPI-Key": "47adfc21bcmsh44e5abcedbf2a29p150b62jsn37a5f5ecf19a",
	"X-RapidAPI-Host": "weatherbit-v1-mashape.p.rapidapi.com"
}

response = requests.request("GET", url, headers=headers, params=querystring)
print("raw API data")
print("--------------")
print('\n')
print(response.text)
raw API data
--------------


{"city_name":"San Diego","country_code":"US","data":[{"precip":0,"snow":0,"temp":22.1,"timestamp_local":"2022-10-10T13:37:00","timestamp_utc":"2022-10-10T20:37:00","ts":1665434220},{"precip":0,"snow":0,"temp":22.1,"timestamp_local":"2022-10-10T13:38:00","timestamp_utc":"2022-10-10T20:38:00","ts":1665434280},{"precip":0,"snow":0,"temp":22.1,"timestamp_local":"2022-10-10T13:39:00","timestamp_utc":"2022-10-10T20:39:00","ts":1665434340},{"precip":0,"snow":0,"temp":22.1,"timestamp_local":"2022-10-10T13:40:00","timestamp_utc":"2022-10-10T20:40:00","ts":1665434400},{"precip":0,"snow":0,"temp":22.1,"timestamp_local":"2022-10-10T13:41:00","timestamp_utc":"2022-10-10T20:41:00","ts":1665434460},{"precip":0,"snow":0,"temp":22.1,"timestamp_local":"2022-10-10T13:42:00","timestamp_utc":"2022-10-10T20:42:00","ts":1665434520},{"precip":0,"snow":0,"temp":22.1,"timestamp_local":"2022-10-10T13:43:00","timestamp_utc":"2022-10-10T20:43:00","ts":1665434580},{"precip":0,"snow":0,"temp":22.1,"timestamp_local":"2022-10-10T13:44:00","timestamp_utc":"2022-10-10T20:44:00","ts":1665434640},{"precip":0,"snow":0,"temp":22.2,"timestamp_local":"2022-10-10T13:45:00","timestamp_utc":"2022-10-10T20:45:00","ts":1665434700},{"precip":0,"snow":0,"temp":22.2,"timestamp_local":"2022-10-10T13:46:00","timestamp_utc":"2022-10-10T20:46:00","ts":1665434760},{"precip":0,"snow":0,"temp":22.2,"timestamp_local":"2022-10-10T13:47:00","timestamp_utc":"2022-10-10T20:47:00","ts":1665434820},{"precip":0,"snow":0,"temp":22.2,"timestamp_local":"2022-10-10T13:48:00","timestamp_utc":"2022-10-10T20:48:00","ts":1665434880},{"precip":0,"snow":0,"temp":22.2,"timestamp_local":"2022-10-10T13:49:00","timestamp_utc":"2022-10-10T20:49:00","ts":1665434940},{"precip":0,"snow":0,"temp":22.2,"timestamp_local":"2022-10-10T13:50:00","timestamp_utc":"2022-10-10T20:50:00","ts":1665435000},{"precip":0,"snow":0,"temp":22.2,"timestamp_local":"2022-10-10T13:51:00","timestamp_utc":"2022-10-10T20:51:00","ts":1665435060},{"precip":0,"snow":0,"temp":22.2,"timestamp_local":"2022-10-10T13:52:00","timestamp_utc":"2022-10-10T20:52:00","ts":1665435120},{"precip":0,"snow":0,"temp":22.3,"timestamp_local":"2022-10-10T13:53:00","timestamp_utc":"2022-10-10T20:53:00","ts":1665435180},{"precip":0,"snow":0,"temp":22.3,"timestamp_local":"2022-10-10T13:54:00","timestamp_utc":"2022-10-10T20:54:00","ts":1665435240},{"precip":0,"snow":0,"temp":22.3,"timestamp_local":"2022-10-10T13:55:00","timestamp_utc":"2022-10-10T20:55:00","ts":1665435300},{"precip":0,"snow":0,"temp":22.3,"timestamp_local":"2022-10-10T13:56:00","timestamp_utc":"2022-10-10T20:56:00","ts":1665435360},{"precip":0,"snow":0,"temp":22.3,"timestamp_local":"2022-10-10T13:57:00","timestamp_utc":"2022-10-10T20:57:00","ts":1665435420},{"precip":0,"snow":0,"temp":22.3,"timestamp_local":"2022-10-10T13:58:00","timestamp_utc":"2022-10-10T20:58:00","ts":1665435480},{"precip":0,"snow":0,"temp":22.3,"timestamp_local":"2022-10-10T13:59:00","timestamp_utc":"2022-10-10T20:59:00","ts":1665435540},{"precip":0,"snow":0,"temp":22.3,"timestamp_local":"2022-10-10T14:00:00","timestamp_utc":"2022-10-10T21:00:00","ts":1665435600},{"precip":0,"snow":0,"temp":22.3,"timestamp_local":"2022-10-10T14:01:00","timestamp_utc":"2022-10-10T21:01:00","ts":1665435660},{"precip":0,"snow":0,"temp":22.3,"timestamp_local":"2022-10-10T14:02:00","timestamp_utc":"2022-10-10T21:02:00","ts":1665435720},{"precip":0,"snow":0,"temp":22.3,"timestamp_local":"2022-10-10T14:03:00","timestamp_utc":"2022-10-10T21:03:00","ts":1665435780},{"precip":0,"snow":0,"temp":22.3,"timestamp_local":"2022-10-10T14:04:00","timestamp_utc":"2022-10-10T21:04:00","ts":1665435840},{"precip":0,"snow":0,"temp":22.4,"timestamp_local":"2022-10-10T14:05:00","timestamp_utc":"2022-10-10T21:05:00","ts":1665435900},{"precip":0,"snow":0,"temp":22.4,"timestamp_local":"2022-10-10T14:06:00","timestamp_utc":"2022-10-10T21:06:00","ts":1665435960},{"precip":0,"snow":0,"temp":22.4,"timestamp_local":"2022-10-10T14:07:00","timestamp_utc":"2022-10-10T21:07:00","ts":1665436020},{"precip":0,"snow":0,"temp":22.4,"timestamp_local":"2022-10-10T14:08:00","timestamp_utc":"2022-10-10T21:08:00","ts":1665436080},{"precip":0,"snow":0,"temp":22.4,"timestamp_local":"2022-10-10T14:09:00","timestamp_utc":"2022-10-10T21:09:00","ts":1665436140},{"precip":0,"snow":0,"temp":22.4,"timestamp_local":"2022-10-10T14:10:00","timestamp_utc":"2022-10-10T21:10:00","ts":1665436200},{"precip":0,"snow":0,"temp":22.4,"timestamp_local":"2022-10-10T14:11:00","timestamp_utc":"2022-10-10T21:11:00","ts":1665436260},{"precip":0,"snow":0,"temp":22.4,"timestamp_local":"2022-10-10T14:12:00","timestamp_utc":"2022-10-10T21:12:00","ts":1665436320},{"precip":0,"snow":0,"temp":22.4,"timestamp_local":"2022-10-10T14:13:00","timestamp_utc":"2022-10-10T21:13:00","ts":1665436380},{"precip":0,"snow":0,"temp":22.4,"timestamp_local":"2022-10-10T14:14:00","timestamp_utc":"2022-10-10T21:14:00","ts":1665436440},{"precip":0,"snow":0,"temp":22.4,"timestamp_local":"2022-10-10T14:15:00","timestamp_utc":"2022-10-10T21:15:00","ts":1665436500},{"precip":0,"snow":0,"temp":22.4,"timestamp_local":"2022-10-10T14:16:00","timestamp_utc":"2022-10-10T21:16:00","ts":1665436560},{"precip":0,"snow":0,"temp":22.4,"timestamp_local":"2022-10-10T14:17:00","timestamp_utc":"2022-10-10T21:17:00","ts":1665436620},{"precip":0,"snow":0,"temp":22.4,"timestamp_local":"2022-10-10T14:18:00","timestamp_utc":"2022-10-10T21:18:00","ts":1665436680},{"precip":0,"snow":0,"temp":22.4,"timestamp_local":"2022-10-10T14:19:00","timestamp_utc":"2022-10-10T21:19:00","ts":1665436740},{"precip":0,"snow":0,"temp":22.4,"timestamp_local":"2022-10-10T14:20:00","timestamp_utc":"2022-10-10T21:20:00","ts":1665436800},{"precip":0,"snow":0,"temp":22.4,"timestamp_local":"2022-10-10T14:21:00","timestamp_utc":"2022-10-10T21:21:00","ts":1665436860},{"precip":0,"snow":0,"temp":22.4,"timestamp_local":"2022-10-10T14:22:00","timestamp_utc":"2022-10-10T21:22:00","ts":1665436920},{"precip":0,"snow":0,"temp":22.4,"timestamp_local":"2022-10-10T14:23:00","timestamp_utc":"2022-10-10T21:23:00","ts":1665436980},{"precip":0,"snow":0,"temp":22.4,"timestamp_local":"2022-10-10T14:24:00","timestamp_utc":"2022-10-10T21:24:00","ts":1665437040},{"precip":0,"snow":0,"temp":22.4,"timestamp_local":"2022-10-10T14:25:00","timestamp_utc":"2022-10-10T21:25:00","ts":1665437100},{"precip":0,"snow":0,"temp":22.4,"timestamp_local":"2022-10-10T14:26:00","timestamp_utc":"2022-10-10T21:26:00","ts":1665437160},{"precip":0,"snow":0,"temp":22.4,"timestamp_local":"2022-10-10T14:27:00","timestamp_utc":"2022-10-10T21:27:00","ts":1665437220},{"precip":0,"snow":0,"temp":22.4,"timestamp_local":"2022-10-10T14:28:00","timestamp_utc":"2022-10-10T21:28:00","ts":1665437280},{"precip":0,"snow":0,"temp":22.4,"timestamp_local":"2022-10-10T14:29:00","timestamp_utc":"2022-10-10T21:29:00","ts":1665437340},{"precip":0,"snow":0,"temp":22.4,"timestamp_local":"2022-10-10T14:30:00","timestamp_utc":"2022-10-10T21:30:00","ts":1665437400},{"precip":0,"snow":0,"temp":22.4,"timestamp_local":"2022-10-10T14:31:00","timestamp_utc":"2022-10-10T21:31:00","ts":1665437460},{"precip":0,"snow":0,"temp":22.4,"timestamp_local":"2022-10-10T14:32:00","timestamp_utc":"2022-10-10T21:32:00","ts":1665437520},{"precip":0,"snow":0,"temp":22.4,"timestamp_local":"2022-10-10T14:33:00","timestamp_utc":"2022-10-10T21:33:00","ts":1665437580},{"precip":0,"snow":0,"temp":22.4,"timestamp_local":"2022-10-10T14:34:00","timestamp_utc":"2022-10-10T21:34:00","ts":1665437640},{"precip":0,"snow":0,"temp":22.4,"timestamp_local":"2022-10-10T14:35:00","timestamp_utc":"2022-10-10T21:35:00","ts":1665437700},{"precip":0,"snow":0,"temp":22.4,"timestamp_local":"2022-10-10T14:36:00","timestamp_utc":"2022-10-10T21:36:00","ts":1665437760}],"lat":32.71,"lon":-117.161,"state_code":"CA","timezone":"America/Los_Angeles"}

import requests

#inputs by user
latInput = input("Please input your latitude: ")
lonInput = input("Please input your longitude: ")

url = "https://weatherbit-v1-mashape.p.rapidapi.com/forecast/minutely"


querystring = {"lat":latInput,"lon":lonInput}

headers = {
	"X-RapidAPI-Key": "47adfc21bcmsh44e5abcedbf2a29p150b62jsn37a5f5ecf19a",
	"X-RapidAPI-Host": "weatherbit-v1-mashape.p.rapidapi.com"
}
#requesting the api
response = requests.request("GET", url, headers=headers, params=querystring)
#variable used for parsing through the obtained data
parse_data = response.json()
#variables(parsing)
cityName = parse_data["city_name"]
rainChance = parse_data["data"][0]["precip"]
snowChance = parse_data["data"][0]["snow"]
tempCelcius = parse_data["data"][0]["temp"]
tempFaren = (tempCelcius*1.8) + 32

#code being implemented
print(cityName+ " Weather:")
print("\n")
print("-------------------")
print("Precipitation Chance: "+ str(rainChance))
print("Snow Chance: "+ str(snowChance))
print("Temp (Celcius): "+ str(tempCelcius))
print("Temp (Fahrenheit): "+ str(tempFaren ))
Hanga Roa Weather:


-------------------
Precipitation Chance: 1.93
Snow Chance: 0
Temp (Celcius): 14.7
Temp (Fahrenheit): 58.46