# llDataSizeKeyValue

*LSL function (requires an experience)*

```lsl
key key llDataSizeKeyValue();
```

- Returns: `key`
- Energy: 10

Start an asynchronous transaction to request the used and total amount of data allocated for the [Experience](/categories/experience/).

Returns a [key](https://wiki.secondlife.com/wiki/key) that can be used to identify the corresponding [dataserver](/events/dataserver/) event to determine if this command succeeded or failed and the results.

```lsl title="How to use" frame="terminal"
key result = llDataSizeKeyValue();
```

## Examples

<details open>
<summary>Example 1</summary>

```lsl collapse={17-29}
key trans;

default
{
    state_entry()
    {
        trans = llDataSizeKeyValue();
    }

    dataserver( key _t, string _value )
    {
        if ( _t == trans )
        {
            // our llDataSizeKeyValue transaction is done
            list result = llCSV2List( _value );
            if ( llList2Integer( result, 0 ) == 1 )
            {
                // data size retrieved
                llSay( 0, "Space in use: " + llList2String( result, 1 ) );
                llSay( 0, "Total space:  " + llList2String( result, 2 ) );
            }
            else
            {
                // data size check failed
                llSay( 0, "Key-value failed to check size: " + llList2String( result, 1 ) );
            }
        }
    }
}
```

</details>

## See also

### Functions

- [llGetExperienceErrorMessage](/functions/llGetExperienceErrorMessage/)
- [llCreateKeyValue](/functions/llCreateKeyValue/)
- [llReadKeyValue](/functions/llReadKeyValue/)
- [llUpdateKeyValue](/functions/llUpdateKeyValue/)
- [llDeleteKeyValue](/functions/llDeleteKeyValue/)
- [llDataSizeKeyValue](/functions/llDataSizeKeyValue/)
- [llKeyCountKeyValue](/functions/llKeyCountKeyValue/)
- [llKeysKeyValue](/functions/llKeysKeyValue/)

---

*Source: [LlDataSizeKeyValue](https://wiki.secondlife.com/wiki/LlDataSizeKeyValue) on the Second Life Wiki. Content from the Second Life Wiki articles LlDataSizeKeyValue (revision 1196391, 2015-05-05), Template:LSL Function/KeyValue (revision 1218517, 2025-11-17) and Template:LSL Function/Experience (revision 1210521, 2022-03-11), CC BY-SA 3.0.*

---

From lsl.dev: https://lsl.dev/functions/llDataSizeKeyValue/
