{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/lune/json-schema/lune-paginated-emission-factors-schema.json",
  "title": "PaginatedEmissionFactors",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lune-emission-factors-api-openapi.yml#/components/schemas/PaginatedEmissionFactors",
  "allOf": [
    {
      "$ref": "#/$defs/PaginatedBase"
    },
    {
      "type": "object",
      "required": [
        "data"
      ],
      "properties": {
        "data": {
          "type": "array",
          "description": "An array of Emission Factor objects, ordered by best match.\n\nPart of a paginated response.\n",
          "items": {
            "$ref": "#/$defs/EmissionFactor"
          }
        }
      }
    }
  ],
  "$defs": {
    "CurrencyCode": {
      "x-lune-name": "Currency code",
      "type": "string",
      "description": "ISO 4217 3 character currency code.\n\nNote: Lune supports most but not all currency codes.\n",
      "enum": [
        "AED",
        "AFN",
        "ALL",
        "AMD",
        "ANG",
        "AOA",
        "ARS",
        "AUD",
        "AWG",
        "AZN",
        "BAM",
        "BBD",
        "BDT",
        "BGN",
        "BHD",
        "BIF",
        "BMD",
        "BND",
        "BOB",
        "BRL",
        "BSD",
        "BTC",
        "BTN",
        "BWP",
        "BYN",
        "BYR",
        "BZD",
        "CAD",
        "CDF",
        "CHF",
        "CLF",
        "CLP",
        "CNY",
        "CNH",
        "COP",
        "CRC",
        "CUC",
        "CUP",
        "CVE",
        "CZK",
        "DJF",
        "DKK",
        "DOP",
        "DZD",
        "EGP",
        "ERN",
        "ETB",
        "EUR",
        "FJD",
        "FKP",
        "GBP",
        "GEL",
        "GGP",
        "GHS",
        "GIP",
        "GMD",
        "GNF",
        "GTQ",
        "GYD",
        "HKD",
        "HNL",
        "HRK",
        "HTG",
        "HUF",
        "IDR",
        "ILS",
        "IMP",
        "INR",
        "IQD",
        "IRR",
        "ISK",
        "JEP",
        "JMD",
        "JOD",
        "JPY",
        "KES",
        "KGS",
        "KHR",
        "KMF",
        "KPW",
        "KRW",
        "KWD",
        "KYD",
        "KZT",
        "LAK",
        "LBP",
        "LKR",
        "LRD",
        "LSL",
        "LTL",
        "LVL",
        "LYD",
        "MAD",
        "MDL",
        "MGA",
        "MKD",
        "MMK",
        "MNT",
        "MOP",
        "MRU",
        "MUR",
        "MVR",
        "MWK",
        "MXN",
        "MYR",
        "MZN",
        "NAD",
        "NGN",
        "NIO",
        "NOK",
        "NPR",
        "NZD",
        "OMR",
        "PAB",
        "PEN",
        "PGK",
        "PHP",
        "PKR",
        "PLN",
        "PYG",
        "QAR",
        "RON",
        "RSD",
        "RUB",
        "RWF",
        "SAR",
        "SBD",
        "SCR",
        "SDG",
        "SEK",
        "SGD",
        "SHP",
        "SLE",
        "SLL",
        "SOS",
        "SRD",
        "STD",
        "SVC",
        "SYP",
        "SZL",
        "THB",
        "TJS",
        "TMT",
        "TND",
        "TOP",
        "TRY",
        "TTD",
        "TWD",
        "TZS",
        "UAH",
        "UGX",
        "USD",
        "UYU",
        "UZS",
        "VES",
        "VND",
        "VUV",
        "WST",
        "XAF",
        "XAG",
        "XAU",
        "XCD",
        "XDR",
        "XOF",
        "XPF",
        "YER",
        "ZAR",
        "ZMK",
        "ZMW",
        "ZWL"
      ]
    },
    "DistanceUnit": {
      "x-lune-name": "Distance",
      "type": "string",
      "enum": [
        "m",
        "km",
        "mi",
        "nm"
      ],
      "description": "Distance unit, `km` for kilometers, `mi` for miles and `nm` for nautical miles"
    },
    "EmissionFactor": {
      "description": "An emission factors is a coefficient representing the amount of emissions per unit of activity, eg 0.354kgCO₂/USD.\n\nThe `source` property describes what database the emission factor has been ingested from.\n",
      "type": "object",
      "required": [
        "id",
        "name",
        "source",
        "source_version",
        "publication_year",
        "numerator_unit",
        "denominator_unit",
        "created_at",
        "region",
        "category"
      ],
      "properties": {
        "id": {
          "description": "The emission factor unique identifier",
          "type": "string"
        },
        "name": {
          "description": "The emission factor name",
          "type": "string"
        },
        "source": {
          "$ref": "#/$defs/EmissionFactorSource"
        },
        "source_version": {
          "description": "Source version of the emission factor.",
          "type": "string"
        },
        "publication_year": {
          "description": "Publication year of the emission factor",
          "type": "number"
        },
        "numerator_unit": {
          "description": "Numerator unit of the emission factor",
          "$ref": "#/$defs/MassUnit"
        },
        "denominator_unit": {
          "description": "Denominator unit of the emission factor",
          "$ref": "#/$defs/EmissionFactorDenominatorUnit"
        },
        "created_at": {
          "description": "Date of creation of the emission factor",
          "type": "string",
          "format": "date-time"
        },
        "region": {
          "type": "string",
          "description": "The name of the region that the emission factor covers."
        },
        "category": {
          "type": [
            "string",
            "null"
          ],
          "description": "A category that describes the emission factor."
        }
      }
    },
    "EmissionFactorDenominatorUnit": {
      "oneOf": [
        {
          "$ref": "#/$defs/CurrencyCode"
        },
        {
          "$ref": "#/$defs/DistanceUnit"
        },
        {
          "type": "string",
          "x-lune-name": "Other units",
          "enum": [
            "item",
            "MJ",
            "GJ",
            "guest*night",
            "room*night",
            "ha",
            "hour",
            "seconds",
            "kWh",
            "kWh ICV",
            "kWh LHV",
            "kWh HHV",
            "kWh SCV",
            "toe",
            "toe ICV",
            "toe HHV",
            "toe SCV",
            "GJ ICV",
            "GJ HHV",
            "GJ SCV",
            "MJ ICV",
            "kg",
            "kg*day",
            "km*year",
            "l",
            "Ml",
            "ml",
            "m*year",
            "cm2",
            "m2",
            "ha*year",
            "m2*year",
            "m3",
            "m3*km",
            "t*km",
            "person*km",
            "person*month",
            "vehicle*km",
            "meal",
            "t",
            "fte*working_hour",
            "TEU",
            "TEU*km",
            "p",
            "A4_sheets"
          ]
        }
      ]
    },
    "EmissionFactorSource": {
      "type": "string",
      "enum": [
        "epa",
        "exiobase",
        "ecoinvent",
        "beis",
        "lune",
        "glec",
        "emsa",
        "cbam",
        "ademe",
        "idemat",
        "iata",
        "ember",
        "ceda",
        "icct"
      ]
    },
    "MassUnit": {
      "x-lune-name": "Mass",
      "type": "string",
      "description": "Unit, `t` for tonne, `kg` for kilogram, `g` for gram, `lbs` for pound",
      "enum": [
        "g",
        "kg",
        "t",
        "lbs"
      ]
    },
    "PaginatedBase": {
      "type": "object",
      "required": [
        "has_more",
        "next_cursor"
      ],
      "properties": {
        "has_more": {
          "type": "boolean",
          "description": "Whether or not there are more elements available after this set.\n\nIf false, this set comprises the end of the array.\n\nPart of a paginated response.\n"
        },
        "next_cursor": {
          "description": "The cursor value to be used as the after parameter for fetching the next page of results.\n\n`null` if `has_more` is `false`.\n",
          "type": [
            "string",
            "null"
          ]
        }
      }
    }
  }
}