Key-Value Database for Your App
Store and retrieve data in the cloud with Puter.js.
Add a database to your app without any infrastructure setup.
Key-Value API
Simple operations for storing and retrieving data.
- Set, get, delete key-value pairs
- Increment and decrement numeric values
- List keys with pattern matching
No Infrastructure
No servers to configure, no databases to set up. Just write code and store data.
User-Pays Model
Build apps without worrying about storage costs. With User-Pays Model, users cover their own costs.
No Backend Required
Store data directly from the browser with client-side JavaScript. No server code needed.
Works Everywhere
Use from any frontend with a simple script tag, or install via NPM for Node.js projects.
How It Works
1 Include Puter.js
Add Puter.js to your app:
<script src="https://js.puter.com/v2/"></script>
or with NPM:
npm install @heyputer/puter.js
2 Store Data in the Cloud
Use the simple JavaScript API to store data:
puter.kv.set('name', 'Puter Smith');
View the Key-Value Database documentation for a full list of available features.
✓That's it!
No servers to configure, no databases to set up. Your data is stored in the cloud instantly.
Simple API, Powerful Features
Set values, get values, increment counters, and more.
The API handles all the complexity so you can focus on building your app.
// Set a key-value pair
await puter.kv.set('username', 'alice');
// Get a value
const name = await puter.kv.get('username');
// Increment a counter
await puter.kv.incr('pageViews');
// List all keys
const keys = await puter.kv.list();
Frequently Asked Questions
A key-value database, also known as a key-value store, stores data as pairs of keys and values, like a dictionary. With Puter.js, you can save, read, and manage data directly from your JavaScript code without setting up servers or managing infrastructure.
Puter.js is a JavaScript library that provides cloud storage, AI, and other cloud services through a simple API. It handles authentication, infrastructure, and scaling so you can focus on building your app.
With the User-Pays model, users cover their own storage costs through their Puter account. This means you can build apps without worrying about infrastructure expenses.
Key-value storage is perfect for persisting application data, user preferences, session state, caching, counters, leaderboards, configuration settings, and much more. It's ideal when you need fast, simple data storage without complex queries.
Unlike localStorage, Puter's key-value database stores data in the cloud, so it syncs across devices and isn't limited to a single browser. It also provides atomic operations like increment/decrement and supports much larger storage limits.
Add the Puter.js script to your app with <script src="https://js.puter.com/v2/"></script> or install via NPM with npm install @heyputer/puter.js, then use puter.kv.set() to save data and puter.kv.get() to retrieve it. Check out the documentation for more examples.
Add a Key-Value Database to Your App
Get started with Puter.js — add cloud data storage in a few lines of code.
Get Started Now