{
  "openapi": "3.0.1",
  "info": {
    "title": "S3 Uploader",
    "description": "Upload data from an Apify dataset to an Amazon S3 bucket. Providing various filters and transformation options, this Actor allows precise control over data structure, formatting, and upload settings to ensure seamless integration into your data pipeline.",
    "version": "0.0",
    "x-build-id": "UkWwyMJI88NAoH8Kx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/apify~s3-uploader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-apify-s3-uploader",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/apify~s3-uploader/runs": {
      "post": {
        "operationId": "runs-sync-apify-s3-uploader",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/apify~s3-uploader/run-sync": {
      "post": {
        "operationId": "run-sync-apify-s3-uploader",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "accessKeyId",
          "secretAccessKey",
          "region",
          "bucket",
          "datasetId",
          "key"
        ],
        "properties": {
          "accessKeyId": {
            "title": "Access key ID",
            "type": "string",
            "description": "Your AWS access key ID used for authorization of the upload. You can get it from *AWS Console* -> *IAM* -> *Users* -> *Create user / Select existing user* -> *Security credentials* -> *Access keys*."
          },
          "secretAccessKey": {
            "title": "Secret access key",
            "type": "string",
            "description": "Your AWS secret access key used for authorization of the upload. You can get it from *AWS Console* -> *IAM* -> *Users* -> *Create user / Select existing user* -> *Security credentials* -> *Access keys* -> *Create access key*. The secret access key will be displayed only once, upon creation of the access key."
          },
          "region": {
            "title": "Region",
            "enum": [
              "af-south-1",
              "ap-east-1",
              "ap-northeast-1",
              "ap-northeast-2",
              "ap-northeast-3",
              "ap-south-1",
              "ap-south-2",
              "ap-southeast-1",
              "ap-southeast-2",
              "ap-southeast-3",
              "ap-southeast-4",
              "ap-southeast-5",
              "ap-southeast-7",
              "ca-central-1",
              "ca-west-1",
              "cn-north-1",
              "cn-northwest-1",
              "eu-central-1",
              "eu-central-2",
              "eu-north-1",
              "eu-south-1",
              "eu-south-2",
              "eu-west-1",
              "eu-west-2",
              "eu-west-3",
              "il-central-1",
              "me-central-1",
              "me-south-1",
              "mx-central-1",
              "sa-east-1",
              "us-east-1",
              "us-east-2",
              "us-gov-east-1",
              "us-gov-west-1",
              "us-west-1",
              "us-west-2"
            ],
            "type": "string",
            "description": "The AWS region where the target S3 bucket is located. You can get it from *AWS Console* -> *S3* -> *Create bucket / Select existing bucket* -> *Properties*."
          },
          "bucket": {
            "title": "Bucket",
            "type": "string",
            "description": "The name of the target S3 bucket."
          },
          "key": {
            "title": "Key",
            "type": "string",
            "description": "The object key, which serves as an identifier for the uploaded data in the S3 bucket. It can include an optional prefix. If an object with the same key already exists, it will be overwritten with the uploaded data."
          },
          "datasetId": {
            "title": "Dataset ID",
            "type": "string",
            "description": "The Apify dataset ID from which data will be retrieved for the upload."
          },
          "format": {
            "title": "Format",
            "enum": [
              "json",
              "jsonl",
              "html",
              "csv",
              "xml",
              "xlsx",
              "rss"
            ],
            "type": "string",
            "description": "The format of the uploaded data.",
            "default": "json"
          },
          "fields": {
            "title": "Select",
            "type": "array",
            "description": "Fields to include in the output. If not specified, all fields will be included."
          },
          "omit": {
            "title": "Omit",
            "type": "array",
            "description": "Fields to exclude from the output."
          },
          "unwind": {
            "title": "Unwind fields",
            "type": "array",
            "description": "Fields to unwind. If the field is an array, every element will become a separate record and merged with the parent object. If the unwound field is an object, it is merged with the parent object. If the unwound field is missing or its value is neither an array nor an object, it cannot be merged with a parent object, and the item gets preserved as is. If you specify multiple fields, they are unwound in the order you specify."
          },
          "flatten": {
            "title": "Flatten fields",
            "type": "array",
            "description": "Fields to transform from nested objects into a flat structure."
          },
          "offset": {
            "title": "Offset",
            "minimum": 0,
            "type": "integer",
            "description": "Number of items to skip from the beginning of the dataset."
          },
          "limit": {
            "title": "Limit",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of items to upload."
          },
          "clean": {
            "title": "Clean only",
            "type": "boolean",
            "description": "If enabled, only clean dataset items and their non-hidden fields will be uploaded.",
            "default": true
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}