Get weather data with a free API and no key
In short:
curl 'https://freetools.one/v1/weather?city=london' returns the current temperature
in Celsius and Fahrenheit, the resolved city, country and coordinates. No signup, no key.
Most free weather APIs start the same way: sign up, confirm an email, copy a key from a dashboard, then paste that key into every request. Open-Meteo changed that by dropping the key requirement, and this endpoint wraps it so the whole thing is one GET with no setup at all.
The response
{
"tempC": 15.0,
"tempF": 59.0,
"city": "London",
"country": "United Kingdom",
"latitude": 51.50853,
"longitude": -0.12574
}
Both temperature units are always included, so you never convert by hand. The city name you pass in is geocoded first, and the response tells you exactly which city was matched — useful when a name is ambiguous.
By city
curl 'https://freetools.one/v1/weather?city=london'
By the caller's location
Omit city and the weather for the caller's own location is returned:
curl 'https://freetools.one/v1/weather'
XML output
curl 'https://freetools.one/v1/weather?city=paris&format=xml'
From JavaScript
const w = await (await fetch('https://freetools.one/v1/weather?city=paris')).json();
document.querySelector('#temp').textContent = w.tempC + '°C in ' + w.city;
From Python
import requests
w = requests.get('https://freetools.one/v1/weather',
params={'city': 'paris'}).json()
print(w['city'], w['tempC'], 'C')
Building a "local weather" banner
The common pattern is to show weather for whoever is looking, with no input at all:
<div id="w">Loading…</div>
<script>
fetch('https://freetools.one/v1/weather')
.then(r => r.json())
.then(w => document.getElementById('w').textContent =
w.city + ': ' + w.tempC + '°C');
</script>
Because the lookup happens server-side, the browser's own CORS rules never come into it.
Limits
30 requests per minute per IP address. The weather endpoint performs a live lookup. If you are polling frequently, cache the response for an hour or two — current temperature does not change minute to minute.
Why the key-free approach works now
For years, weather data came almost exclusively from providers that gate it behind an account. Open-Meteo changed that by publishing an open API over the ECMWF and national model output, with no key required and no request cap for non-commercial use. This endpoint adds city geocoding and a normalised response shape on top, which is the part people actually wanted.
Handling ambiguous city names
"Springfield" exists in dozens of places, so the geocoder returns one match. The response tells you which city and country it picked, so you can confirm:
curl -s 'https://freetools.one/v1/weather?city=springfield'
| jq '{city, country, latitude, longitude}'
If you need a different one, disambiguate in the query itself — "Springfield, US"
or "Springfield, GB" — which is the standard geocoder convention.
Caching for anything that polls
Current temperature does not change second to second. If your page polls, cache on your side for at least 15 minutes and an hour for a city dashboard:
const CACHE_MS = 15 * 60 * 1000;
let hit = JSON.parse(localStorage.getItem('w') || 'null');
if (!hit || Date.now() - hit.at > CACHE_MS) {{
hit = {{ at: Date.now(), data: await (await fetch(
'https://freetools.one/v1/weather?city=paris')).json() }};
localStorage.setItem('w', JSON.stringify(hit));
}}
render(hit.data);
What this endpoint does not do
It returns current conditions only. There is no hourly forecast, no daily forecast, no precipitation and no alerts in the response. If you need a multi-day forecast, call Open-Meteo's forecast endpoint directly — it is equally key-free — and use this endpoint when a single current reading is all you need.
Displaying temperatures correctly
Both units arrive pre-rounded, but a little care goes a long way when rendering:
function show(w) {{
const c = Math.round(w.tempC);
return `${{c}}°C / ${{Math.round(w.tempF)}}°F in ${{w.city}}, ${{w.country}}`;
}}
Rounding the Fahrenheit value rather than truncating avoids showing 59°F next to 15°C, which do not correspond exactly.
Regional fallbacks
Combine the city lookup with IP geolocation to serve a sensible default before the user chooses anything: call the geolocation endpoint for the visitor's country, then pick a default city for it.
Frequently asked questions
Is there a free weather API with no API key?
Yes. /v1/weather?city=london returns the current temperature without registration, API key or quota signup, so you can use it directly from a script or a web page.
What units does the weather API return?
Both. Every response includes tempC in Celsius and tempF in Fahrenheit, plus the resolved city, country and the exact latitude and longitude used for the lookup.
Can I get the weather for the visitor's own location?
Yes. Call /v1/weather without the city parameter and it resolves the caller's public IP address and returns the local weather.
How many weather requests can I make?
30 requests per minute per IP address. The weather endpoint performs a live lookup, so cache the response in your application when you poll it repeatedly.