Python: Requesting bulk historical weather data from public API

Solution for Python: Requesting bulk historical weather data from public API
is Given Below:

I am attempting to get historical weather data (from this year) in Sweden.

For this, I came across the free API source: https://rapidapi.com/visual-crossing-corporation-visual-crossing-corporation-default/api/visual-crossing-weather/

However, when using the code and example provided I get the error:

{"message":"Invalid API key. Go to https://docs.rapidapi.com/docs/keys for more info."}

There doesn’t seem to be any API key in the input…

url = "https://visual-crossing-weather.p.rapidapi.com/history"

querystring = {"startDateTime":"2019-01-01T00:00:00",
               "aggregateHours":"24",
               "location":"Washington,DC,USA",
               "endDateTime":"2019-01-03T00:00:00",
               "unitGroup":"us",
               "dayStartTime":"8:00:00",
               "contentType":"csv",
               "dayEndTime":"17:00:00",
               "shortColumnNames":"0"}

headers = {'x-rapidapi-host': 'visual-crossing-weather.p.rapidapi.com'}

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

print(response.text)

That page link is not found (Error 404).

I would assume no Key would be needed as it is supposedly a public source.

I also came across: OpenWeatherMap for which I was sent a student key, however in their example code, there are no instructions on how to use coordinates and where to implement the key. It looks different from their documentation on their website.

import requests

url = "https://community-open-weather-map.p.rapidapi.com/climate/month"

querystring = {"q":"San Francisco"}

headers = {'x-rapidapi-host': 'community-open-weather-map.p.rapidapi.com'}

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

print(response.text)

source: https://rapidapi.com/community/api/open-weather-map/

My end goal is to apply it to my own data that contains timestamp, latitude and longitude values as shown below:

timestamp   latitude    longitude
0   2021-06-09 08:12:33.820 57.728905   11.949309
1   2021-06-09 08:15:36.370 57.728874   11.949407
2   2021-06-09 08:16:06.000 57.728916   11.949470
3   2021-06-09 08:16:52.190 57.728836   11.949342
4   2021-06-09 08:18:08.000 57.728848   11.949178

How could I make this public API work? Alternatively, which other public one I could use (and how it is requested) to get weather information from my timestamp (historical weather data on 20202) and locations (Sweden).