{
  "name": "Earnings API",
  "baseUrl": "https://api.earningsapi.com",
  "auth": {
    "type": "apiKey",
    "in": "query",
    "name": "apikey",
    "appendRule": "Use ?apikey=YOUR_API_KEY when there is no query string; use &apikey=YOUR_API_KEY when a query string already exists."
  },
  "supportedEnvironments": [
    "Python requests or httpx",
    "Node.js fetch",
    "cURL",
    "n8n HTTP Request node",
    "Google Apps Script / Sheets",
    "Go net/http"
  ],
  "endpoints": [
    {
      "id": "calendar-earnings",
      "operationId": "getEarningsCalendar",
      "method": "GET",
      "path": "/v1/calendar/earnings",
      "requiredParams": ["date"],
      "useWhen": ["earnings by date", "historical backfill", "daily sync", "upcoming earnings for a day"],
      "avoidWhen": ["one company earnings history", "symbol-only watchlist lookup"]
    },
    {
      "id": "earnings",
      "operationId": "getCompanyEarnings",
      "method": "GET",
      "path": "/v1/earnings",
      "requiredParams": ["symbol"],
      "useWhen": ["one company earnings history", "next earnings date for a symbol", "watchlist symbol loop"],
      "avoidWhen": ["all companies reporting on a date"]
    },
    {
      "id": "earnings-reactions",
      "operationId": "getEarningsReactions",
      "method": "GET",
      "path": "/v1/earnings-reactions",
      "requiredParams": ["symbol"],
      "useWhen": ["post-earnings reaction", "EPS beat or miss", "revenue beat or miss", "price reaction after report"],
      "avoidWhen": ["calendar-only schedule"]
    },
    {
      "id": "earnings-movers",
      "operationId": "getEarningsMovers",
      "method": "GET",
      "path": "/v1/earnings-movers",
      "requiredParams": ["date"],
      "useWhen": ["earnings winners and losers", "first trading day post-earnings movers", "daily movers digest"],
      "avoidWhen": ["all earnings announcements"]
    },
    {
      "id": "calendar-economic",
      "operationId": "getEconomicCalendar",
      "method": "GET",
      "path": "/v1/calendar/economic",
      "requiredParams": ["date"],
      "optionalParams": ["usmajor"],
      "useWhen": ["macro calendar", "economic events", "US major indicators"],
      "avoidWhen": ["earnings calendar"]
    },
    {
      "id": "profile",
      "operationId": "getCompanyProfile",
      "method": "GET",
      "path": "/v1/profile/{symbol}",
      "requiredParams": ["symbol"],
      "useWhen": ["sector enrichment", "market cap enrichment", "company metadata", "symbol profile"],
      "avoidWhen": ["earnings date lookup only"]
    },
    {
      "id": "market-status",
      "operationId": "getMarketStatus",
      "method": "GET",
      "path": "/v1/market-status",
      "requiredParams": [],
      "useWhen": ["is market open", "current market status", "scheduler should run now"],
      "avoidWhen": ["full holiday schedule"]
    },
    {
      "id": "market-holidays",
      "operationId": "getMarketHolidays",
      "method": "GET",
      "path": "/v1/market-holidays",
      "requiredParams": [],
      "useWhen": ["market holiday schedule", "early close days", "holiday-aware scheduler"],
      "avoidWhen": ["current market session state"]
    }
  ],
  "workflows": [
    "Earnings Calendar Backfill + Daily Sync",
    "Watchlist Earnings Monitor",
    "n8n Earnings Alert Workflow",
    "Google Sheets / Apps Script Calendar Sync",
    "Post-Earnings Reaction Screener",
    "Daily Earnings Movers Digest",
    "Macro Calendar Filter",
    "Profile Enrichment Join",
    "Market Status / Holiday-Aware Scheduler"
  ]
}
