---
title: "Lorenz curve + Gini + top-X%-own-Y% headlines for one metric in a scope"
method: POST
path: "/v1/analytics.getInequality"
tags: ["analytics"]
---

# Lorenz curve + Gini + top-X%-own-Y% headlines for one metric in a scope

`POST /v1/analytics.getInequality`

## Request body

- AnalyticsGetInequalityRequestBody
  - `$schema` string, uri — A URL to the JSON Schema for this object.
  - `domain` string, required — Analytics domain ID. See analytics.listMetrics.
  - `metric` string, required — Metric ID within the domain.
  - `scope` string, required — Scope ID within the domain.
  - `scope_value` string — Country name/code or region name. Required for non-global scopes.

## Response `200`

OK

- AnalyticsInequality
  - `$schema` string, uri — A URL to the JSON Schema for this object.
  - `count` integer, required — Number of non-zero contributors.
  - `gini` number, double, required — Gini coefficient. 0 = perfect equality, 1 = maximum inequality.
  - `points` AnalyticsInequalityPoint[], nullable, required — Lorenz curve sample points, sorted by popShare ascending. Includes (0,0) and (1,1) endpoints.
    - `popShare` number, double, required — Cumulative share of the population, taken from the bottom (0–1).
    - `valueShare` number, double, required — Cumulative share of the metric owned by that bottom slice (0–1).
  - `top10PercentShare` number, double, required — Fraction of the metric owned by the top 10% (0–1).
  - `top1PercentShare` number, double, required — Fraction of the metric owned by the top 1% of contributors (0–1).
  - `top50PercentShare` number, double, required — Fraction of the metric owned by the top 50% (0–1).
  - `totalValue` number, double, required — Sum of the metric across all non-zero contributors.

## Other responses

- `400` — Bad Request
- `422` — Unprocessable Entity
- `500` — Internal Server Error

---

[API](https://skmtc.net/steamsets/apis/steamsets-api.md) · [All operations](https://skmtc.net/steamsets/apis/steamsets-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/steamsets/steamsets-api/versions/2e8ba266b27f/schema)
