{
  "openapi": "3.0.1",
  "info": {
    "title": "Excel to JSON Converter - XLSX, XLS, ODS & CSV to JSON",
    "description": "Convert Excel (XLSX, XLSM, XLS, XLSB), ODS, CSV and Google Sheets files to clean JSON: all or selected sheets, header-row auto-detection, merged-cell fill, ISO dates and typed numbers. Reverse mode exports any dataset, JSON or CSV to a styled XLSX. Pay per file.",
    "version": "0.1",
    "x-build-id": "JVfgcKeZVFTgCBsIt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gazidev~spreadsheet-to-json/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gazidev-spreadsheet-to-json",
        "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/gazidev~spreadsheet-to-json/runs": {
      "post": {
        "operationId": "runs-sync-gazidev-spreadsheet-to-json",
        "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/gazidev~spreadsheet-to-json/run-sync": {
      "post": {
        "operationId": "run-sync-gazidev-spreadsheet-to-json",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "toJson",
              "toExcel"
            ],
            "type": "string",
            "description": "'Spreadsheet → JSON' converts XLSX / XLSM / XLS / XLSB / ODS / CSV / TSV files into JSON rows. 'JSON → Excel' turns an Apify dataset, a JSON URL or a CSV URL into a styled XLSX workbook.",
            "default": "toJson"
          },
          "fileUrls": {
            "title": "Spreadsheet URLs",
            "type": "array",
            "description": "Public URLs of XLSX, XLSM, XLS, XLSB, ODS, CSV or TSV files. Google Sheets links ('Anyone with the link' sharing), Google Drive, Dropbox, OneDrive and GitHub links are converted to direct downloads automatically. The real format is detected from the file content, not the extension.",
            "items": {
              "type": "string"
            }
          },
          "uploadedFile": {
            "title": "Or upload a spreadsheet",
            "type": "string",
            "description": "Upload a file from your computer instead of giving a URL."
          },
          "sheets": {
            "title": "Sheets to convert",
            "type": "array",
            "description": "Sheet names or 1-based sheet numbers (e.g. 'Sales' or '2'). Leave empty to convert every visible sheet.",
            "items": {
              "type": "string"
            }
          },
          "includeHiddenSheets": {
            "title": "Include hidden sheets",
            "type": "boolean",
            "description": "Also convert sheets that are hidden in Excel. Hidden sheets you name in 'Sheets to convert' are always included.",
            "default": false
          },
          "headerRow": {
            "title": "Header row number",
            "minimum": 0,
            "type": "integer",
            "description": "Leave empty to auto-detect the header row (title rows, blank rows and offset tables are skipped automatically). 1 = first row. 0 = the sheet has no header row (columns are named column_A, column_B, ...)."
          },
          "headerRowCount": {
            "title": "Header rows",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Number of stacked header rows to combine (e.g. 'Q1' above 'Sales' becomes 'Q1 Sales'). Leave empty to auto-detect (1, or 2 when the header contains merged group cells)."
          },
          "headerCase": {
            "title": "Column name style",
            "enum": [
              "original",
              "camelCase",
              "snake_case"
            ],
            "type": "string",
            "description": "Keep the header text as it is, or normalise it to camelCase / snake_case keys (handy for databases and code).",
            "default": "original"
          },
          "fillMergedCells": {
            "title": "Fill merged cells",
            "type": "boolean",
            "description": "Copy the value of a merged cell into every cell it spans (e.g. a 'Region' merged over 5 rows appears on all 5 rows).",
            "default": true
          },
          "inferTypes": {
            "title": "Detect types in CSV/TSV",
            "type": "boolean",
            "description": "Convert CSV text to numbers, booleans (true/false) and ISO dates. IDs with leading zeros (e.g. ZIP '02134') and huge integers stay text. Excel/ODS cells keep their native types; dates are always output as ISO 8601.",
            "default": true
          },
          "decimalComma": {
            "title": "Decimal comma (European CSV)",
            "type": "boolean",
            "description": "Read CSV numbers like '1.234,56' as 1234.56. Only needed for CSV/TSV exported with a European locale.",
            "default": false
          },
          "skipEmptyRows": {
            "title": "Skip empty rows",
            "type": "boolean",
            "description": "Drop rows where every cell is empty. Empty columns without a header are always dropped.",
            "default": true
          },
          "trimWhitespace": {
            "title": "Trim whitespace",
            "type": "boolean",
            "description": "Remove leading/trailing spaces from text cells.",
            "default": true
          },
          "csvDelimiter": {
            "title": "CSV delimiter",
            "enum": [
              "auto",
              ",",
              ";",
              "tab",
              "|"
            ],
            "type": "string",
            "description": "Auto-detects comma, semicolon, tab and pipe. Encoding (UTF-8, UTF-8 BOM, UTF-16, Windows-1252) is detected automatically.",
            "default": "auto"
          },
          "outputMode": {
            "title": "Output",
            "enum": [
              "rows",
              "jsonFiles",
              "both"
            ],
            "type": "string",
            "description": "'Dataset rows': one dataset item per spreadsheet row (download as JSON, CSV, Excel or via API). 'JSON file per sheet': one JSON array file per sheet in the key-value store (+ one summary row per sheet). 'Both' does both (same price).",
            "default": "rows"
          },
          "includeRowMetadata": {
            "title": "Add _file, _sheet, _row fields",
            "type": "boolean",
            "description": "Add the source file name, sheet name and original row number to every dataset row.",
            "default": true
          },
          "maxRowsPerSheet": {
            "title": "Max rows per sheet",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many data rows per sheet (0 = no limit). Useful for previews.",
            "default": 0
          },
          "maxFileSizeMb": {
            "title": "Max file size (MB)",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Files larger than this are skipped (not charged).",
            "default": 200
          },
          "maxConcurrency": {
            "title": "Files in parallel",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many files are downloaded and converted at the same time.",
            "default": 3
          },
          "datasetIds": {
            "title": "Dataset IDs (JSON → Excel)",
            "type": "array",
            "description": "Apify dataset IDs to export as XLSX, e.g. the output of another Actor run. In an integration use {{resource.defaultDatasetId}}."
          },
          "sourceUrls": {
            "title": "JSON / CSV URLs (JSON → Excel)",
            "type": "array",
            "description": "URLs returning a JSON array, JSON Lines, an object with an 'items'/'data'/'results' array, or CSV.",
            "items": {
              "type": "string"
            }
          },
          "groupByField": {
            "title": "One sheet per value of field",
            "type": "string",
            "description": "Optional field name (dot notation for nested fields, e.g. 'address.country'). Each distinct value gets its own sheet (max 200 sheets)."
          },
          "combineSources": {
            "title": "Combine all sources into one workbook",
            "type": "boolean",
            "description": "Put every dataset / URL into one XLSX (one sheet per source) instead of one XLSX per source.",
            "default": false
          },
          "outputFileName": {
            "title": "XLSX file name",
            "type": "string",
            "description": "Name of the created workbook in the key-value store (default: the dataset ID or URL file name)."
          },
          "convertIsoDates": {
            "title": "Write ISO dates as Excel dates",
            "type": "boolean",
            "description": "Values like '2024-05-31' or '2024-05-31T10:00:00' become real Excel date cells (sortable, filterable).",
            "default": true
          },
          "maxRows": {
            "title": "Max rows per source",
            "minimum": 0,
            "type": "integer",
            "description": "Only export the first N items of each source (0 = all).",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}