> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://uploadcare.com/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://uploadcare.com/docs/_mcp/server.

# Get metadata key's value

GET https://api.uploadcare.com/files/{uuid}/metadata/{key}/

Get the value of a single metadata key.

Reference: https://uploadcare.com/docs/api/rest/file-metadata/key

## Authentication

- `Authorization` header (required) — Every request made to `https://api.uploadcare.com/` MUST be signed. HTTPS SHOULD be used with any authorization scheme. Requests MUST contain the `Authorization` header defining `auth-scheme` and `auth-param`: `Authorization: auth-scheme auth-param`. Every request MUST contain the `Accept` header identifying the REST API version: `Accept: application/vnd.uploadcare-v0.7+json`. There are two available authorization schemes: * For production: `Uploadcare`, a scheme where a `signature`, not your Secret API Key MUST be specified. Signatures SHOULD be generated on backend. * For quick tests: `Uploadcare.Simple`, a simple scheme where your [Secret API Key](https://app.uploadcare.com/projects/-/api-keys/) MUST be specified in every request's `auth-param`.

## Request

### Path parameters

- `uuid` (string, required) — File UUID.
- `key` (string, required) — Key of file metadata. List of allowed characters for the key: - Latin letters in lower or upper case (a-z,A-Z) - digits (0-9) - underscore `_` - a hyphen `-` - dot `.` - colon `:`

### Headers

- `Accept` (string, required) — Version header.

## Response

### 200

Value of a file's metadata key.

- `string`

## Errors

### 400 Bad Request Error

Simple authentication over HTTP is forbidden. Please, use HTTPS or signed requests instead.

- `detail` (string, optional, default: Simple authentication over HTTP is forbidden. Please, use HTTPS or signed requests instead.)

### 401 Unauthorized Error

Authorization errors.

- `detail` (enum, optional)
  - Allowed values: `Incorrect authentication credentials.`, `Public key {public_key} not found.`, `Secret key not found.`, `Invalid signature. Please check your Secret key.`

### 406 Not Acceptable Error

Invalid version header `Accept` for this endpoint.

- `detail` (string, optional, default: Incorrect Accept header provided. Make sure to specify API version. Refer to REST API docs for details.)

## Examples

**Response**

```json
"uploader"
```

**SDK Code**

```javascript JS
import {
  getMetadataValue,
  UploadcareSimpleAuthSchema,
} from '@uploadcare/rest-client';

const uploadcareSimpleAuthSchema = new UploadcareSimpleAuthSchema({
  publicKey: 'YOUR_PUBLIC_KEY',
  secretKey: 'YOUR_SECRET_KEY',
});

const result = await getMetadataValue(
  {
    uuid: '1bac376c-aa7e-4356-861b-dd2657b5bfd2',
    key: 'pet'
  },
  { authSchema: uploadcareSimpleAuthSchema }
)

```

```php PHP
<?php
$configuration = Uploadcare\Configuration::create((string) $_ENV['UPLOADCARE_PUBLIC_KEY'], (string) $_ENV['UPLOADCARE_SECRET_KEY']);

$api = (new Uploadcare\Api($configuration))->metadata();
$metadata = $api->getMetadata('1bac376c-aa7e-4356-861b-dd2657b5bfd2');
echo \sprintf('Value for key \'pet\' %s', $metadata['pet'] ?? 'does not exists');

```

```python Python
from pyuploadcare import Uploadcare
uploadcare = Uploadcare(public_key='YOUR_PUBLIC_KEY', secret_key='YOUR_SECRET_KEY')

value = uploadcare.metadata_api.get_key("1bac376c-aa7e-4356-861b-dd2657b5bfd2", "pet")
print(value)

```

```ruby Ruby
require 'uploadcare'
Uploadcare.config.public_key = 'YOUR_PUBLIC_KEY'
Uploadcare.config.secret_key = 'YOUR_SECRET_KEY'

uuid = '1bac376c-aa7e-4356-861b-dd2657b5bfd2'
puts Uploadcare::FileMetadata.index(uuid).inspect

```

```swift Swift
import Uploadcare

let uploadcare = Uploadcare(withPublicKey: "YOUR_PUBLIC_KEY", secretKey: "YOUR_SECRET_KEY")

let value = try await uploadcare.fileMetadataValue(forKey: "pet", withUUID: "1bac376c-aa7e-4356-861b-dd2657b5bfd2")
print(value)

```

```kotlin Kotlin
import com.uploadcare.android.library.api.UploadcareClient

val uploadcare = UploadcareClient(publicKey = "YOUR_PUBLIC_KEY", secretKey = "YOUR_SECRET_KEY")

val value = uploadcare.getFileMetadataKeyValue(
    fileId = "1bac376c-aa7e-4356-861b-dd2657b5bfd2",
    key = "pet"
)
Log.d("TAG", value)

```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.uploadcare.com/files/21975c81-7f57-4c7a-aef9-acfe28779f78/metadata/subsystem/"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Accept", "application/vnd.uploadcare-v0.7+json")
	req.Header.Add("Authorization", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.uploadcare.com/files/21975c81-7f57-4c7a-aef9-acfe28779f78/metadata/subsystem/")
  .header("Accept", "application/vnd.uploadcare-v0.7+json")
  .header("Authorization", "<apiKey>")
  .asString();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.uploadcare.com/files/21975c81-7f57-4c7a-aef9-acfe28779f78/metadata/subsystem/");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/vnd.uploadcare-v0.7+json");
request.AddHeader("Authorization", "<apiKey>");
IRestResponse response = client.Execute(request);
```