Use the form above. Parameters, code examples and FAQ are grouped in the documentation section below.

Description
- CORS is enabled allowing JavaScript to make requests across domain boundaries
- API URL => /v1/weather
- JSON format is used by default. To get data in XML set up format=xml (root element <output>).
- Limit : 30 requests per minute. Once reached subsequent requests will result in error 429 (too many requests) until your quota is cleared.
Endpoint - Get your local temp
This endpoint retrieves the actual temperature based on your public IP geolocation.
HTTP Request: GET /v1/weather
parameter "&format=" values are json(by default or if parameter is empty) or xml
examples :
/v1/weather
/v1/weather?format=xml

response :
{
  "tempC": 21.6,
  "tempF": 70.9,
  "city": "Paris",
  "country": "France",
  "latitude": 48.8566,
  "longitude": 2.3522
}
      
Endpoint - Get temp from any location
This endpoint retrieves the actual temperature from the city passed as a parameter.
HTTP Request: GET /v1/weather?city=paris
parameter "&format=" values are json(by default or if parameter is empty) or xml
parameter "&city=" the city you want to know the temperature of.
/v1/weather?city=london
/v1/weather?city=london&format=xml

response :
{
  "tempC": 9.2,
  "tempF": 48.6,
  "city": "London",
  "country": "United Kingdom",
  "latitude": 51.5085,
  "longitude": -0.1257
}
          
Try it live

    


Documentation & API reference

How to use the Weather API

Get the current temperature for any city in Celsius and Fahrenheit, geocoded from the city name.

Endpoints

EndpointReturnsExample
/v1/weatherJSON or XMLcity=london

Parameters

NameTypeDefaultDescription
citystringoptionalCity name to look up, e.g. london. Leave empty to use the caller's IP location.
formatstringjsonResponse format: json or xml.

Code examples

curl 'https://freetools.one/v1/weather?city=london'
const w = await (await fetch('https://freetools.one/v1/weather?city=paris')).json();
console.log(w.city, w.country, w.tempC + 'C', w.tempF + 'F');
import requests

w = requests.get('https://freetools.one/v1/weather', params={'city': 'paris'}).json()
print(w['city'], w['country'], w['tempC'], 'C')

Example response

{
  "tempC": 15.0,
  "tempF": 59.0,
  "city": "London",
  "country": "United Kingdom",
  "latitude": 51.50853,
  "longitude": -0.12574
}

Frequently asked questions

Is there a free weather API with no key?

Yes. /v1/weather?city=london returns the current temperature without any registration, API key or quota signup. It is backed by Open-Meteo.

What units does the weather API return?

Both. Every response includes tempC in Celsius and tempF in Fahrenheit, so you never have to convert manually.

How accurate is the geocoding?

The city name is resolved through Open-Meteo's geocoding API, which returns the matched city, country and exact coordinates used for the forecast.

Can I get weather in XML?

Yes. Add format=xml to get an <output> element instead of JSON.