---
title: "IDBKeyRange | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Interface IDBKeyRange

The **`IDBKeyRange`** interface of the IndexedDB API represents a continuous interval over some data type that is used for keys. Records can be retrieved from IDBObjectStore and IDBIndex objects using keys or a range of keys. You can limit the range using lower and upper bounds. For example, you can iterate over all values of a key in the value range A–Z.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange)

interface IDBKeyRange {  
    [lower](#lower): any;  
    [lowerOpen](#loweropen): boolean;  
    [upper](#upper): any;  
    [upperOpen](#upperopen): boolean;  
    [includes](#includes-1)(key: any): boolean;  
}

##### Index

### Properties[](#properties)

[lower](#lower) [lowerOpen](#loweropen) [upper](#upper) [upperOpen](#upperopen)

### Methods[](#methods)

[includes](#includes)

## Properties[](#properties-1)

### `Readonly`lower[](#lower)

lower: any

The **`lower`** read-only property of the IDBKeyRange interface returns the lower bound of the key range.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/lower)

### `Readonly`lowerOpen[](#loweropen)

lowerOpen: boolean

The **`lowerOpen`** read-only property of the IDBKeyRange interface returns a boolean indicating whether the lower-bound value is included in the key range.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/lowerOpen)

### `Readonly`upper[](#upper)

upper: any

The **`upper`** read-only property of the IDBKeyRange interface returns the upper bound of the key range.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/upper)

### `Readonly`upperOpen[](#upperopen)

upperOpen: boolean

The **`upperOpen`** read-only property of the IDBKeyRange interface returns a boolean indicating whether the upper-bound value is included in the key range.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/upperOpen)

## Methods[](#methods-1)

### includes[](#includes)

-   includes(key: any): boolean[](#includes-1)
    
    The **`includes()`** method of the IDBKeyRange interface returns a boolean indicating whether a specified key is inside the key range.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBKeyRange/includes)
    
    #### Parameters
    
    -   key: any
    
    #### Returns boolean
