API Error Codes

Every WeatherAPI.com error code with its HTTP status: missing or invalid API key, monthly quota exceeded, location not found, plan access and bulk errors.

If there is an error, API response contains error message including error code for following 4xx HTTP Status codes.

HTTP Status Code Error code Description
401 1002 API key not provided.
400 1003 Parameter 'q' not provided.
400 1005 API request url is invalid
400 1006 No location found matching parameter 'q'
400 1010 Parameter capacity_kw is missing or invalid. It must be the array size in kWp, greater than 0. (Solar API)
400 1011 Invalid solar parameter. Allowed: tilt 0-90, azimuth 0-360, tracking fixed|single_axis|dual_axis, module_type standard|premium|thin_film, losses 0-99, inverter_kw > 0, inverter_eff 1-100, albedo 0-1. (Solar API)
400 1012 Parameter crop is not recognised. Allowed: wheat, barley, maize (or corn), soybean, potato, rice, cotton, tomato, sunflower, grape, none. (Agriculture API)
400 1013 Invalid agriculture parameter. Allowed: gdd_base -10 to 40, gdd_upper 0 to 50 and above gdd_base, kc 0-2, heat_threshold 15-50, season_start yyyy-MM-dd within the last 366 days. (Agriculture API)
401 2006 API key provided is invalid
403 2007 API key has exceeded calls per month quota.
403 2008 API key has been disabled.
403 2009 API key does not have access to the resource. Please check pricing page for what is allowed in your API subscription plan.
400 9000 Json body passed in bulk request is invalid. Please make sure it is valid json with utf-8 encoding.
400 9001 Json body contains too many locations for bulk request. Please keep it below 50 in a single request.
400 9999 Internal application error.

Quick and Easy Signup for Weather API

WeatherAPI.com makes it super easy to integrate our realtime, daily, hourly and 15 min interval weather forecast data, historical weather, marine weather, bulk request, air quality data, pollen, evapotranspiration, autocomplete, time zone, astronomy and sports data into your new or existing project.