{
  "openapi": "3.0.1",
  "info": {
    "title": "Export Dataset to Parquet - Typed Schema for DuckDB & BigQuery",
    "description": "Apify exports JSON, CSV and Excel but not Parquet. Pick any dataset and get typed Parquet files (inferred schema, flattened nested fields, detected timestamps) in the key-value store, optionally pushed to S3, R2 or Google Cloud Storage. Ready for DuckDB, BigQuery, Athena.",
    "version": "1.0",
    "x-build-id": "Ah1W5twmBTqhqWPT8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/that_red_bird~dataset-to-parquet/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-that_red_bird-dataset-to-parquet",
        "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/that_red_bird~dataset-to-parquet/runs": {
      "post": {
        "operationId": "runs-sync-that_red_bird-dataset-to-parquet",
        "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/that_red_bird~dataset-to-parquet/run-sync": {
      "post": {
        "operationId": "run-sync-that_red_bird-dataset-to-parquet",
        "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",
        "properties": {
          "datasets": {
            "title": "Dataset(s) to convert",
            "type": "array",
            "description": "Pick the dataset of any Actor run. Use the picker rather than typing an ID: it gives this Actor permission to read your dataset. Several datasets are appended into one Parquet schema. Leave empty to use the pasted rows below, or the built-in demo."
          },
          "rows": {
            "title": "Rows (JSON)",
            "type": "array",
            "description": "Optional. Paste rows as JSON objects, e.g. {\"id\":1,\"name\":\"Ann\",\"tags\":[\"a\"]}. Nested objects are flattened by default.",
            "default": []
          },
          "rowsCsv": {
            "title": "Rows (CSV or JSON text)",
            "type": "string",
            "description": "Optional. Paste a CSV (first row = column names; numbers and true/false are detected) or a JSON array.",
            "default": ""
          },
          "fileName": {
            "title": "Output file name",
            "type": "string",
            "description": "Base name of the Parquet file in the key-value store (.parquet is added). With several files the name gets -part-0001, -part-0002 and so on.",
            "default": "dataset"
          },
          "nestedFields": {
            "title": "Nested objects",
            "enum": [
              "flatten",
              "json"
            ],
            "type": "string",
            "description": "flatten turns {\"a\":{\"b\":1}} into a column a_b (best for BigQuery, Athena, DuckDB). json keeps each top-level nested object as one JSON column. Arrays are always kept as JSON columns.",
            "default": "flatten"
          },
          "inferDates": {
            "title": "Detect timestamps",
            "type": "boolean",
            "description": "Columns where every value is an ISO 8601 date or date-time (2026-05-01, 2026-05-01T10:00:00Z) become TIMESTAMP columns. Date-times without a time zone are read as UTC.",
            "default": true
          },
          "sanitizeColumnNames": {
            "title": "Warehouse-safe column names",
            "type": "boolean",
            "description": "Replace characters other than letters, digits and underscore with an underscore (BigQuery and Athena require this) and make names unique. Turn off to keep the original names.",
            "default": true
          },
          "rowsPerFile": {
            "title": "Rows per file",
            "minimum": 1000,
            "maximum": 2000000,
            "type": "integer",
            "description": "Maximum rows in one Parquet file. Bigger datasets are split into several files with the same schema; each file is billed per started 1,000 rows.",
            "default": 250000
          },
          "maxRows": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 20000000,
            "type": "integer",
            "description": "Safety limit on the number of rows converted in one run.",
            "default": 1000000
          },
          "s3Bucket": {
            "title": "S3 bucket (optional)",
            "type": "string",
            "description": "Also upload each Parquet file to this Amazon S3 bucket (or any S3-compatible service such as Cloudflare R2, MinIO or Backblaze B2). Needs the access key fields below. The files are always kept in the key-value store too.",
            "default": ""
          },
          "s3Region": {
            "title": "S3 region",
            "type": "string",
            "description": "AWS region of the bucket, for example us-east-1 or eu-west-1. For R2 use auto.",
            "default": "us-east-1"
          },
          "s3KeyPrefix": {
            "title": "S3 key prefix",
            "type": "string",
            "description": "Optional folder inside the bucket, for example scrapes/2026-10/.",
            "default": ""
          },
          "s3AccessKeyId": {
            "title": "S3 access key ID",
            "type": "string",
            "description": "Access key ID of an IAM user that may PutObject into the bucket. Use a key limited to this bucket."
          },
          "s3SecretAccessKey": {
            "title": "S3 secret access key",
            "type": "string",
            "description": "Secret access key that belongs to the access key ID. Stored encrypted by Apify."
          },
          "s3SessionToken": {
            "title": "S3 session token",
            "type": "string",
            "description": "Only for temporary credentials (AWS STS). Leave empty otherwise."
          },
          "s3Endpoint": {
            "title": "S3-compatible endpoint",
            "type": "string",
            "description": "Only for non-AWS services, for example https://<account>.r2.cloudflarestorage.com or https://s3.us-west-004.backblazeb2.com. Leave empty for Amazon S3.",
            "default": ""
          },
          "gcsBucket": {
            "title": "Google Cloud Storage bucket (optional)",
            "type": "string",
            "description": "Also upload each Parquet file to this Google Cloud Storage bucket. Needs the service-account JSON below.",
            "default": ""
          },
          "gcsKeyPrefix": {
            "title": "GCS object prefix",
            "type": "string",
            "description": "Optional folder inside the bucket, for example scrapes/2026-10/.",
            "default": ""
          },
          "gcsServiceAccountJson": {
            "title": "GCS service-account JSON",
            "type": "string",
            "description": "Paste the full JSON key of a service account with Storage Object Creator access to the bucket. Stored encrypted by Apify."
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}