Docs
Authentication
All AccuWeather API requests require authentication via an API key passed as a query parameter.
Obtaining an API key
To receive your API key, contact our sales department at sales@accuweather.com. Your AccuWeather representative will provide a key tied to your subscription and usage tier.
Keep your API key secret. Do not commit it to version control or expose it in client-side code.
Passing your API key
Include the apikey query parameter on every request:
Error responses
| Status Code | Meaning |
|---|---|
401 Unauthorized | Missing or invalid API key. |
403 Forbidden | Your key does not have access to the requested endpoint or resource. |
Best practices
- Store your key in environment variables — never hard-code it in source files.
- Use server-side proxying — if your application runs in a browser, proxy API calls through your backend to avoid exposing the key to end users.
- Monitor your usage — track your call volume to stay within your subscription limits. Check status.accuweather.com for service availability.
Last modified on