import requests

url = "https://corona-virus-world-and-india-data.p.rapidapi.com/api"

headers = {
	"X-RapidAPI-Key": "d484bbc718mshdd2dcfbcf99954bp1222f2jsn6c13602d819c",
	"X-RapidAPI-Host": "corona-virus-world-and-india-data.p.rapidapi.com"
}

response = requests.request("GET", url, headers=headers)

#print(response.text)

print("Country Totals")
country1 = input("country")
countries = response.json().get('countries_stat')
for country in countries:  # countries is a list
    if country["country_name"] == country1:  # this filters for USA
        for key, value in country.items():  # this finds key, value pairs in country
            print(key, value)
Country Totals
country_name USA
cases 82,649,779
deaths 1,018,316
region 
total_recovered 80,434,925
new_deaths 0
new_cases 0
serious_critical 1,465
active_cases 1,196,538
total_cases_per_1m_population 247,080
deaths_per_1m_population 3,044
total_tests 1,000,275,726
tests_per_1m_population 2,990,303
import requests

url = "https://forecast9.p.rapidapi.com/"

headers = {
	"X-RapidAPI-Key": "d484bbc718mshdd2dcfbcf99954bp1222f2jsn6c13602d819c",
	"X-RapidAPI-Host": "forecast9.p.rapidapi.com"
}

response = requests.request("GET", url, headers=headers)

print(response.json())
{'title': 'wetter.com REST API', 'version': '2.3', 'documentation': 'https://tapi.wetter.com/v2.3/documentation/index.html'}
import requests

url = "https://weatherapi-com.p.rapidapi.com/future.json"

querystring = {"q":"Mexico","dt":"2022-12-25"}

headers = {
	"X-RapidAPI-Key": "d484bbc718mshdd2dcfbcf99954bp1222f2jsn6c13602d819c",
	"X-RapidAPI-Host": "weatherapi-com.p.rapidapi.com"
}

response = requests.request("GET", url, headers=headers, params=querystring)

print(response.text)
{"message":"This endpoint is disabled for your subscription"}