# rpk registry schema get

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [cloud-data-platform-full.txt](https://docs.redpanda.com/cloud-data-platform-full.txt)

---
title: rpk registry schema get
latest-operator-version: v26.2.2
latest-console-tag: v3.10.0
latest-connect-version: 4.105.0
docname: rpk/rpk-registry/rpk-registry-schema-get
page-component-name: cloud-data-platform
page-version: master
page-component-version: master
page-component-title: Cloud
page-relative-src-path: rpk/rpk-registry/rpk-registry-schema-get.adoc
page-edit-url: https://github.com/redpanda-data/cloud-docs/edit/main/modules/reference/pages/rpk/rpk-registry/rpk-registry-schema-get.adoc
description: "Get a schema by version, ID, or by an existing schema. This returns a lookup of an existing schema or schemas in one of a few potential (mutually exclusive) ways: * By version, returning a schema for a required subject and version."
page-git-created-date: "2024-07-25"
page-git-modified-date: "2026-08-11"
---

<!-- Source: https://docs.redpanda.com/cloud-data-platform/reference/rpk/rpk-registry/rpk-registry-schema-get.md -->

Get a schema by version, ID, or by an existing schema.

This returns a lookup of an existing schema or schemas in one of a few potential (mutually exclusive) ways:

-   By version, returning a schema for a required subject and version

-   By ID, returning all subjects using the schema, or filtering for one subject

-   By schema, checking if the schema has been created in the subject


To print the schema, use the `--print-schema` flag.

To print schema metadata properties, use the `--print-metadata` flag.

## [](#usage)Usage

```bash
rpk registry schema get <subject> [flags]
```

## [](#flags)Flags

| Value | Type | Description |
| --- | --- | --- |
| --deleted | bool | If true, also return deleted schemas. |
| --id | int | ID to lookup schemas usages of; subject optional. |
| --print-metadata | bool | Print the schema metadata properties. |
| --print-schema | bool | Prints the schema in JSON format. |
| --schema | string | Schema file to check existence of. Must be .avro, .json, or .proto. Subject is required. |
| --schema-version | string | Schema version to lookup (latest, 0, 1…​); subject required. |
| --type | string | Schema type of the file used to lookup (avro,protobuf,json); overrides schema file extension. |

## [](#global-flags)Global flags

| Value | Type | Description |
| --- | --- | --- |
| --config | string | Redpanda or rpk config file; default search paths are ~/.config/rpk/rpk.yaml, $PWD/redpanda.yaml, and /etc/redpanda/redpanda.yaml. |
| -X, --config-opt | stringArray | Override rpk configuration settings; -X help for detail or -X list for terser detail. |
| --ignore-profile | bool | Ignore rpk.yaml and redpanda.yaml; use default settings. |
| --profile | string | rpk profile to use. |
| -v, --verbose | bool | Enable verbose logging. |