You set up your OpenWeatherMap API key, pasted it into your weather plugin, hit Save — and instead of a beautiful forecast widget, you got an error code.
Frustrating? Absolutely. But here’s the good news: every common OpenWeatherMap API key error has a simple, quick fix. None of them require technical expertise, and none of them mean something is permanently broken.
This guide covers every error you’re likely to encounter — what each one actually means in plain English, and exactly how to resolve it. Whether you’re seeing a red 401 in your plugin settings, a 429 warning in your browser console, or a blank widget with no data showing at all — you’ll find the answer here.
Quick Answer: The most common OpenWeatherMap API key errors are 401 (invalid or not-yet-active key), 429 (too many requests / call limit exceeded), and 404 (city or location not found). Most can be fixed in under two minutes.
Common OWM API Key Errors — and How to Fix Them
Error 401: Invalid API Key
What it means: The key you entered is wrong, mistyped, or not yet active. OpenWeather’s servers couldn’t verify your identity — either because the key doesn’t match any account, or because it hasn’t fully activated yet.
This is the most common error new users encounter. It almost always has a simple cause.
How to fix it:
Go back to your OpenWeather account at home.openweathermap.org/api_keys and copy the key again — carefully, with no extra spaces before or after
If you just created the account, wait up to 2 hours for the key to activate. OpenWeather’s servers take time to propagate new keys — using it immediately after sign-up often triggers this error
Make sure you’re not accidentally using a test key, a placeholder value, or an old key from a previous account
Double-check that the key is pasted into the correct field in your plugin (not, for example, the WeatherAPI field if your plugin supports both)
Quick check: Your API key should be a 32-character string of letters and numbers (e.g., 7c32934dd10754698h67dbacf93cdf77). If what you’ve pasted looks shorter, truncated, or has any symbols, it’s been copied incorrectly.
Error 429: Too Many Requests
What it means: Your site has exceeded the API call limit for your current plan. OpenWeather’s free plan allows 60 calls per minute — if your site is making requests faster than that, it gets temporarily blocked.
This usually happens on sites without API response caching enabled, where every single page load triggers a fresh API request.
How to fix it:
Enable caching in your weather plugin. Most well-built weather plugins (including Location Weather) cache API responses so they don’t call OpenWeather on every page load. Check your plugin’s settings and make sure caching is turned on. The recommended cache duration is at least 10 minutes.
Understand why 10 minutes matters: OpenWeather recommends making API calls no more than once every 10 minutes per location, since the OpenWeather model itself updates no more frequently than that. Calling more often doesn’t give you fresher data — it just uses up your call limit faster.
Check if multiple plugins are calling the API. If you have more than one weather-related plugin or integration on your site, they may be collectively exceeding your limit. Consolidate to a single weather plugin.
Upgrade your plan if your site genuinely needs a higher call volume. OpenWeather’s paid plans start at higher call limits per minute/month.
Prevention tip: With a 10-minute cache enabled, a single-location weather widget makes just 6 API calls per hour — well within any plan’s limits regardless of how much traffic your site receives.
Error 404: City Not Found
What it means: The location name or format you entered isn’t recognized by OpenWeather’s servers. This can also appear if the structure of an API request is incorrect.
How to fix it:
Try entering the city name differently. For example, use "New York" instead of "New York City", or "London" instead of "London, England". OpenWeather’s city database uses standardised names.
Use geographic coordinates instead of a city name. Coordinates (latitude and longitude) are the most reliable way to specify any location and eliminate ambiguity entirely. For example: lat=51.5074&lon=-0.1278 for London. You can find coordinates for any location on Google Maps by right-clicking the location.
Add a country code to disambiguate common city names. For example: "London,GB" (London, UK) vs "London,CA" (London, Ontario, Canada).
Check for typos — a single wrong character will return a 404.
Key Appears Active but No Data Shows
What it means: Your key is valid and not throwing an error code, but your weather widget is still blank or showing nothing. This is almost always a configuration or caching issue rather than an API problem.
How to fix it:
Double-check that you saved your plugin settings after pasting the key. It sounds obvious, but it’s easy to paste a key and navigate away without clicking Save.
Clear your WordPress cache. If you use a caching plugin (WP Rocket, W3 Total Cache, LiteSpeed Cache, etc.), clear the cache after making any changes to your weather plugin settings. Your browser may be loading a cached version of the page that pre-dates your key entry.
Check that your chosen API plan matches what your plugin supports. For example, if your plugin is configured to use the One Call API but you only have a standard free API key (which doesn’t include One Call without a separate subscription), no data will return. Verify which API endpoint your plugin is calling and match it to your active plan.
Check for a plugin conflict. Temporarily deactivate other plugins and test if weather data appears. If it does, re-activate plugins one by one to identify the conflict.
Go Beyond the API Key: Meet Location Weather 🌤️
Fixed your error? Great. Now make it count.
Location Weather is a WordPress plugin trusted by 20,000+ users that connects directly to your OpenWeatherMap API key and turns it into stunning, live weather displays — current conditions, hourly and daily forecasts, AQI, sun and moon data, interactive weather maps, and more. No coding, no complexity.
Explore Location Weather Unlock extended forecasts, historical data, AI assistant, auto-location detection & more
Information sourced from OpenWeatherMap official documentation, OpenWeather FAQ, and Location Weather API integration guidelines. Pricing and plan details are accurate as of June 2026 — check openweathermap.org/price for the latest.
Mehraz MorshedMehraz Morshed is a passionate WordPress enthusiast. He started blogging with WordPress in 2013. What began as curiosity slowly became an important part of his professional life. Since then, Mehraz has explored many areas of the WordPress ecosystem, including product management, technical support, content marketing, networking, community building, and open-source contributions. As an active member of the WordPress community, Mehraz regularly participates in WordPress events, contribution activities, and mentoring initiatives.
Leave a Reply