{
  "openapi": "3.1.0",
  "info": {
    "title": "ClimatePulse API",
    "description": "Global climate and weather intelligence API. Open-Meteo real-time weather + AI synthesis. Severe weather assessment, air quality monitoring, wildfire smoke tracking, agricultural grow-day modeling, climate comparison, event weather planning, and hyper-local forecasts. Covers 195 countries with 1km resolution weather data. Serves individuals, agricultural operators, event planners, outdoor recreation agents, and climate-sensitive businesses. Emergency preparedness, air purifier, solar energy, and outdoor gear affiliates included. All endpoints support any language via ?lang=. Pricing: $0.05\u2013$0.10 USDC/call via x402 micropayment.",
    "version": "1.2.0",
    "contact": {
      "url": "https://climatepulse.theaslangroupllc.com"
    }
  },
  "servers": [
    {
      "url": "https://climatepulse.theaslangroupllc.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "x402": {
        "type": "apiKey",
        "in": "header",
        "name": "PAYMENT-SIGNATURE",
        "description": "x402 payment signature. Omit to receive a 402 with payment requirements."
      }
    }
  },
  "paths": {
    "/api/climate/now": {
      "get": {
        "summary": "Current conditions",
        "description": "What to wear outside right now. Real-time hyperlocal conditions (temperature, feels-like, UV, wind) with an outdoor score, hourly highlights, and Amazon + REI gear recommendations matched to today's weather.",
        "operationId": "climateNow",
        "security": [
          {
            "x402": []
          }
        ],
        "parameters": [
          {
            "name": "location",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "City, address, or lat,lon for current conditions (e.g. Denver, CO)"
          },
          {
            "name": "units",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "imperial",
                "metric"
              ]
            },
            "description": "imperial (\u00b0F, mph, inches) or metric (\u00b0C, km/h, mm); defaults to imperial"
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Response language code (e.g. es, fr, de); defaults to English"
          }
        ],
        "responses": {
          "200": {
            "description": "Current conditions with outdoor score and gear recommendations"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-price-usd": 0.05,
        "x-agent-use-case": "on-demand",
        "x-agent-chaining": "Real-time conditions \u2014 start here for any weather query; chain to /api/climate/forecast for extended outlook; chain to /api/climate/severe for risk assessment"
      }
    },
    "/api/climate/forecast": {
      "get": {
        "summary": "Multi-day forecast",
        "description": "Should I pack a rain jacket for next week? 7-day hyperlocal forecast with a per-day outdoor score, best/worst day identification, a packing list, and Amazon + REI gear recommendations.",
        "operationId": "climateForecast",
        "security": [
          {
            "x402": []
          }
        ],
        "parameters": [
          {
            "name": "location",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "City, address, or lat,lon to forecast"
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 7
            },
            "description": "Number of days ahead to forecast (1\u20137, default 7)"
          },
          {
            "name": "units",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "imperial",
                "metric"
              ]
            },
            "description": "imperial (\u00b0F, mph) or metric (\u00b0C, km/h); defaults to imperial"
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Response language code (e.g. es, fr, de); defaults to English"
          }
        ],
        "responses": {
          "200": {
            "description": "Multi-day forecast with planning insights and gear links"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-price-usd": 0.08,
        "x-agent-use-case": "on-demand",
        "x-agent-chaining": "Extended weather forecast \u2014 chain after /api/climate/now; pairs with BiopPulse /api/bio/migrate for migration timing"
      }
    },
    "/api/climate/activity": {
      "get": {
        "summary": "Activity weather assessment",
        "description": "Is Saturday good for hiking? Go/no-go rating (1-10) for outdoor activities (hiking, skiing, surfing, cycling, camping, running, golf, beach, fishing) with a gear checklist and alternative dates.",
        "operationId": "climateActivity",
        "security": [
          {
            "x402": []
          }
        ],
        "parameters": [
          {
            "name": "location",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "City, address, or lat,lon for the activity"
          },
          {
            "name": "activity",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "hiking",
                "skiing",
                "surfing",
                "cycling",
                "camping",
                "running",
                "golf",
                "beach",
                "fishing"
              ]
            },
            "description": "Activity to assess conditions for"
          },
          {
            "name": "units",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "imperial",
                "metric"
              ]
            },
            "description": "imperial (\u00b0F, mph) or metric (\u00b0C, km/h); defaults to imperial"
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Response language code (e.g. es, fr, de); defaults to English"
          }
        ],
        "responses": {
          "200": {
            "description": "Activity assessment with go/no-go, gear checklist, and alternative dates"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-price-usd": 0.1,
        "x-agent-use-case": "on-demand",
        "x-agent-chaining": "Activity weather suitability \u2014 outdoor gear + AllTrails affiliate links included; pairs with TravelPulse for trip planning"
      }
    },
    "/api/climate/severe": {
      "get": {
        "summary": "Severe weather and preparedness",
        "description": "Should I be worried about the storm headed this way? Threat level assessment, active alerts, a safety timeline, a preparedness checklist with Amazon links, shelter guidance, and emergency contacts.",
        "operationId": "climateSevere",
        "security": [
          {
            "x402": []
          }
        ],
        "parameters": [
          {
            "name": "location",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "City, address, or lat,lon to assess for severe weather"
          },
          {
            "name": "units",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "imperial",
                "metric"
              ]
            },
            "description": "imperial (\u00b0F, mph) or metric (\u00b0C, km/h); defaults to imperial"
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Response language code (e.g. es, fr, de); defaults to English"
          }
        ],
        "responses": {
          "200": {
            "description": "Severe weather assessment with preparedness guide and emergency contacts"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-price-usd": 0.08,
        "x-agent-use-case": "on-demand",
        "x-agent-chaining": "Severe weather assessment \u2014 emergency prep affiliate links auto-appended; chain to /api/climate/forecast for forward-looking timeline"
      }
    },
    "/api/climate/compare": {
      "get": {
        "summary": "Location climate comparison",
        "description": "Miami or Denver for a trip? Side-by-side weather comparison for 2\u20134 locations with per-location outdoor scores, pros/cons, week outlooks, and recommendations for vacation, relocation, or outdoor sports.",
        "operationId": "climateCompare",
        "security": [
          {
            "x402": []
          }
        ],
        "parameters": [
          {
            "name": "locations",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated list of 2\u20134 locations (e.g. Miami,Seattle,Denver)"
          },
          {
            "name": "purpose",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comparison purpose (e.g. vacation, relocation, sports)"
          },
          {
            "name": "units",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "imperial",
                "metric"
              ]
            },
            "description": "imperial (\u00b0F, mph) or metric (\u00b0C, km/h); defaults to imperial"
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Response language code (e.g. es, fr, de); defaults to English"
          }
        ],
        "responses": {
          "200": {
            "description": "Climate comparison with rankings, per-location breakdown, and recommendations"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-price-usd": 0.1,
        "x-agent-use-case": "on-demand",
        "x-agent-chaining": "Climate comparison between cities/regions \u2014 pairs with TravelPulse for relocation or travel planning; solar potential included"
      }
    },
    "/api/climate/air": {
      "get": {
        "summary": "Real-time air quality + health risk assessment",
        "description": "Is it safe to exercise outside today? Real-time AQI with primary-pollutant breakdown (PM2.5, PM10, ozone), activity guidance by population group, N95/air-purifier recommendations, and condition-specific guidance for asthma, COPD, heart disease, pregnancy, and kids.",
        "x-agent-use-case": "on-demand",
        "x-price-usd": 0.05,
        "x-agent-chaining": "Air quality monitoring \u2014 chain to /api/climate/smoke for wildfire-source attribution; air purifier + N95 mask affiliates auto-appended",
        "parameters": [
          {
            "name": "location",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "City, address, or lat,lon to check air quality for"
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Response language code (e.g. es, fr, de); defaults to English"
          }
        ],
        "security": [
          {
            "x402Payment": []
          }
        ],
        "responses": {
          "200": {
            "description": "Air quality data with health guidance and affiliate links"
          }
        }
      }
    },
    "/api/climate/smoke": {
      "get": {
        "summary": "Wildfire smoke tracking and respiratory risk assessment",
        "description": "Is wildfire smoke affecting the air here right now? Smoke tracker with an AQI estimate, nearby active fires, health risk level, mask and indoor-air guidance, and evacuation status for any location.",
        "x-agent-use-case": "on-demand",
        "x-price-usd": 0.05,
        "x-agent-chaining": "Wildfire smoke tracking \u2014 chain after /api/climate/air for source attribution; emergency prep + air quality affiliates included",
        "parameters": [
          {
            "name": "location",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "City, address, or lat,lon to check for wildfire smoke"
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Response language code (e.g. es, fr, de); defaults to English"
          }
        ],
        "security": [
          {
            "x402Payment": []
          }
        ],
        "responses": {
          "200": {
            "description": "Smoke forecast with emergency preparedness affiliate links"
          }
        }
      }
    },
    "/api/climate/grow": {
      "get": {
        "summary": "Growing-season intelligence and frost date analysis",
        "description": "What can I plant right now? USDA hardiness zone, last/first frost dates, and a planting calendar (what to plant now, start indoors, or plan for the next 4 weeks) with frost-protection and season-extension tips.",
        "x-agent-use-case": "on-demand",
        "x-price-usd": 0.08,
        "x-agent-chaining": "Growing-season intelligence \u2014 chain with HarvestPulse for full crop planning; USDA zone + frost date + planting calendar",
        "parameters": [
          {
            "name": "location",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "City, address, or lat,lon to generate a growing calendar for"
          },
          {
            "name": "crop",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Specific crop or plant to tailor advice for (e.g. tomatoes, kale)"
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Response language code (e.g. es, fr, de); defaults to English"
          }
        ],
        "security": [
          {
            "x402Payment": []
          }
        ],
        "responses": {
          "200": {
            "description": "Grow-day model with planting recommendations"
          }
        }
      }
    },
    "/api/climate/event": {
      "get": {
        "summary": "Event weather suitability and planning assessment",
        "description": "What are the odds of rain at my outdoor wedding on a given date? Historical weather probability (not a forecast) \u2014 rain/heat/frost odds, a risk level, and contingency-planning guidance for weddings, marathons, and festivals.",
        "x-agent-use-case": "on-demand",
        "x-price-usd": 0.08,
        "x-agent-chaining": "Event weather planning \u2014 covers outdoor events, sports, gatherings; pairs with StatEdge for sports event weather",
        "parameters": [
          {
            "name": "location",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "City, address, or lat,lon for the event"
          },
          {
            "name": "date",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Target event date (YYYY-MM-DD)"
          },
          {
            "name": "event_type",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Event type \u2014 tailors the guidance (e.g. wedding, marathon, outdoor-festival, camping)"
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Response language code (e.g. es, fr, de); defaults to English"
          }
        ],
        "security": [
          {
            "x402Payment": []
          }
        ],
        "responses": {
          "200": {
            "description": "Event weather suitability with outdoor gear affiliate links"
          }
        }
      }
    }
  }
}
