{
  "openapi": "3.0.1",
  "info": {
    "title": "Excel, CSV & JSON Converter and Cleaner",
    "description": "Convert Excel (xlsx, xls), CSV, TSV, JSON and JSON Lines files to JSON, CSV or XLSX and clean them: trim, drop empty rows and columns, snake_case headers, remove duplicates, detect numbers and dates. Every row lands in the dataset.",
    "version": "0.1",
    "x-build-id": "q0eYKHScv5Hc3lsBt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/divinxxii~spreadsheet-converter/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-divinxxii-spreadsheet-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/divinxxii~spreadsheet-converter/runs": {
      "post": {
        "operationId": "runs-sync-divinxxii-spreadsheet-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/divinxxii~spreadsheet-converter/run-sync": {
      "post": {
        "operationId": "run-sync-divinxxii-spreadsheet-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 URLs of .xlsx, .xls, .csv, .tsv, .json or .jsonl files (up to 100 MB each, 50 files). The host's robots.txt is honoured. Leave empty (with no store keys) to convert a small built-in sample.",
            "items": {
              "type": "string"
            }
          },
          "kvStoreKeys": {
            "title": "Uploaded files (key-value store keys)",
            "type": "array",
            "description": "Keys of files you uploaded to a key-value store. They are read from the run's default store, or from the store named below.",
            "items": {
              "type": "string"
            }
          },
          "kvStoreName": {
            "title": "Key-value store name",
            "type": "string",
            "description": "Name of one of your own named key-value stores that holds the keys above. Leave empty for the run's default store."
          },
          "inputFormat": {
            "title": "Input format",
            "enum": [
              "auto",
              "xlsx",
              "xls",
              "csv",
              "tsv",
              "json",
              "jsonl"
            ],
            "type": "string",
            "description": "Auto-detected from the file contents and name. Set it when a file has the wrong extension.",
            "default": "auto"
          },
          "sheets": {
            "title": "Sheets (Excel)",
            "type": "array",
            "description": "Sheet names or 1-based sheet numbers to convert. Empty: the first visible sheet. A name that does not exist in a file stops the run before anything is charged.",
            "items": {
              "type": "string"
            }
          },
          "allSheets": {
            "title": "Convert all visible sheets",
            "type": "boolean",
            "description": "Convert every visible sheet of each workbook. Turn on 'Add source columns' to tell the sheets apart.",
            "default": false
          },
          "outputFormat": {
            "title": "Converted file format",
            "enum": [
              "json",
              "jsonl",
              "csv",
              "xlsx"
            ],
            "type": "string",
            "description": "Format of the converted file saved in the key-value store (converted.json, .jsonl, .csv or .xlsx). The dataset always has every row, and Apify can export it as JSON, CSV, Excel, XML or HTML.",
            "default": "json"
          },
          "hasHeader": {
            "title": "First row is a header",
            "type": "boolean",
            "description": "Spreadsheets and CSV: the first non-empty row holds the column names. Turn off to get column_1, column_2 and keep the first row as data.",
            "default": true
          },
          "trimWhitespace": {
            "title": "Trim whitespace",
            "type": "boolean",
            "description": "Strip leading and trailing spaces, non-breaking spaces and zero-width characters from every cell and header. Blank cells become empty (null).",
            "default": true
          },
          "dropEmptyRows": {
            "title": "Drop empty rows",
            "type": "boolean",
            "description": "Remove rows where every cell is empty. Dropped rows are free.",
            "default": true
          },
          "dropEmptyColumns": {
            "title": "Drop empty columns",
            "type": "boolean",
            "description": "Remove columns with no value in any data row (the header does not count). Off by default so the output keeps every column of the input.",
            "default": false
          },
          "normalizeHeaders": {
            "title": "Normalize headers to snake_case",
            "type": "boolean",
            "description": "' Order ID ', 'orderId' and 'Order-ID' all become order_id. Accents are removed. Blank headers become column_N and repeats get _2, _3.",
            "default": false
          },
          "dedupeRows": {
            "title": "Remove duplicate rows",
            "type": "boolean",
            "description": "Keep the first occurrence of each row, across all sheets and files of the run. Duplicates are not pushed and not charged.",
            "default": false
          },
          "dedupeColumns": {
            "title": "Duplicates: compare only these columns",
            "type": "array",
            "description": "Column names (original or snake_case) that decide whether a row is a duplicate, e.g. email. Setting this turns on duplicate removal. Empty: the whole row must match.",
            "items": {
              "type": "string"
            }
          },
          "dedupeIgnoreCase": {
            "title": "Duplicates: ignore letter case",
            "type": "boolean",
            "description": "Treat 'ACME' and 'acme' as the same value when looking for duplicates.",
            "default": false
          },
          "detectTypes": {
            "title": "Detect numbers, booleans and dates",
            "type": "boolean",
            "description": "Turn text such as 42, 1,200.50, true and 2026-10-01 into numbers, booleans and dates. Leading-zero values (007), digit strings over 15 digits and timezone-aware timestamps stay text.",
            "default": false
          },
          "dateFormat": {
            "title": "Date format for dd/mm/yyyy text",
            "enum": [
              "iso",
              "dmy",
              "mdy"
            ],
            "type": "string",
            "description": "ISO dates (2026-10-01) are always detected. Choose how to read 03/04/2026: day first (UK) or month first (US). Only used with 'Detect types'.",
            "default": "iso"
          },
          "yesNoAsBoolean": {
            "title": "Treat yes/no as booleans",
            "type": "boolean",
            "description": "Also turn 'yes' and 'no' into true and false. Off by default because 'NO' can be a country code. Only used with 'Detect types'.",
            "default": false
          },
          "addSourceColumns": {
            "title": "Add source columns",
            "type": "boolean",
            "description": "Add sourceFile, sheet and sourceRow to every row. Useful with several files or sheets.",
            "default": false
          },
          "maxRows": {
            "title": "Maximum rows",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stop after this many output rows (0 = no limit up to the hard cap of 1,000,000 rows per run).",
            "default": 0
          },
          "jsonRecordsPath": {
            "title": "JSON records path",
            "type": "string",
            "description": "JSON files only: dotted path to the array of records, e.g. data.items. Empty: use the top-level array, or the only list of objects in the top-level object."
          },
          "flattenNested": {
            "title": "Flatten nested JSON objects",
            "type": "boolean",
            "description": "JSON and JSON Lines: turn {\"a\": {\"b\": 1}} into a column a.b. Off: nested values stay as they are (and become JSON text in CSV/XLSX).",
            "default": false
          },
          "csvDelimiter": {
            "title": "CSV delimiter",
            "type": "string",
            "description": "auto, or one character such as ; or | or the word tab. Auto reads comma, semicolon, tab and pipe.",
            "default": "auto"
          },
          "csvAddBom": {
            "title": "CSV output: add UTF-8 BOM",
            "type": "boolean",
            "description": "Lets Excel open the converted CSV with accents intact. Turn off for tools that dislike a BOM.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}