# Get

## Get Record From Tag <a href="#from-tag" id="from-tag"></a>

{% code lineNumbers="true" %}

```javascript
db.get('tag')
```

{% endcode %}

### Parameters

<table><thead><tr><th>Name</th><th>About</th><th>Type</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>tag</td><td>The Record's tag</td><td>String</td><td>true</td></tr></tbody></table>

## Get Record information <a href="#info" id="info"></a>

### Data

{% code lineNumbers="true" %}

```javascript
db.get('tag').data
```

{% endcode %}

### Tag <a href="#tag" id="tag"></a>

{% code lineNumbers="true" %}

```javascript
db.get('tag').tag
```

{% endcode %}

## Get all Records <a href="#all" id="all"></a>

{% code lineNumbers="true" %}

```javascript
db.getAll(returnType)
```

{% endcode %}

### Parameters

<table><thead><tr><th>Name</th><th>About</th><th>Type</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>returnType</td><td>Read about it <a href="../miscellaneous#returntype">here</a></td><td>Number</td><td>true</td></tr></tbody></table>

## Search Tags

{% code lineNumbers="true" %}

```javascript
db.searchTags('term',returnType)
```

{% endcode %}

### Parameters

<table><thead><tr><th>Name</th><th>About</th><th>Type</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>term</td><td>The search term</td><td>String</td><td>true</td></tr><tr><td>returnType</td><td>Read about it <a href="../miscellaneous#returntype">here</a></td><td>Number</td><td>true</td></tr></tbody></table>

## Search Record Content <a href="#search-content" id="search-content"></a>

{% code lineNumbers="true" %}

```javascript
db.get("tag").search('query','splitBy')
```

{% endcode %}

### Search Object Keys (JSON Only) <a href="#search-keys" id="search-keys"></a>

{% code lineNumbers="true" %}

```javascript
db.searchKeys('query') // splitBy is not a param for the searchKeys method
```

{% endcode %}

### Parameters

<table><thead><tr><th>Name</th><th>About</th><th>Type</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>query</td><td>Search query</td><td>String</td><td>true</td></tr><tr><td>splitBy</td><td>String to split the Record's data by. For example, \n for lines or " " for spaces. If not present, Dubnium will default to space.</td><td>String</td><td>true</td></tr></tbody></table>

## Get Record from Value (JSON Only) <a href="#from-value" id="from-value"></a>

{% code lineNumbers="true" %}

```javascript
db.getFromValue('key','value',returnType)
```

{% endcode %}

### Parameters

<table><thead><tr><th>Name</th><th>About</th><th>Type</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>key</td><td>The key to get from</td><td>String</td><td>true</td></tr><tr><td>value</td><td>The value to get from</td><td>String</td><td>true</td></tr><tr><td>returnType</td><td>Read about it <a href="../miscellaneous#returntype">here</a></td><td>Number</td><td>true</td></tr></tbody></table>

## Check if a Record exists <a href="#exists" id="exists"></a>

Check if a record exists.

{% hint style="info" %}
This will only return `true` or `false`.
{% endhint %}

{% code lineNumbers="true" %}

```javascript
db.exists('tag')
```

{% endcode %}

### Parameters

<table><thead><tr><th>Name</th><th>About</th><th>Type</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>tag</td><td>The tag to check for</td><td>String</td><td>true</td></tr></tbody></table>
