---
title: "Rank countries by greenhouse-gas emissions for a gas and window"
method: GET
path: "/api/v1/environment/ct/rankings/countries"
tags: ["Environment"]
---

# Rank countries by greenhouse-gas emissions for a gas and window

`GET /api/v1/environment/ct/rankings/countries`

Rank every country / territory in the Climate TRACE inventory by total emissions of a selected gas over a start / end window. Optionally restrict to a continent or named country group (g7, g20, g77, eu, aosis, arab_league). Each row returns the emissions total, per-capita figure, share of the global total, and year-over-year percentage change. Data sourced from Climate TRACE under CC BY 4.0.

## Query parameters

- `gas` string — Gas identifier from /definitions/gases. `co2e_100yr` uses GWP100 and is the default for climate comparison.
- `start` string — Start of the aggregation window. Accepts year (YYYY), year-month (YYYY-MM), or ISO date (YYYY-MM-DD).
- `end` string — End of the aggregation window. Same formats as `start`.
- `sectors` string, nullable — Comma-separated sector slugs. Reserved keyword `all_no_forest` excludes forestry-and-land-use.
- `subsectors` string, nullable — Comma-separated subsector slugs.
- `country_group` string, nullable — Named country group slug (e.g. `g7`, `g20`, `eu`).
- `continent` string, nullable — Continent name restricting the ranking scope.

## Response `200`

Country rows ranked by emissions plus global totals and a time-series breakdown.

- EnvelopeCtCountryRankingsPayload
  - `data` CtCountryRankingsPayload, required — Response payload for `/environment/ct/rankings/countries`.
    - `totals` CtTotals — Aggregate totals block attached to /rankings and /sources/emissions responses. On `/rankings/countries`, this block carries `gas`, `emissionsQuantity`, `start`, `end`. On `/sources/emissions`, the block is `{summaries, timeseries}` (no start / end). On `/sources/{id}`, the block carries per-source units (`activityUnits`, `capacityUnits`). Fields across these three shapes are merged here and marked Optional.
      - `start` string, nullable — ISO 8601 start of the aggregation window (rankings).
      - `end` string, nullable — ISO 8601 end of the aggregation window (rankings).
      - `gas` string, nullable — Gas identifier the totals refer to.
      - `emissionsQuantity` number, nullable — Total emissions over the window in tonnes of the reported gas.
      - `emissionsFactor` number, nullable — Emissions factor attached to a single-source totals block.
      - `emissionsFactorUnits` string, nullable — Units for the emissions factor on single-source totals.
      - `activity` number, nullable — Activity volume attached to a single-source totals block.
      - `activityUnits` string, nullable — Units for the `activity` value.
      - `capacity` number, nullable — Nameplate capacity attached to a single-source totals block.
      - `capacityUnits` string, nullable — Units for the `capacity` value.
      - `capacityFactor` number, nullable — Capacity factor attached to a single-source totals block.
      - `summaries` CtTotalsSummary[], nullable — Gas-level summaries across the aggregation window (/sources/emissions).
        - `gas` string, nullable — Gas identifier the row refers to.
        - `emissionsQuantity` number, nullable — Total emissions in tonnes of the reported gas.
        - `percentage` number, nullable — Share of the aggregation total, expressed as a 0-100 percentage.
      - `timeseries` CtTotalsTimeseriesRow[], nullable — Period-level breakdown (monthly where available, else annual).
        - `year` integer, nullable — Calendar year of the aggregate row.
        - `month` integer, nullable — Calendar month (1-12) for monthly rows.
        - `gas` string, nullable — Gas identifier the aggregate row refers to.
        - `sector` string, nullable — Sector slug - present on `sectors.timeseries[]` and `subsectors.timeseries[]`.
        - `subsector` string, nullable — Subsector slug - present on `subsectors.timeseries[]`.
        - `emissionsQuantity` number, nullable — Aggregate emissions in tonnes of the reported gas.
    - `location` CtEmissionsLocation — Scope descriptor attached to /sources/emissions (the filtered location / scope).
      - `name` string, nullable — Name of the aggregation scope (`Global`, or the admin area / city / continent / group name).
      - `id` string, nullable — Identifier of the scope when the filter resolved to a specific admin / city / group.
    - `rankings` CtCountryRanking[], required — Country rows ranked by emissions for the requested gas and window.
      - `rank` integer, nullable — 1-based global rank for the gas and time window.
      - `country` string, nullable — ISO 3166-1 alpha-3 country code.
      - `name` string, nullable — Country name in English.
      - `continent` string, nullable — Continent name (e.g. `Asia`, `North America`).
      - `emissionsQuantity` number, nullable — Total emissions for the country over the window in tonnes of the reported gas.
      - `emissionsPerCapita` number, nullable — Per-capita emissions in tonnes per person.
      - `percentage` number, nullable — Share of the global total (0 to 1).
      - `emissionsPercentChange` number, nullable — Year-over-year percentage change versus the preceding period.
      - `population` integer, nullable — Country population used for the per-capita calculation.
  - `meta` SugraMeta, required — Metadata attached to every /api/v1/* response envelope.
    - `endpoint` string, required — Requested endpoint path.
    - `data_time` string, required — ISO 8601 UTC timestamp of the source data, not of the request.
    - `response_time` string, required — ISO 8601 UTC timestamp when this response was produced.
    - `provider` string, required — API name and version.
    - `source` string, nullable — Identifier of the primary upstream source used for this response.
    - `attribution` string, nullable — Human-readable attribution mandated by an upstream source (e.g. a securities regulator or self-regulatory organization). Present only on responses whose source requires the owner and source to be clearly identified. Do not remove or alter it when using the response.
    - `fallback_used` boolean, nullable — True when the primary source failed and a fallback produced the data.
    - `fallback_chain` string[], nullable — Ordered list of sources attempted, in the order they were tried.
    - `cached` boolean, nullable — True when this response was served from the internal cache.
    - `stale` boolean, nullable — True when the cached response was returned after the upstream rate-limited or errored. Clients can use this to detect degraded data.

## Other responses

- `401` — Missing or invalid `x-api-key` header. JSON body with a stable `code` distinguishing `missing_api_key` (no header sent) from `invalid_api_key` (header sent, key not accepted); any other 401 source carries the generic `unauthorized` with its detail as `reason`. Plus `hint`. `plan` is always null on 401 - an unauthenticated request has no plan; quota exhaustion is 429, not 401.
- `422` — Validation Error
- `429` — Daily rate limit exceeded. Check `X-RateLimit-Reset` for the next window.
- `503` — Upstream source is temporarily unavailable. Retry after a short delay.

---

[API](https://skmtc.net/sugra/apis/sugra-api.md) · [All operations](https://skmtc.net/sugra/apis/sugra-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sugra/sugra-api/revisions/062b7040e9bc/schema)
