{
  "openapi": "3.0.1",
  "info": {
    "title": "CSV to Parquet Converter: JSON, Datasets & Back",
    "description": "Convert CSV, TSV, JSON, NDJSON files or an Apify dataset into Apache Parquet with typed columns, snappy, zstd or gzip compression and a download link. Also turns Parquet back into CSV, JSON or JSONL. Empty input = free demo.",
    "version": "0.1",
    "x-build-id": "VLUHruZnFajaPmgF5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ucchiii~csv-to-parquet/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ucchiii-csv-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/ucchiii~csv-to-parquet/runs": {
      "post": {
        "operationId": "runs-sync-ucchiii-csv-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/ucchiii~csv-to-parquet/run-sync": {
      "post": {
        "operationId": "run-sync-ucchiii-csv-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": {
          "fileUrls": {
            "title": "File URLs",
            "type": "array",
            "description": "Public http(s) links to CSV, TSV, JSON, NDJSON / JSON Lines or Parquet files, up to 500 MB each and 20 inputs per run. Each file becomes one output file. Leave every input empty for a free demo on built-in sample orders.",
            "items": {
              "type": "string"
            }
          },
          "keyValueStoreId": {
            "title": "Or a key-value store with files",
            "type": "string",
            "description": "Optional. ID or name of a key-value store that holds your files as records (for example files you uploaded in Apify Console, or files saved by another Actor). Converted after the URLs above."
          },
          "keyValueStoreKeys": {
            "title": "Record keys",
            "type": "array",
            "description": "Optional. Keys of the records to convert from the key-value store above, e.g. 'orders.csv'. Leave empty to convert every record in the store (except INPUT), up to 20.",
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Or an Apify dataset",
            "type": "string",
            "description": "Optional. Dataset to convert into one file, for example the results of a scraper run. You can paste a dataset ID or a dataset URL from Apify Console. Up to 2,000,000 items."
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "parquet",
              "csv",
              "json",
              "jsonl"
            ],
            "type": "string",
            "description": "Format of the output files. Default Parquet. Pick CSV, JSON or JSONL to turn Parquet files back into text formats.",
            "default": "parquet"
          },
          "inputFormat": {
            "title": "Input format",
            "enum": [
              "auto",
              "csv",
              "json",
              "jsonl",
              "parquet"
            ],
            "type": "string",
            "description": "Default: detected from the file extension (.csv, .tsv, .json, .jsonl, .ndjson, .parquet), then from the content. Set it when your links have no extension.",
            "default": "auto"
          },
          "delimiter": {
            "title": "CSV delimiter",
            "enum": [
              "auto",
              "comma",
              "semicolon",
              "tab",
              "pipe"
            ],
            "type": "string",
            "description": "Character between the values in CSV inputs. Default: detected from the first lines (.tsv files use tab).",
            "default": "auto"
          },
          "hasHeader": {
            "title": "First CSV row is the header",
            "type": "boolean",
            "description": "On: the first row holds the column names. Off: every row is data and the columns are named column_1, column_2, ...",
            "default": true
          },
          "inferTypes": {
            "title": "Detect column types",
            "type": "boolean",
            "description": "On: numbers, true/false, dates and timestamps get real Parquet types (int64, double, bool, date, timestamp). A column whose later rows do not fit is kept as text and listed in notes. Off: every column is text (string).",
            "default": true
          },
          "encoding": {
            "title": "CSV text encoding",
            "enum": [
              "utf-8",
              "latin-1",
              "cp1252",
              "shift_jis",
              "utf-16"
            ],
            "type": "string",
            "description": "Character encoding of CSV inputs. JSON inputs must be UTF-8.",
            "default": "utf-8"
          },
          "compression": {
            "title": "Parquet compression",
            "enum": [
              "snappy",
              "zstd",
              "gzip",
              "none"
            ],
            "type": "string",
            "description": "Compression codec inside the Parquet file. Snappy is the common default; zstd usually gives smaller files; gzip is read by almost every tool.",
            "default": "snappy"
          },
          "rowGroupSize": {
            "title": "Row group size",
            "minimum": 1000,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum rows per Parquet row group (1,000 to 1,000,000). Larger groups compress better; smaller groups let readers skip more data.",
            "default": 100000
          },
          "flattenNested": {
            "title": "Flatten nested JSON objects",
            "type": "boolean",
            "description": "JSON inputs and datasets: nested objects become dot columns like address.city. Arrays, and objects when this is off, are stored as JSON text.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}