AccuWeather

AccuWeather

Weather

Get accurate weather forecasts, current conditions, and severe weather alerts with the AccuWeather API. Access hourly, daily, and historical weather data for any location worldwide.

Visit API🔁 Alternatives

📚 Documentation & Examples

Everything you need to integrate with AccuWeather

🚀 Quick Start Examples

AccuWeather Javascript Examplejavascript
// AccuWeather API Example
const response = await fetch('https://developer.accuweather.com/apis', {
    method: 'GET',
    headers: {
        'Content-Type': 'application/json'
    }
});

const data = await response.json();
console.log(data);

AccuWeather API

The AccuWeather API provides developers with access to the world's most accurate weather forecasting service. With over 50 years of forecasting experience and proprietary Superior Accuracy technology, AccuWeather delivers hyperlocal weather data trusted by millions of users and businesses worldwide.

Key Features

  1. Current Conditions - Real-time weather data including temperature, humidity, wind, UV index, and visibility
  2. Hourly Forecasts - Hour-by-hour weather predictions for up to 120 hours
  3. Daily Forecasts - Extended forecasts up to 45 days in advance
  4. Severe Weather Alerts - Government-issued alerts and AccuWeather's proprietary MinuteCast precipitation forecasts
  5. Historical Data - Access past weather observations for analysis and comparison

Free Tier

AccuWeather offers a free tier with:

  • 50 API calls per day
  • Current conditions and 5-day forecasts
  • Location search functionality

Authentication

AccuWeather uses API key authentication. Sign up at the AccuWeather Developer Portal to get your free API key.

JavaScript Example

const axios = require('axios');

const API_KEY = 'YOUR_ACCUWEATHER_API_KEY';
const BASE_URL = 'http://dataservice.accuweather.com';

// Get location key for a city
async function getLocationKey(city) {
  const response = await axios.get(
    `${BASE_URL}/locations/v1/cities/search`,
    { params: { apikey: API_KEY, q: city } }
  );
  return response.data[0]?.Key;
}

// Get current weather conditions
async function getCurrentConditions(locationKey) {
  const response = await axios.get(
    `${BASE_URL}/currentconditions/v1/${locationKey}`,
    { params: { apikey: API_KEY, details: true } }
  );
  return response.data[0];
}

// Get 5-day forecast
async function getFiveDayForecast(locationKey) {
  const response = await axios.get(
    `${BASE_URL}/forecasts/v1/daily/5day/${locationKey}`,
    { params: { apikey: API_KEY, metric: true } }
  );
  return response.data;
}

// Usage example
async function getWeather(city) {
  const locationKey = await getLocationKey(city);
  const current = await getCurrentConditions(locationKey);
  const forecast = await getFiveDayForecast(locationKey);
  
  console.log(`Current temperature in ${city}: ${current.Temperature.Metric.Value}°C`);
  console.log(`Conditions: ${current.WeatherText}`);
  console.log('5-Day Forecast:', forecast.DailyForecasts.map(d => 
    `${d.Date.split('T')[0]}: ${d.Temperature.Minimum.Value}°-${d.Temperature.Maximum.Value}°C`
  ));
}

getWeather('New York');

Python Example

import requests

API_KEY = 'YOUR_ACCUWEATHER_API_KEY'
BASE_URL = 'http://dataservice.accuweather.com'

def get_location_key(city):
    url = f'{BASE_URL}/locations/v1/cities/search'
    params = {'apikey': API_KEY, 'q': city}
    response = requests.get(url, params=params)
    data = response.json()
    return data[0]['Key'] if data else None

def get_current_conditions(location_key):
    url = f'{BASE_URL}/currentconditions/v1/{location_key}'
    params = {'apikey': API_KEY, 'details': 'true'}
    response = requests.get(url, params=params)
    return response.json()[0]

def get_five_day_forecast(location_key):
    url = f'{BASE_URL}/forecasts/v1/daily/5day/{location_key}'
    params = {'apikey': API_KEY, 'metric': 'true'}
    response = requests.get(url, params=params)
    return response.json()

# Usage
location_key = get_location_key('London')
current = get_current_conditions(location_key)
print(f"Temperature: {current['Temperature']['Metric']['Value']}°C")
print(f"Conditions: {current['WeatherText']}")

cURL Example

# Search for a location
curl "http://dataservice.accuweather.com/locations/v1/cities/search?apikey=YOUR_API_KEY&q=Paris"

# Get current conditions
curl "http://dataservice.accuweather.com/currentconditions/v1/LOCATION_KEY?apikey=YOUR_API_KEY&details=true"

# Get 5-day forecast
curl "http://dataservice.accuweather.com/forecasts/v1/daily/5day/LOCATION_KEY?apikey=YOUR_API_KEY&metric=true"

Use Cases

  • Travel Apps - Show weather at destinations
  • Event Planning - Outdoor event weather forecasting
  • Agriculture - Crop management and irrigation planning
  • Logistics - Route planning based on weather conditions
  • Smart Home - Automated climate control systems

Get Your Free API Key →

📊 30-Day Uptime History

Daily uptime tracking showing online vs offline minutes

Jan 6Jan 8Jan 10Jan 12Jan 14Jan 16Jan 18Jan 20Jan 22Jan 24Jan 26Jan 28Jan 30Feb 1Feb 404008001440Minutes
Online
Offline

Related APIs in Weather