Free APIs for a weather app
- Open-Meteo Geocoding
Turns "Lisbon" into latitude, longitude and timezone. Start here.
geocoding-api.open-meteo.com
Runs in the browserWorking
- Open-Meteo Forecast
The forecast itself: current conditions, hourly and daily values.
api.open-meteo.com
Runs in the browserWorking
- Open-Meteo Air Quality
PM2.5, PM10 and pollen for the same coordinates.
air-quality-api.open-meteo.com
Runs in the browserWorking
- Sunrise Sunset
Sunrise and sunset to switch between day and night icons.
api.sunrise-sunset.org
Runs in the browserWorking
- GeoJS
A rough location from the visitor’s IP, to show something before they search.
get.geojs.io
Runs in the browserWorking
- BigDataCloud Reverse Geocoding
City name for coordinates that came from the device’s geolocation.
api.bigdatacloud.net
Runs in the browserWorking
- MET Norway Locationforecast
A second forecast source if you want to compare or fall back.
api.met.no
Runs in the browserWorking
Build snapshot, not live. One verifier run on , from the machine that built this site. How we check
How the pieces fit
The APIs below were picked because they accept coordinates in the same format and send CORS headers, so the whole app can run as a static page.
- Ask the geocoder for the place name and keep the first result’s latitude, longitude and timezone.
- Request the forecast with those coordinates and the timezone, so times come back in local time.
- Cache the answer for at least ten minutes. Forecast models do not update faster than that.
- Show the name of the data source and the time of the forecast next to the numbers.
Questions
Can I build a weather app without any API key?
Yes. Open-Meteo provides geocoding, forecast and air quality without a key, and all three answered our verifier with CORS headers, so a static page can call them directly.
Is Open-Meteo free for commercial use?
No. Its free tier is for non-commercial use; a commercial product needs one of its paid plans. MET Norway and the US National Weather Service allow commercial use with attribution and an identifying User-Agent.
How do I get the user’s location for the first screen?
Use an IP location API such as GeoJS for a rough default, and offer the browser’s geolocation prompt as an explicit button. IP location is often wrong by a city.
Other collections
- Beginner projectsSmall, friendly APIs for a first fetch call: no key, no sign-up, CORS enabled, with a copyable example for each.
- BrazilKeyless APIs for Brazilian postal codes, company registry, holidays, banks, FIPE prices, IBGE statistics and central bank exchange rates, all verified.
- Maps & placesKeyless APIs for geocoding, reverse geocoding, postal codes, elevation, routes and country data, with usage limits explained.
- Mock dataFake users, products and posts, echo servers, placeholder images and avatars: keyless APIs for prototypes, demos and client tests.
Keep exploring
- All APIsSearch the whole catalog and filter by category, browser support and status.
- No key neededWhat "keyless" means in practice, and the limits that still apply.
- Runs in the browserAPIs a static page can call without a backend (CORS enabled).
- CollectionsCurated sets for a weather app, a first project, maps, mock data.
- Live statusWhat we check, how often, and the latest result for every API.
- Open dataThe catalog and results as JSON at /api.json.
- Brasil (pt-BR)CEP, CNPJ, feriados e câmbio, em português.
- Sources and licencesWhere entries come from and who we credit.