{
  "openapi": "3.0.1",
  "info": {
    "title": "CSV / XLSX Converter: CSV, TSV, JSON, NDJSON",
    "description": "Convert CSV, TSV, XLSX, JSON and NDJSON files from URLs or Apify datasets. Auto-detects encoding (UTF-8, Shift_JIS, cp1252), flattens nested JSON, selects and renames columns. Empty input = free demo. $0.05 per 1,000 rows.",
    "version": "0.1",
    "x-build-id": "sGG51QPzJdCZ2crtK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ucchiii~csv-xlsx-converter/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ucchiii-csv-xlsx-converter",
        "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-xlsx-converter/runs": {
      "post": {
        "operationId": "runs-sync-ucchiii-csv-xlsx-converter",
        "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-xlsx-converter/run-sync": {
      "post": {
        "operationId": "run-sync-ucchiii-csv-xlsx-converter",
        "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, XLSX, JSON or NDJSON files, one per entry (up to 50 files and 50 MB each). Links to internal networks are blocked. Leave this AND 'Apify datasets' empty to run a free demo on a built-in sample (not charged).",
            "items": {
              "type": "string"
            }
          },
          "datasetIds": {
            "title": "Apify datasets",
            "type": "array",
            "description": "Dataset IDs (the 'defaultDatasetId' of a finished run) to convert to a file. Each dataset becomes one output file. You can paste a dataset URL from Apify Console too. Up to 500,000 rows per dataset."
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "xlsx",
              "csv",
              "tsv",
              "json",
              "ndjson"
            ],
            "type": "string",
            "description": "Format of the converted file saved to the key-value store. Default: xlsx.",
            "default": "xlsx"
          },
          "inputFormat": {
            "title": "Input format",
            "enum": [
              "auto",
              "csv",
              "tsv",
              "xlsx",
              "json",
              "ndjson"
            ],
            "type": "string",
            "description": "Format of the source files. 'auto' uses the file extension, the content type and the file content. Ignored for Apify datasets. Default: auto.",
            "default": "auto"
          },
          "inputDelimiter": {
            "title": "Input delimiter",
            "enum": [
              "auto",
              ",",
              ";",
              "tab",
              "|"
            ],
            "type": "string",
            "description": "Column separator of CSV-like source files. 'auto' picks the most frequent separator in the header line. Default: auto.",
            "default": "auto"
          },
          "encoding": {
            "title": "Input text encoding",
            "enum": [
              "auto",
              "utf-8",
              "utf-8-sig",
              "cp1252",
              "shift_jis"
            ],
            "type": "string",
            "description": "Character encoding of CSV, TSV and JSON source files. 'auto' tries UTF-8 (with or without BOM), then Shift_JIS (only when it finds Japanese kana), then Windows-1252. Output is always UTF-8. Default: auto.",
            "default": "auto"
          },
          "sheetName": {
            "title": "Sheet name (XLSX input)",
            "type": "string",
            "description": "Name of the worksheet to read from an XLSX source (case-insensitive). Empty = the first sheet. Also used as the sheet name of an XLSX output. A missing sheet fails with the list of available names."
          },
          "select": {
            "title": "Keep only these columns",
            "type": "array",
            "description": "Columns to output, in this order. For flattened JSON use dot names such as 'address.city'; a parent name such as 'address' keeps everything under it. Empty = all columns.",
            "items": {
              "type": "string"
            }
          },
          "rename": {
            "title": "Rename columns",
            "type": "object",
            "description": "Map of current column name to new name, e.g. {\"sepal_length\": \"sepalLength\"}. Use names as they are after flattening and before renaming. Two columns cannot share a new name."
          },
          "flatten": {
            "title": "Flatten nested JSON",
            "type": "boolean",
            "description": "For JSON, NDJSON and dataset sources: turn nested objects into columns with dot keys (address.city). Turn off to keep nested values as JSON text in one cell (CSV, TSV, XLSX) or as nested JSON (JSON, NDJSON). Default: on.",
            "default": true
          },
          "flattenSeparator": {
            "title": "Flatten separator",
            "type": "string",
            "description": "Text that joins nested key names, e.g. '.' gives address.city and '_' gives address_city. Max 5 characters. Default: '.'.",
            "default": "."
          },
          "arrayMode": {
            "title": "Arrays when flattening",
            "enum": [
              "json",
              "join"
            ],
            "type": "string",
            "description": "How arrays inside nested JSON become cells. 'join' only joins numbers and text; arrays of objects stay as JSON text. Default: json.",
            "default": "json"
          },
          "outputDelimiter": {
            "title": "CSV output delimiter",
            "enum": [
              ",",
              ";",
              "tab",
              "|"
            ],
            "type": "string",
            "description": "Column separator when the output format is CSV. Default: comma.",
            "default": ","
          },
          "csvBom": {
            "title": "CSV: add UTF-8 BOM for Excel",
            "type": "boolean",
            "description": "Adds a byte-order mark to CSV and TSV output so Excel opens non-English text (for example Japanese) correctly. Leave off for pandas, databases and most code.",
            "default": false
          },
          "csvEscapeFormulas": {
            "title": "CSV: neutralize spreadsheet formulas",
            "type": "boolean",
            "description": "Prefix CSV and TSV text cells that start with =, +, @ (or - followed by text) with an apostrophe so Excel never runs them. XLSX output always stores such cells as plain text.",
            "default": false
          },
          "inferTypes": {
            "title": "Detect numbers in CSV / TSV",
            "type": "boolean",
            "description": "Turn plain numbers in CSV and TSV sources into real numbers (important for XLSX and JSON output). Values with leading zeros (ZIP codes), more than 15 digits or exponents stay text. Default: on.",
            "default": true
          },
          "maxRows": {
            "title": "Max rows per file",
            "minimum": 1,
            "maximum": 500000,
            "type": "integer",
            "description": "A file or dataset with more data rows than this fails with a clear message and is not charged (rows are never silently cut). Default and maximum 500,000.",
            "default": 500000
          },
          "fileName": {
            "title": "Output file name",
            "type": "string",
            "description": "File name without extension for the output. With several sources a number is added (name-2). Only letters, digits, dot, dash and underscore are kept. Empty = derived from each source name."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}