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

Best practices

Use GZIP compression

Compression reduces the amount of data being transferred and improves data request speed. Add HTTP headers to enable GZIP compression.

Curl

Code
curl -H "Authorization: Bearer {API_KEY}" \ -H "Accept-Encoding: gzip,deflate" \ "https://dataservice.accuweather.com/locations/v1/search?q=san"
  • Without compression: 17,695 bytes
  • With compression: 2,958 bytes
  • Size reduction of 83%

TypeScript

Code
const url = "https://dataservice.accuweather.com/locations/v1/search?q=new york"; const options = { method: "GET", headers: { "Authorization": "Bearer {API_KEY}", "Accept-Encoding": "gzip" }, }; fetch(url, options) .then((response) => { ... });

Randomize refresh rates

Randomize individual device refresh rates so that devices refresh at different clock times. Requesting updates on all devices at consistent times will overload the system.

Use the expires header

Refresh information from the AccuWeather APIs for your device based upon the cache expires time in the response headers. In the example below, refresh on Thursday, August 30th, 2012 at 14:56:34 GMT.

Code
Response Headers Cache-Control: public Content-Encoding: gzip Content-Type: application/json; charset=utf-8 Date: Wed, 29 Aug 2012 14:55:33 GMT Expires: Thu, 30 Aug 2012 14:56:34 GMT Server: Microsoft-IIS/7.5 Server: Microsoft-IIS/7.0 Transfer-Encoding: chunked Vary: Accept-Encoding X-AspNet-Version: 4.0.30319 X-Powered-By: ASP.NET

Timezone offset changes for daylight saving time

If you intend to use the GMTOffset from the Location API response to calculate times local to the location, you MUST be careful to observe the NextOffsetChange property. The offset will change on the date and time specified. Using the expires header as described above will ensure that you have the most current GMTOffset for the location.

Use HTTPS Only

HTTPS encrypts traffic between the client and AccuWeather servers, preventing data leaks, interception, and tampering.

Always call our APIs using the documented HTTPS endpoints.

Redirects

We may temporarily support HTTP by automatically upgrading the connection to HTTPS for backward compatibility.

This behavior is not guaranteed long-term and should not be relied upon.

Please update integrations to use HTTPS endpoints exclusively.

Last modified on November 25, 2025
AuthenticationAPI flow diagram
On this page
  • Use GZIP compression
    • Curl
    • TypeScript
  • Randomize refresh rates
  • Use the expires header
  • Timezone offset changes for daylight saving time
  • Use HTTPS Only
  • Redirects
TypeScript