# List galaxy

URL: https://docs.hanzo.ai/docs/openapi/leaderboard/get-leaderboard-galaxy

> Returns every ranked org as a star, for a page to draw the community as a galaxy: each star holds its band in the reward program's level table, a coarse size (a factor of two), the star of the org that referred it, if any, and, only for the ranks the reader has earned a view of, its exact points and the name the standing shows for it.

`GET /v1/leaderboard/galaxy`

> [Leaderboard →](https://docs.hanzo.ai/docs/openapi/leaderboard) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                              |
| ------------- | -------------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/leaderboard/galaxy` |
| **Method**    | `GET`                                        |
| **Operation** | `get_leaderboard_galaxy`                     |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY`       |

Returns every ranked org as a star, for a page to draw the community as a galaxy: each
star holds its band in the reward program's level table, a coarse size (a factor of
two), the star of the org that referred it, if any, and, only for the ranks the reader
has earned a view of, its exact points and the name the standing shows for it. The
window is the standing's: a signed-in reader sees their own star, five ranks below it
and as many above as their points have earned; a reader who is not signed in sees the
last ranks, where a newcomer starts. Every other star has `points` of -1 and no name,
and is still drawn. The stars are columns of equal length, best first, and `center` is
the tokens used and the orgs active in the last 24 hours. A star's id is opaque: it is
the same wherever this answer mentions that star, names no org, and is replaced on the
next read, about a minute later. A signed-in reader gets `self`, the id of their own
star. Names are the standing's: masked in the middle, whole where the org listed
itself, empty where it withdrew. No org id, handle or email is sent. No credential is
needed to read it.

## Request

`GET /v1/leaderboard/galaxy` takes no parameters and no body — the credential is the whole request.

## Response

| Status    | Body                   | Meaning |
| --------- | ---------------------- | ------- |
| `200`     | leaderboard.GalaxyView | ok      |
| `default` | problem-details        | refused |

`200` body — 13 fields.

| Field                  | In   | Type                     | Always | Description                                                                                                                                                             |
| ---------------------- | ---- | ------------------------ | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `available`            | body | boolean                  | —      | Available is false when the warehouse is not connected or a source could not be read and none ever was: the stars are then empty because nothing could be read.         |
| `bands`                | body | string\[]                | —      | Bands are the band names of the reward program's level table, lowest first; a star's band indexes them.                                                                 |
| `center`               | body | leaderboard.GalaxyCenter | —      |                                                                                                                                                                         |
| `center.activeOrgs24h` | body | integer (int64)          | —      | ActiveOrgs24h is how many different orgs used any of them.                                                                                                              |
| `center.tokens24h`     | body | integer (int64)          | —      | Tokens24h is the tokens used in the last 24 hours: the sum of the pulse's tokens by hour.                                                                               |
| `self`                 | body | string                   | —      | Self is the id of the signed-in reader's own star; empty for a reader who is not signed in or whose org the board does not hold.                                        |
| `stars`                | body | leaderboard.GalaxyStars  | —      |                                                                                                                                                                         |
| `stars.band`           | body | integer (int64)\[]       | —      | Band is each star's index in the response's bands.                                                                                                                      |
| `stars.id`             | body | string\[]                | —      | ID is each star's opaque id, of no use after the next read.                                                                                                             |
| `stars.mask`           | body | string\[]                | —      | Mask is the name the standing shows for the org where the reader's reveal window holds it: masked in the middle, whole where it listed itself, empty where it withdrew. |
| `stars.points`         | body | integer (int64)\[]       | —      | Points is each star's exact score where the reader's reveal window holds it, and -1 where it does not: a star the reader has not earned a view of.                      |
| `stars.size`           | body | integer (int64)\[]       | —      | Size is each star's coarse size, from 0: the bit length of its points, a factor of two.                                                                                 |
| `stars.sponsor`        | body | string\[]                | —      | Sponsor is the id of the star that referred this one; empty where none did.                                                                                             |

Failure carries the platform error shape — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo leaderboard galaxy
```

**SDK**

**.ts**

```ts
import { Configuration, LeaderboardApi } from 'hanzoai';

const api = new LeaderboardApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getLeaderboardGalaxy();
```

**.py**

```python
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import LeaderboardApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = LeaderboardApi(client).get_leaderboard_galaxy()
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.LeaderboardAPI.GetLeaderboardGalaxy(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::apis::{configuration::Configuration, leaderboard_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = leaderboard_api::get_leaderboard_galaxy(&cfg, Default::default()).await?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.LeaderboardApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new LeaderboardApi(client).getLeaderboardGalaxy();
```

The method above is the one at the current release of the document. `hanzoai@8.5.914` (npm) and `hanzoai@8.5.914` (PyPI) were generated from an earlier release, where this operation carried a different id, so it spells the method differently — regenerating the clients is what makes the two agree. [SDKs →](https://docs.hanzo.ai/docs/sdks)

**HTTP**

```bash
curl https://api.hanzo.ai/v1/leaderboard/galaxy \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

Tool `leaderboard`, op `get_leaderboard_galaxy` — POST the JSON-RPC envelope to `https://api.hanzo.ai/v1/mcp`.

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "leaderboard",
         "arguments": {
           "op": "get_leaderboard_galaxy",
           "input": {}
         }
       }
     }'
```

---

[Leaderboard API](https://docs.hanzo.ai/docs/openapi/leaderboard) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
