Contact Us
Company
  • Proven Superior Accuracy
  • About AccuWeather
  • Digital Advertising
  • Careers
  • Press
  • Privacy
  • Terms of Use
  • Brand Guidelines
Products & Services
  • For Business
  • For Partners
  • For Advertising
  • AccuWeather Enterprise APIs
  • AccuWeather Connect
  • Personal Weather Stations
Subscription Services
  • AccuWeather Premium
  • AccuWeather Professional
Apps & Downloads
  • iPhone App
  • Android App
  • See all Apps & Downloads

© 2025 AccuWeather, Inc.

xXfacebookFacebookinstagramInstagram
  • Home
  • Documentation
  • Core Weather API
  • MinuteCast™ API
  • Pricing
  • FAQ
Quick-start guides
    Core weatherMinuteCast™
General
    AccuWeather APIsAuthenticationBest practicesAPI flow diagramData display formatsLanguages and localizationsUnit typesWeather iconsHTTP status codesGlossarySystem statusTerms of useBrand guidelines
Locations
    General informationLocation keysAdministrative areasRegions and countriesPoint-of-interest typesAutocomplete
Indices
    Index listDaily Index Categories and Level Values
Alerts
    Last actions
Alarms
    Thresholds
General

Authentication

AccuWeather APIs use API key-based authentication to secure access to weather data. Every request to the API must include a valid API key in the Authorization header.

Get your API key

Your API key is available in your account dashboard.

  1. Sign up for a free AccuWeather developer account or sign in if you already have an account.
  2. Navigate to your subscriptions page.
  3. Copy your API key from the dashboard.

Your API key is unique to your account and should be kept secure. Do not share it publicly or commit it to version control.

Make authenticated requests

Include your API key in the Authorization header using the bearer token format:

Curl example

TerminalCode
curl -H "Authorization: Bearer YOUR_API_KEY" \ -H "Accept-Encoding: gzip,deflate" \ "https://dataservice.accuweather.com/currentconditions/v1/349727"

This example retrieves current weather conditions for New York City (location key 349727).

Response format

Successful requests return JSON data with weather information. Unauthorized requests return a 401 status code.

Code
{ "type": "https://httpproblems.com/http-status/401", "title": "Unauthorized", "status": 401, "instance": "/currentconditions/v1/349727", "trace": { "timestamp": "2025-07-26T08:00:13.887Z", "requestId": "f88dc27c-wmf1-4982-be8d-cc7b0f2a2b41", "buildId": "10a5efeb-jjf6-4971-89a5-51cfd7026e0f" }, "Code": "Unauthorized", "Message": "API authorization failed", "Reference": "https://dataservice.accuweather.com/currentconditions/v1/349727" }

Authentication best practices

Secure API keys

  • Store API keys as environment variables.
  • Never hardcode keys in client-side applications.
  • Use server-side proxies for client applications.
  • If you think your API key has been compromised, contact AccuWeather support immediately.

Request headers

  • Always include Accept-Encoding: gzip,deflate for compression.
  • Use HTTPS endpoints exclusively. Unsecure HTTP is not supported.
  • Include proper error handling for authentication failures.

Troubleshoot

IssueSolution
401 UnauthorizedVerify your API key is correct and active
403 ForbiddenCheck your subscription limits in Subscriptions
Rate limit exceededImplement caching and respect the expires header

What next?

Now that you understand authentication, explore our APIs:

  • Core Weather quick-start - Get started with weather data.
  • MinuteCast™ quick-start - Minute-by-minute precipitation forecasts.
  • Best practices - Optimize your API usage.
Last modified on November 25, 2025
AccuWeather APIsBest practices
On this page
  • Get your API key
  • Make authenticated requests
    • Curl example
    • Response format
  • Authentication best practices
    • Secure API keys
    • Request headers
  • Troubleshoot
  • What next?
JSON