v3

latestOpenAPI 3.1.2Apache 2.02026-07-31231237972.0 KB
Storage/Datasets

Create dataset

Creates a dataset and returns its object. Keep in mind that data stored under unnamed dataset follows data retention period. It creates a dataset with the given name if the parameter name is used. If a dataset with the given name already exists then returns its object.

post/v2/datasets

Query parameters

namestring
Example:eshop-items

Custom unique name to easily identify the dataset in the future.

Response

Returns the existing dataset object if a dataset with the given name already exists.

Example response

{
  "data": {
    "id": "WkzbQMuFYuamGv3YF",
    "name": "d7b9MDYsbtX5L7XAj",
    "userId": "wRsJZtadYvn4mBZmm",
    "createdAt": "2019-12-12T07:34:14.202Z",
    "modifiedAt": "2019-12-13T08:36:13.202Z",
    "accessedAt": "2019-12-14T08:36:13.202Z",
    "itemCount": 7,
    "cleanItemCount": 5,
    "schema": {
      "actorSpecification": 1,
      "title": "My dataset",
      "views": {
        "overview": {
          "title": "Overview",
          "transformation": {
            "fields": [
              "linkUrl"
            ]
          },
          "display": {
            "component": "table",
            "properties": {
              "linkUrl": {
                "label": "Link URL",
                "format": "link"
              }
            }
          }
        }
      }
    },
    "consoleUrl": "https://console.apify.com/storage/datasets/27TmTznX9YPeAYhkC",
    "itemsPublicUrl": "https://api.apify.com/v2/datasets/WkzbQMuFYuamGv3YF/items?signature=abc123",
    "generalAccess": "RESTRICTED",
    "stats": {
      "readCount": 22,
      "writeCount": 3,
      "storageBytes": 783
    }
  }
}