{
  "openapi": "3.0.1",
  "info": {
    "title": "Canada GHGRP Facility Greenhouse Gas Emissions",
    "description": "Clean, structured facility greenhouse gas emissions from Canada's Greenhouse Gas Reporting Program (GHGRP, ECCC), 2004 to latest. CO2, CH4, N2O, HFCs, PFCs and SF6 in tonnes and CO2e per facility per year. Filter by year, province, company, NAICS, gas, minimum CO2e or distance. Open Government…",
    "version": "1.0",
    "x-build-id": "U8KQzvE9O5LaVduQp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/likable_washbowl~canada-ghgrp-facility-emissions/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-likable_washbowl-canada-ghgrp-facility-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/likable_washbowl~canada-ghgrp-facility-emissions/runs": {
      "post": {
        "operationId": "runs-sync-likable_washbowl-canada-ghgrp-facility-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/likable_washbowl~canada-ghgrp-facility-emissions/run-sync": {
      "post": {
        "operationId": "run-sync-likable_washbowl-canada-ghgrp-facility-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": {
          "reportYear": {
            "title": "Reporting year",
            "enum": [
              "latest",
              "all",
              "2024",
              "2023",
              "2022",
              "2021",
              "2020",
              "2019",
              "2018",
              "2017",
              "2016",
              "2015",
              "2014",
              "2013",
              "2012",
              "2011",
              "2010",
              "2009",
              "2008",
              "2007",
              "2006",
              "2005",
              "2004"
            ],
            "type": "string",
            "description": "GHGRP reporting year. <b>latest</b> picks the newest year in ECCC's file (read live, so new years appear automatically). <b>all</b> returns every year from 2004, which is handy for trends (combine with a company, facility ID or province filter).",
            "default": "latest"
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many records (one record = one facility x one reporting year). Each record is one billable result.",
            "default": 50
          },
          "sortBy": {
            "title": "Order",
            "enum": [
              "co2eDesc",
              "fileOrder"
            ],
            "type": "string",
            "description": "<b>Largest emitters first</b> ranks rows by total emissions in tonnes CO2e. <b>File order</b> streams rows in the order of the ECCC file and is fastest for small samples.",
            "default": "co2eDesc"
          },
          "provinces": {
            "title": "Provinces / territories",
            "type": "array",
            "description": "Only return facilities in these provinces or territories. Leave empty for all of Canada.",
            "items": {
              "type": "string",
              "enum": [
                "AB",
                "BC",
                "MB",
                "NB",
                "NL",
                "NS",
                "NT",
                "NU",
                "ON",
                "PE",
                "QC",
                "SK",
                "YT"
              ],
              "enumTitles": [
                "Alberta",
                "British Columbia",
                "Manitoba",
                "New Brunswick",
                "Newfoundland and Labrador",
                "Nova Scotia",
                "Northwest Territories",
                "Nunavut",
                "Ontario",
                "Prince Edward Island",
                "Quebec",
                "Saskatchewan",
                "Yukon"
              ]
            }
          },
          "keywords": {
            "title": "Company / facility keywords",
            "type": "array",
            "description": "Case-insensitive. A row matches if ANY keyword appears in the reporting company legal or trade name, facility name or city (e.g. <code>Suncor</code>, <code>Dofasco</code>, <code>Fort McMurray</code>).",
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "Industry (NAICS code prefixes)",
            "type": "array",
            "description": "Only facilities whose 6-digit NAICS code starts with one of these, e.g. <code>2111</code> (oil & gas extraction), <code>2211</code> (electric power generation), <code>3311</code> (iron & steel), <code>3273</code> (cement & concrete), <code>3251</code> (basic chemicals), <code>5622</code> (waste treatment & disposal).",
            "items": {
              "type": "string"
            }
          },
          "ghgrpIds": {
            "title": "GHGRP facility IDs",
            "type": "array",
            "description": "Only these GHGRP IDs (e.g. <code>G10187</code>). Handy for tracking a watch-list of facilities across years.",
            "items": {
              "type": "string"
            }
          },
          "gases": {
            "title": "Gas types (must be reported)",
            "type": "array",
            "description": "Only facilities that reported a non-zero quantity of ALL selected gases. Useful for finding SF6 or PFC emitters (e.g. aluminium smelters), HFC users, or methane-heavy sites. Every row still includes the full gas breakdown.",
            "items": {
              "type": "string",
              "enum": [
                "CO2",
                "CH4",
                "N2O",
                "HFC",
                "PFC",
                "SF6"
              ],
              "enumTitles": [
                "Carbon dioxide (CO2)",
                "Methane (CH4)",
                "Nitrous oxide (N2O)",
                "Hydrofluorocarbons (HFCs)",
                "Perfluorocarbons (PFCs)",
                "Sulphur hexafluoride (SF6)"
              ]
            }
          },
          "minTotalCo2eTonnes": {
            "title": "Minimum total emissions (tonnes CO2e)",
            "minimum": 0,
            "type": "number",
            "description": "Only rows whose total emissions (tonnes CO2e, excluding CO2 from biomass) are at least this value, e.g. <code>100000</code>."
          },
          "nearLatitude": {
            "title": "Near latitude",
            "type": "number",
            "description": "Optional proximity search: latitude (WGS84 decimal degrees) of your site. Use together with longitude and radius. Facilities without coordinates (all rows before 2017) are skipped."
          },
          "nearLongitude": {
            "title": "Near longitude",
            "type": "number",
            "description": "Longitude (WGS84 decimal degrees, negative in Canada), e.g. -79.85."
          },
          "radiusKm": {
            "title": "Radius (km)",
            "minimum": 0.1,
            "maximum": 1000,
            "type": "number",
            "description": "Search radius around the point, in kilometres.",
            "default": 25
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}