MagicWeather API

Integrate powerful weather data into your applications

Getting Started

The MagicWeather API provides developers with programmatic access to our comprehensive weather data, forecasts, and alerts. Follow these steps to get started:

  1. Sign up for a MagicWeather developer account
  2. Generate an API key from your dashboard
  3. Choose the endpoints you need for your application
  4. Make requests using your API key for authentication

Base URL

https://api.magic-weather.com/v1

Current Weather Endpoint

Get real-time weather data for a specific location

Request

GET /current?lat={lat}&lon={lon}

Parameters:

  • lat - Latitude (required)
  • lon - Longitude (required)
  • units - Units of measurement (optional, defaults to "metric")

Response

{
  "coord": {
    "lon": -74.006,
    "lat": 40.7128
  },
  "weather": [
    {
      "id": 800,
      "main": "Clear",
      "description": "clear sky",
      "icon": "01d"
    }
  ],
  "main": {
    "temp": 22.3,
    "feels_like": 21.8,
    "temp_min": 20.9,
    "temp_max": 23.1,
    "pressure": 1015,
    "humidity": 65
  },
  "wind": {
    "speed": 3.6,
    "deg": 160
  },
  "dt": 1632225600,
  "sys": {
    "country": "US",
    "sunrise": 1632216610,
    "sunset": 1632260720
  },
  "name": "New York",
  "cod": 200
}

API Pricing

Free

$0/month

  • 1,000 API calls per day
  • Current weather
  • 5-day forecast
  • Basic alerts
  • Standard support

Enterprise

Custom/month

  • Unlimited API calls
  • Full data access
  • 30-day forecast
  • Custom integrations
  • Dedicated support