A distributed database may comprise a plurality of nodes maintaining a collection of data items indexed by key values. Upon receiving a request to store a data item, a node of the database may be selected based on the node's suitability for storing the data item. The distributed database may generate a key to identify the data item, such that the generated key identifies the data item and comprises information indicative of the selected node. The distributed database may provide the generated key to an application programming interface client in response to the request.