Recipes
Recipes are interactive, end-to-end walkthroughs that show you exactly how to accomplish common weather data tasks with the AccuWeather Enterprise API. Each recipe walks through the full request-response cycle with working code examples in multiple languages.
These recipes are teaching examples — not production code.
- Host: examples use the development host apidev.accuweather.com. Switch to api.accuweather.com for production.
- Production hardening: GZIP compression, caching, retries with exponential backoff, and error handling are not included. See the Best Practices guide.
What's a recipe?
Unlike reference documentation, recipes are goal-oriented. They start with a real-world scenario, guide you through the necessary API calls step by step, explain the key response fields, and highlight common pitfalls.
Prerequisites
All recipes assume you have:
- An API key — contact sales@accuweather.com to obtain one
- Basic HTTP knowledge — familiarity with REST APIs and JSON responses
- A location key — most weather endpoints require an AccuWeather
LocationKey; see the Location Search recipe if you don't have one yet
Every recipe uses {YOUR_API_KEY} as a placeholder. Substitute your real API key before running any request.
Available recipes
Find a LocationKey for any city, postal code, or point of interest.
Fetch real-time temperature, weather phrase, and precipitation data.
Retrieve 1–12 hour-by-hour forecasts with precipitation probabilities.
Get daily high/low temperatures and day/night summaries.
Search for recent lightning strikes near a location.
Check lightning probability for the next 2 hours.
Look up past lightning strikes for a specific date.