# Metadata ## Read the metadata for a key `client.kv.namespaces.metadata.get(stringkeyName, MetadataGetParamsparams, RequestOptionsoptions?): MetadataGetResponse` **get** `/accounts/{account_id}/storage/kv/namespaces/{namespace_id}/metadata/{key_name}` Returns the metadata associated with the given key in the given namespace. Use URL-encoding to use special characters (for example, `:`, `!`, `%`) in the key name. ### Parameters - `keyName: string` A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL. - `params: MetadataGetParams` - `account_id: string` Identifier. - `namespace_id: string` Namespace identifier tag. ### Returns - `MetadataGetResponse = unknown` Arbitrary JSON that is associated with a key. ### Example ```typescript import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const metadata = await client.kv.namespaces.metadata.get('My-Key', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', namespace_id: '0f2ac74b498b48028cb68387c421e279', }); console.log(metadata); ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": {} } ``` ## Domain Types ### Metadata Get Response - `MetadataGetResponse = unknown` Arbitrary JSON that is associated with a key.