{
  "openapi": "3.0.1",
  "info": {
    "title": "Heating & Cooling Degree Days for Any Address - No API Key",
    "description": "Energy bills track the weather. Give addresses or lat/lng and a base temperature, get heating and cooling degree days for any period from NASA POWER (worldwide, no key), plus an optional kWh-vs-HDD regression for M&V and energy reports.",
    "version": "1.0",
    "x-build-id": "K2bVbVJZVbrZmRhRQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/that_red_bird~degree-days-by-location/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-that_red_bird-degree-days-by-location",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/that_red_bird~degree-days-by-location/runs": {
      "post": {
        "operationId": "runs-sync-that_red_bird-degree-days-by-location",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/that_red_bird~degree-days-by-location/run-sync": {
      "post": {
        "operationId": "run-sync-that_red_bird-degree-days-by-location",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "Street addresses, place names, or coordinates written as \"lat,lng\" (for example \"40.7128,-74.0060\"). Addresses are geocoded with OpenStreetMap Nominatim at 1 request per second; coordinates skip geocoding entirely.",
            "default": [
              "40.7128,-74.0060",
              "51.5074,-0.1278"
            ],
            "items": {
              "type": "string"
            }
          },
          "startDate": {
            "title": "Start date",
            "type": "string",
            "description": "First day of the period, YYYY-MM-DD. NASA POWER daily data starts in 1981.",
            "default": "2024-01-01"
          },
          "endDate": {
            "title": "End date",
            "type": "string",
            "description": "Last day of the period, YYYY-MM-DD. Dates in the future or in the last few days (not yet published by NASA) are reported as missing days.",
            "default": "2024-12-31"
          },
          "unit": {
            "title": "Temperature unit",
            "enum": [
              "F",
              "C"
            ],
            "type": "string",
            "description": "F gives degree-days in Fahrenheit (US convention, base 65 F). C gives degree-days in Celsius (base 15.5 or 18 C are common in Europe).",
            "default": "F"
          },
          "baseTemperature": {
            "title": "Heating base temperature",
            "type": "integer",
            "description": "Balance-point temperature for heating degree days, in the unit chosen above. A day colder than this adds (base - daily mean) to the HDD total.",
            "default": 65
          },
          "coolingBaseTemperature": {
            "title": "Cooling base temperature",
            "type": "integer",
            "description": "Balance-point temperature for cooling degree days, in the unit chosen above. A day warmer than this adds (daily mean - base) to the CDD total.",
            "default": 65
          },
          "includeMonthly": {
            "title": "Include monthly breakdown",
            "type": "boolean",
            "description": "Add a month-by-month HDD/CDD array to every location row. Needed for the regression.",
            "default": true
          },
          "includeDaily": {
            "title": "Include daily values",
            "type": "boolean",
            "description": "Add the daily mean temperature, HDD and CDD for every day to the location row. Makes rows larger; the price per location does not change.",
            "default": false
          },
          "consumption": {
            "title": "Energy consumption for regression (optional)",
            "type": "array",
            "description": "Monthly energy use to regress against degree days, as a list like [{\"period\":\"2024-01\",\"kwh\":18200},...]. Add \"location\" (same text as in Locations) when you have several sites; without it the data is applied to the first location. Needs at least 4 months. Each fitted model is billed as one regression-fit event.",
            "default": []
          },
          "regressionUseCooling": {
            "title": "Regression uses CDD as well",
            "type": "boolean",
            "description": "Fit consumption = baseload + a x HDD + b x CDD instead of HDD only. Use for buildings with electric cooling. Needs at least 6 months.",
            "default": false
          },
          "contactEmail": {
            "title": "Contact e-mail for geocoder (optional)",
            "type": "string",
            "description": "Sent in the User-Agent to Nominatim as its usage policy asks. Leave empty to use the Actor's default contact.",
            "default": ""
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}