{
  "openapi": "3.0.1",
  "info": {
    "title": "EU ETS Installations & Verified Emissions (EUTL)",
    "version": "0.1",
    "x-build-id": "fk1mN17NpAxZCdvap"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rastriq~eu-ets-installations-emissions/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rastriq-eu-ets-installations-emissions",
        "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/rastriq~eu-ets-installations-emissions/runs": {
      "post": {
        "operationId": "runs-sync-rastriq-eu-ets-installations-emissions",
        "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/rastriq~eu-ets-installations-emissions/run-sync": {
      "post": {
        "operationId": "run-sync-rastriq-eu-ets-installations-emissions",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "snapshot",
              "delta"
            ],
            "type": "string",
            "description": "<b>Delta</b> (default when empty): only new, changed and removed installations since your last run; the first run returns everything as <code>baseline</code>.<br><b>Snapshot</b>: everything in scope on every run.",
            "default": "delta"
          },
          "countries": {
            "title": "Countries (registry)",
            "type": "array",
            "description": "Keep only installations of these national registries (2-letter codes, e.g. <code>ES</code>, <code>DE</code>, <code>PL</code>). Empty = all 30+ registries. You can type any other code and press Enter.",
            "items": {
              "type": "string",
              "enumSuggestedValues": [
                "ES",
                "DE",
                "FR",
                "IT",
                "PL",
                "NL",
                "BE",
                "AT",
                "PT",
                "CZ",
                "RO",
                "SE",
                "FI",
                "DK",
                "IE",
                "GR",
                "HU",
                "SK",
                "BG",
                "SI",
                "HR",
                "LT",
                "LV",
                "EE",
                "LU",
                "CY",
                "MT",
                "NO",
                "IS",
                "LI",
                "XI"
              ],
              "enumTitles": [
                "Spain",
                "Germany",
                "France",
                "Italy",
                "Poland",
                "Netherlands",
                "Belgium",
                "Austria",
                "Portugal",
                "Czechia",
                "Romania",
                "Sweden",
                "Finland",
                "Denmark",
                "Ireland",
                "Greece",
                "Hungary",
                "Slovakia",
                "Bulgaria",
                "Slovenia",
                "Croatia",
                "Lithuania",
                "Latvia",
                "Estonia",
                "Luxembourg",
                "Cyprus",
                "Malta",
                "Norway",
                "Iceland",
                "Liechtenstein",
                "Northern Ireland (XI)"
              ]
            }
          },
          "installationTypes": {
            "title": "Installation types",
            "type": "array",
            "description": "Keep only these types of regulated entity. Empty = all types.",
            "items": {
              "type": "string",
              "enum": [
                "stationary_installation",
                "aircraft_operator",
                "maritime_operator",
                "ets2_regulated_entity"
              ],
              "enumTitles": [
                "Stationary installations (plants, factories)",
                "Aircraft operators",
                "Maritime operators (shipping companies)",
                "ETS2 regulated entities (fuel suppliers)"
              ]
            }
          },
          "activityCodes": {
            "title": "Activity codes",
            "type": "array",
            "description": "EUTL activity codes, e.g. <code>20</code> combustion of fuels, <code>29</code> cement clinker, <code>21</code> mineral oil refining, <code>24</code> pig iron or steel, <code>36</code> paper or cardboard. Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "minVerifiedEmissions": {
            "title": "Minimum verified emissions (tCO2e, latest year)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only installations whose latest verified emissions are at least this value. 0 = no minimum.",
            "default": 0
          },
          "includeClosed": {
            "title": "Include closed installations",
            "type": "boolean",
            "description": "Installations with a revoked permit or a final year of emissions. They carry <code>status = closed</code>.",
            "default": true
          },
          "includeHistory": {
            "title": "Include yearly history",
            "type": "boolean",
            "description": "Adds a <code>history</code> array with verified emissions, free allocation, reserve allocation, transitional allocation and surrendered allowances for every year with data (2005 onwards, including already-decided future free allocation). Turn off for a lighter table.",
            "default": true
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many rows (0 = no limit). Rows come sorted by latest verified emissions, largest first. Each row is billed, so this is also your spending cap. Pre-filled with 15 so the first test costs about 4 cents.",
            "default": 0
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Optional name of the change-tracking stream (e.g. <code>spain-steel</code>). Use different keys to keep independent histories. Mainly for delta mode."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}