v4

latestOpenAPI 3.1.2Apache 2.02026-08-04231238976.2 KB
Storage/Datasets

Store items

Appends an item or an array of items to the end of the dataset. The POST payload is a JSON object or a JSON array of objects to save into the dataset.

If the data you attempt to store in the dataset is invalid (meaning any of the items received by the API fails the validation), the whole request is discarded and the API will return a response with status code 400. For more information about dataset schema validation, see Dataset schema.

IMPORTANT: The limit of request payload size for the dataset is 5 MB. If the array exceeds the size, you'll need to split it into a number of smaller arrays.

To save bandwidth and speed up your upload, you can send the request payload compressed and set the Content-Encoding header accordingly.

Below is a list of supported Content-Encoding types.

  • Brotli: Content-Encoding: br
  • Gzip: Content-Encoding: gzip
  • Deflate: Content-Encoding: deflate
post/v2/datasets/{datasetId}/items

Path parameters

datasetIdstring required
Example:WkzbQMuFYuamGv3YF

Dataset ID or username~dataset-name.

Headers

Content-Encoding'br' | 'gzip' | 'deflate' | 'identity'

Compression encoding of the request body.

Request body

PutItemsRequest required

The request body containing the item(s) to add to the dataset. Can be a single object or an array of objects. Each object represents one dataset item.

OR
PutItemsRequest[] required

Example request

{
  "title": "Example Item",
  "url": "https://example.com",
  "price": 19.99
}

Response

object required

Example response

{}