# List packages

URL: https://docs.hanzo.ai/docs/openapi/registry/get-registry-packages

> Lists the org's npm packages — `<org>` and `@<org>/…` — from the npm registry's search index, optionally narrowed by a query within that scope.

`GET /v1/registry/packages`

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

|               |                                             |
| ------------- | ------------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/registry/packages` |
| **Method**    | `GET`                                       |
| **Operation** | `get_registry_packages`                     |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY`      |

Lists the org's npm packages — `<org>` and `@<org>/…` — from the
npm registry's search index, optionally narrowed by a query within that
scope. The org boundary is applied server-side after the search, so a query
can never widen it.

## Request

1 field.

| Field   | In    | Type   | Required | Description                                                                                                    |
| ------- | ----- | ------ | -------- | -------------------------------------------------------------------------------------------------------------- |
| `query` | query | string | —        | Query narrows the listing within the org's scope when present; the org boundary itself is never widened by it. |

## Response

| Status    | Body                         | Meaning |
| --------- | ---------------------------- | ------- |
| `200`     | registry.registryPackageList | ok      |
| `default` | problem-details              | refused |

`200` body — 5 fields.

| Field                | In   | Type                        | Always | Description                                                           |
| -------------------- | ---- | --------------------------- | ------ | --------------------------------------------------------------------- |
| `data`               | body | registry.registryPackage\[] | —      | Data is the packages in the org's scope.                              |
| `data[].description` | body | string                      | —      | Description says what the package is, as published.                   |
| `data[].name`        | body | string                      | —      | Name is the package name (`&lt;org&gt;` or `@&lt;org&gt;/…`).         |
| `data[].updated`     | body | string                      | —      | Updated is when the package last changed, as the registry reports it. |
| `data[].version`     | body | string                      | —      | Version is the latest published version.                              |

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

## Examples

**CLI**

```bash
hanzo registry packages
```

**SDK**

**.ts**

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

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

**.py**

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

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

**.go**

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

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

**.rs**

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

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

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

**.java**

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

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

var result = new RegistryApi(client).getRegistryPackages();
```

**HTTP**

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

**MCP**

MCP reaches **registry** through the `registry` tool, which names its 5 operations with its own verbs — this one among them, under a name only MCP declares. `describe` explains any of them:

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

---

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