{
  "openapi": "3.0.1",
  "info": {
    "title": "Building ESG API - Carbon, Energy, Certifications",
    "description": "Building ESG and decarbonisation data: portfolios and funds, buildings with floor area, type and ownership share, energy, water and waste meters and their readings, green building certifications and ratings, and modelled carbon and energy estimates with building performance ordinances.",
    "version": "0.1",
    "x-build-id": "jESHsH3kwXTrwuZsf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~building-esg-carbon-data-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-building-esg-carbon-data-api",
        "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/nabeelbaghoor~building-esg-carbon-data-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-building-esg-carbon-data-api",
        "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/nabeelbaghoor~building-esg-carbon-data-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-building-esg-carbon-data-api",
        "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": {
          "dataset": {
            "title": "What to read",
            "enum": [
              "portfolios",
              "buildings",
              "meters",
              "wasteMeters",
              "meterReadings",
              "certifications",
              "certificationTypes",
              "ratings",
              "buildingRatings",
              "buildingSpaces",
              "funds",
              "insightsBuildings",
              "carbonEstimates",
              "energyEstimates",
              "certificationLookups",
              "ordinanceLookups",
              "ordinances",
              "listedRealEstateReports",
              "partnerPortfolios",
              "partnerBuildings",
              "partnerUtilityData"
            ],
            "type": "string",
            "description": "Which dataset to collect. Start with portfolios to get the portfolio ID that most of the other datasets need. Buildings, meters and readings are the reported data; carbon and energy estimates, certification lookups and ordinance lookups are the modelled asset level data.",
            "default": "portfolios"
          },
          "portfolioId": {
            "title": "Portfolio ID",
            "type": "string",
            "description": "The portfolio or fund UUID most datasets read from. Run the portfolios dataset first to get it. A fund ID works anywhere a portfolio ID does."
          },
          "buildingId": {
            "title": "Building ID",
            "type": "string",
            "description": "The building UUID, for the datasets that read one building: meter readings, building ratings, building spaces and partner utility data."
          },
          "meterId": {
            "title": "Meter ID",
            "type": "string",
            "description": "The meter UUID, for the meter readings dataset. Run the meters dataset on the portfolio to find it."
          },
          "filter": {
            "title": "Filter expression",
            "type": "string",
            "description": "The provider's own filter expression, passed through as written. For example updatedAt=ge=2022-11-01 returns only records changed since that date. Only the portfolio datasets accept it; on the others the actor says so in the log rather than sending a filter the provider would silently ignore."
          },
          "startDate": {
            "title": "Start date",
            "type": "string",
            "description": "First month to include, as YYYY-MM-DD, for the partner monthly utility dataset."
          },
          "endDate": {
            "title": "End date",
            "type": "string",
            "description": "Last month to include, as YYYY-MM-DD, for the partner monthly utility dataset."
          },
          "pageSize": {
            "title": "Records per request",
            "type": "integer",
            "description": "How many records to ask for per request. The provider caps this at 200, and the actor clamps to that. This API spells the page size two different ways across its products, and the actor sends whichever spelling the chosen dataset accepts, because the wrong one is ignored rather than rejected and would quietly return only a default page.",
            "default": 100
          },
          "maxResults": {
            "title": "Maximum rows",
            "type": "integer",
            "description": "Stop after this many rows. Counts every row the run collects.",
            "default": 100
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "type": "integer",
            "description": "How fast to call the provider. The default of 120 is two a second. The provider publishes throughput guidance per dataset, so lower this if you are reading estimates in bulk.",
            "default": 120
          },
          "apiKey": {
            "title": "API key",
            "type": "string",
            "description": "Your own account key, issued by the provider to your organisation. Exchanged with the secret below for a token that lasts a day. Stored encrypted and never written into the dataset. Can also be supplied as the DATA_API_KEY environment secret."
          },
          "apiSecret": {
            "title": "API secret",
            "type": "string",
            "description": "The secret issued together with the key. Both are needed: the pair is exchanged for a bearer token at the start of the run. Stored encrypted and never written into the dataset. Can also be supplied as the DATA_API_SECRET environment secret."
          },
          "baseUrl": {
            "title": "API host",
            "type": "string",
            "description": "Overrides the host the API is called on. Leave empty unless the provider has given you a different one."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}