OpenAPI Specification
View the complete OpenAPI specification for this REST API.
Resumen
The Key-Value Store REST API enables you to manage and access your lists and sets programmatically from any environment — your backend services, CI/CD pipelines, scripts, or anywhere you make HTTP requests.
Use the REST API to:
- Pre-populate lists with wallet addresses, token contracts, or other data before your Stream starts processing
- Update your Key-Value Store data on demand from outside of a Streams filter
- Build management tools and dashboards around your Key-Value Store data
For managing Key-Value Store data from within a Streams filter (e.g., during real-time block processing), use the qnLib.* methods documented in the Streams Filters documentation.
Autenticación
To access the Key-Value Store REST API, create an API key and include it as an x-api-key header with every request.
API Base URL: https://api.quicknode.com/
Making Key-Value Store REST API Requests
In this documentation, you will see example requests made with cURL, the Quicknode CLI, and various programming languages for each supported Key-Value Store REST API method. This section will explain how to execute them on your machine.
cURL
La mayoría de los sistemas basados en *nix son compatibles con cURL de serie. cURL es una herramienta de línea de comandos y una biblioteca para transferir datos mediante URL. Comprueba si la tienes ejecutando lo siguiente:
curl -h
Here's an example of how to retrieve all list keys using the Key-Value Store REST API with cURL:
curl -X GET \
"https://api.quicknode.com/kv/rest/v1/lists" \
-H "accept: application/json" \
-H "x-api-key: YOUR_API_KEY"
Interfaz de línea de comandos de Quicknode
Para ejecutar los ejemplos de la CLI de Quicknode, instala el qn herramienta de línea de comandos:
preparar instalar quicknode/tap/qn
Comprueba si lo tienes ejecutando lo siguiente:
qn --versión
Then authenticate with an API key from your Quicknode dashboard:
Inicio de sesión en QN Auth
También puedes introducir la clave de la API directamente:
qn auth login --api-key TU_CLAVE_API_AQUÍ
Para conocer otros métodos de instalación, formatos de salida y opciones de configuración, consulta la documentación de la CLI de Quicknode.
Available Endpoints
Lists
Lists store collections of string items under a single key. Use them for membership checks against streaming data (e.g., checking if a wallet address is in your watchlist).
| Método | Punto final | Descripción |
|---|---|---|
| PUBLICAR | /kv/rest/v1/lists | Create a new list |
| OBTENER | /kv/rest/v1/lists | Retrieve all list keys |
| OBTENER | /kv/rest/v1/lists/{key} | Retrieve items from a specific list |
| PARCHE | /kv/rest/v1/lists/{key} | Add/remove items from a list |
| PUBLICAR | /kv/rest/v1/lists/{key}/items | Add a single item to a list |
| OBTENER | /kv/rest/v1/lists/{key}/contains/{item} | Check if a list contains an item |
| BORRAR | /kv/rest/v1/lists/{key}/items/{item} | Remove an item from a list |
| BORRAR | /kv/rest/v1/lists/{key} | Delete a list |
Sets
Sets store individual key-value pairs. Use them for tracking data points that change over time (e.g., last processed block, running totals).
| Método | Punto final | Descripción |
|---|---|---|
| PUBLICAR | /kv/rest/v1/sets | Create a new key-value set |
| OBTENER | /kv/rest/v1/sets | Retrieve all set keys |
| OBTENER | /kv/rest/v1/sets/{key} | Retrieve a set value by key |
| PUBLICAR | /kv/rest/v1/sets/bulk | Bulk create/delete sets |
| BORRAR | /kv/rest/v1/sets/{key} | Delete a set |
Key-Value Store items are case-sensitive. This is particularly important when working with blockchain addresses, as they must be entered exactly as they appear onchain.