Get list of keys
GET/v2/key-value-stores/:storeId/keys
Returns a list of objects describing keys of a given key-value store, as well as some information about the values (e.g. size).
This endpoint is paginated using exclusiveStartKey and limit parameters
- see Pagination for more details.
Request
Path Parameters
Key-value store ID or username~store-name.
WkzbQMuFYuamGv3YFQuery Parameters
All keys up to this one (including) are skipped from the result.
Example:Ihnsp8YrvJ8102KjNumber of keys to be returned. Maximum value is 1000.
100Limit the results to keys that belong to a specific collection from the key-value store schema. The key-value store need to have a schema defined for this parameter to work.
Example:postImagesLimit the results to keys that start with a specific prefix.
Example:post-images-Signature used for the access.
Example:2wTI46Bg8qWQrV7tavlPIStatus 200
Response Headers
{
"data": {
"items": [
{
"key": "second-key",
"size": 36,
"recordPublicUrl": "https://api.apify.com/v2/key-value-stores/WkzbQMuFYuamGv3YF/records/second-key?signature=abc123"
},
{
"key": "third-key",
"size": 128,
"recordPublicUrl": "https://api.apify.com/v2/key-value-stores/WkzbQMuFYuamGv3YF/records/third-key?signature=abc123"
}
],
"count": 2,
"limit": 2,
"exclusiveStartKey": "some-key",
"isTruncated": true,
"nextExclusiveStartKey": "third-key"
}
}
Schema
data object required
items object[] required
- key string requiredExample:
second-key - size integer requiredExample:
36 - recordPublicUrl string<uri> required
A public link to access this record directly.
Example:https://api.apify.com/v2/key-value-stores/WkzbQMuFYuamGv3YF/records/some-key?signature=abc123
- key string requiredExample:
- count integer requiredExample:
2 - limit integer requiredExample:
2 - exclusiveStartKey stringExample:
some-key - isTruncated boolean requiredExample:
true - nextExclusiveStartKey stringExample:
third-key
Status 400
Bad request - invalid input parameters or request body.
{
"error": {
"type": "invalid-input",
"message": "Invalid input: The request body contains invalid data."
}
}
Schema
error object required
- type string requiredExample:
run-failed - message string requiredExample:
Actor run did not succeed (run ID: 55uatRrZib4xbZs, status: FAILED)
- type string requiredExample:
Status 404
Not found - the requested resource was not found.
{
"error": {
"type": "record-not-found",
"message": "Key-value Store was not found"
}
}
Schema
error object
- type string
Possible values: [
record-not-found] - message stringExample:
Key-value Store was not found
- type string