{
  "openapi": "3.0.1",
  "info": {
    "title": "EPA GHGRP Emitter Screener — Facility CO2e, Gases & Trend",
    "description": "Every large US greenhouse-gas emitter from EPA GHGRP, on EPA’s own basis: direct CO2e excluding biogenic, with supplier volume and injected CO2 kept separate. Per-gas split (CO2/CH4/N2O/fluorinated), subparts, parent company, YoY delta, multi-year trend, rank and proximity mode. Keyless.",
    "version": "1.1",
    "x-build-id": "sRUFaje1lb18EqGfT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/malonestar~epa-ghgrp-emitter-screener/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-malonestar-epa-ghgrp-emitter-screener",
        "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/malonestar~epa-ghgrp-emitter-screener/runs": {
      "post": {
        "operationId": "runs-sync-malonestar-epa-ghgrp-emitter-screener",
        "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/malonestar~epa-ghgrp-emitter-screener/run-sync": {
      "post": {
        "operationId": "run-sync-malonestar-epa-ghgrp-emitter-screener",
        "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": {
          "states": {
            "title": "States",
            "type": "array",
            "description": "US states to pull GHGRP direct-emitter facilities for. Accepts 2-letter codes (e.g. \"WY\", \"TX\") OR full names (e.g. \"Wyoming\"). This is the primary (inventory) input — one dataset row per facility. Leave assets empty to run in inventory mode.",
            "default": [
              "Wyoming"
            ],
            "items": {
              "type": "string"
            }
          },
          "startYear": {
            "title": "Prior year (YoY baseline)",
            "minimum": 2010,
            "maximum": 2100,
            "type": "integer",
            "description": "The earlier reporting year used as the year-over-year baseline. GHGRP data currently runs through reporting year 2023; 2024 is not yet published. Default 2022.",
            "default": 2022
          },
          "endYear": {
            "title": "Latest year (ranking + delta)",
            "minimum": 2010,
            "maximum": 2100,
            "type": "integer",
            "description": "The later reporting year used for the headline CO2e total, the top-emitter ranking, and the YoY delta (endYear minus startYear). Latest confirmed available = 2023. Default 2023.",
            "default": 2023
          },
          "naicsPrefix": {
            "title": "NAICS prefix filter (optional)",
            "type": "string",
            "description": "Optional. Keep only facilities whose 6-digit NAICS industry code starts with this prefix. E.g. \"2211\" = electric power generation, \"325\" = chemical manufacturing, \"3241\" = petroleum refineries, \"2111\" = oil & gas extraction. Leave blank for all industries."
          },
          "minCo2e": {
            "title": "Minimum latest-year CO2e (metric tons)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Only emit facilities whose latest-year total CO2e (metric tons) is at least this value. Default 0 (all reporting facilities). Set e.g. 250000 to see only the largest emitters.",
            "default": 0
          },
          "assets": {
            "title": "Assets for proximity mode (optional)",
            "type": "array",
            "description": "Optional proximity mode. Provide a list of locations, each {\"lat\": <number>, \"lon\": <number>, \"radiusMiles\": <number, default 25>, \"label\": \"...\"}. When present, the actor instead emits ONE row per asset: how many GHGRP emitters fall within the radius, their total CO2e, and the nearest emitter. Emitters are still drawn from the states you list, so include the relevant state(s). Leave empty for the default inventory-by-state mode."
          },
          "directEmittersOnly": {
            "title": "Direct emitters only",
            "type": "boolean",
            "description": "Drop facilities that only report as SUPPLIERS of fuels or industrial gases (their CO2e is burned downstream by customers, not emitted on site) and keep only facilities with their own reported direct emissions. Default false, which keeps suppliers in the results but reports their volume on latest_year_supplier_co2e_tonnes and leaves latest_year_co2e_tonnes null.",
            "default": false
          },
          "includeTrend": {
            "title": "Include multi-year trend",
            "type": "boolean",
            "description": "Fetch EVERY reporting year between startYear and endYear (not just the two boundary years) and add trend_years_json, trend_change_pct and trend_cagr_pct to each row. Costs one extra national scan per additional year, so a 2010-2023 trend takes noticeably longer. Default false.",
            "default": false
          },
          "includeWithheldReporters": {
            "title": "Include facilities with no published CO2e",
            "type": "boolean",
            "description": "EPA files a placeholder row for facilities that are on the books for a reporting year but whose CO2e value it does not publish (97 of Wyoming's 169 RY2023 records). They carry no tonnage, so by default they are neither emitted nor billed. Set true to receive them with null tonnages, latest_year_value_withheld=true, and their role, subparts and location intact.",
            "default": false
          },
          "strictCompleteness": {
            "title": "Fail on a partial upstream read",
            "type": "boolean",
            "description": "EPA Envirofacts is asked how many rows each query has before it is paged, and the retrieved count is checked against it. When they disagree the data is truncated and every CO2e total would be understated by an unknown amount. Default true: fail the run loudly and bill nothing. Set false to accept partial data, in which case every row is stamped data_complete=false with the shortfall in partial_reason.",
            "default": true
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Safety cap on the number of emitter rows emitted (inventory mode), ranked by latest-year CO2e descending. Default 2000.",
            "default": 2000
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}