# Metadata

The **Metadata** extension allows you to view metadata for each cell, configured during project creation. This metadata can be embedded within any compatible input file format that supports `metadata`, such as [JSON Advanced](/compatibility-and-updates/supported-formats.md#json_advanced), [Datasaur Schema](/compatibility-and-updates/supported-formats.md#datasaur-schema-format), or by using the [Import File Transformer](/workspace-management/file-transformer/import-transformer.md).

Metadata can be added to **span labeling** and **row labeling projects.**

* In span labeling, it is available per line.

<figure><img src="/files/3cW5vuaj9MqZLeOH77LD" alt=""><figcaption><p>Metadata example in span labeling project</p></figcaption></figure>

* While in row labeling, it is available per cell.

<figure><img src="/files/0edqlYQtqV8IKrOqxEQl" alt=""><figcaption><p>Metadata example in row labeling project</p></figcaption></figure>

## Structure

The structure for <mark style="color:red;">`CellMetadata`</mark> is defined as follows:

<pre class="language-json"><code class="lang-json">CellMetadata {
<strong>    key: string;
</strong>    value: string;
    type?: string;
    pinned?: boolean;
    config?: {
        backgroundColor: string;
        color: string;
        borderColor: string;
    }
}
</code></pre>

**Metadata Object Structure**:

* **key**: Identifier for the metadata item, represented as a string. Example: "author"
* **value**: Content or data of the metadata item, represented as a string. Example: "John Doe"
* **type**: Optional field indicating the type of the value in [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types).
  * **Default**: text/plain
  * **Supported type**:
    * **text/plain:** Displays metadata as plain text.
    * **text/html**: Displays metadata as HTML.
    * **image/\*:** Displays metadata as an image. The supported image format will depend on the [browser support](https://en.wikipedia.org/wiki/Comparison_of_browser_engines_\(graphics_support\)).
    * **audio/\*:** Displays metadata as an audio player. The supported audio format will depend on the [browser support](https://en.wikipedia.org/wiki/HTML5_audio#Supported_audio_coding_formats).
* **pinned**: Boolean that specifies if the metadata should be visible at the top of each cell. Metadata that isn’t pinned will still be viewable through the Metadata Extension panel.
* **config**: Customizes appearance for text/plain types.
  * **color:** Determines the text color of the metadata, specified as a string. Accepts any HTML color codes and names.
  * **backgroundColor:** Determines the background color of the metadata, specified as a string. Accepts any HTML color codes and names.
  * **borderColor:** Determines the border color of the metadata, specified as a string. Accepts any HTML color codes and names.

Here’s a sample that can be used for creating a span labeling project that contains metadata.

{% file src="/files/JCAwZPTSMLA8a1dqXBmZ" %}

{% file src="/files/Bs72ZclTPFs3wngJ6uo0" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.datasaur.ai/advanced/extensions/metadata.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
