{
  "openapi": "3.0.1",
  "info": {
    "title": "Excel & CSV to JSON: Spreadsheet Rows for AI Agents and n8n",
    "description": "Turn Excel (.xlsx, .xls) and CSV files into clean JSON: one item per row, keyed by the header. Finds the header row under title lines, fills merged cells, keeps numbers, dates and booleans typed, and decodes Big5, GBK, Shift-JIS and EUC-KR CSVs.",
    "version": "0.1",
    "x-build-id": "TIi5KNx5CwkYboSVl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/arched_axolotl~spreadsheet-to-json/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-arched_axolotl-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/arched_axolotl~spreadsheet-to-json/runs": {
      "post": {
        "operationId": "runs-sync-arched_axolotl-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/arched_axolotl~spreadsheet-to-json/run-sync": {
      "post": {
        "operationId": "run-sync-arched_axolotl-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": {
          "fileUrls": {
            "title": "Spreadsheet URLs",
            "type": "array",
            "description": "Links to the files to convert, one per line. Supported: Excel .xlsx / .xlsm, legacy Excel .xls, CSV and TSV. The type is detected from the file content, so the URL does not need a file extension. Links must be publicly downloadable; a Google Sheets link works when the sheet is shared with 'anyone with the link'. An entry may also be a data: URL such as 'data:application/octet-stream;base64,<content>'.",
            "items": {
              "type": "string"
            }
          },
          "uploadedFiles": {
            "title": "Or upload files",
            "type": "array",
            "description": "Upload spreadsheets from your computer instead of (or in addition to) giving URLs. Used in Apify Console; API and agent callers should use 'fileUrls' or 'files'."
          },
          "files": {
            "title": "Files as base64 content",
            "type": "array",
            "description": "For callers that hold the file content instead of a URL (n8n binary data, AI agents). A list of objects such as {\"fileName\": \"orders.xlsx\", \"base64\": \"<base64 content>\"}. The file name is optional but helps as a title. Keep base64 files to a few MB; for larger files pass a download URL in 'fileUrls'."
          },
          "outputMode": {
            "title": "Output mode",
            "enum": [
              "rows",
              "sheets"
            ],
            "type": "string",
            "description": "rows (default): one dataset item per spreadsheet row, with the column headers as keys. Best for n8n (each row becomes one n8n item) and for exporting. sheets: one item per sheet, with all its rows in a 'rows' array plus headers and row count. Best for an AI agent that wants a whole table in one result.",
            "default": "rows"
          },
          "sheets": {
            "title": "Sheets to read",
            "type": "array",
            "description": "Sheet names (case-insensitive) or sheet numbers starting at 1, for example [\"Orders\"] or [\"1\", \"3\"]. Leave empty to read every visible sheet. Ignored for CSV files.",
            "items": {
              "type": "string"
            }
          },
          "maxRowsPerSheet": {
            "title": "Max rows per sheet",
            "minimum": 1,
            "maximum": 5000000,
            "type": "integer",
            "description": "Return at most this many data rows from each sheet. Use a small number such as 20 to preview a file or to keep an AI agent's context small. The OUTPUT record tells you when a sheet was cut.",
            "default": 100000
          },
          "headerRow": {
            "title": "Header row number",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Row number (starting at 1) that holds the column names. 0 (default) detects it automatically: title and note lines above the table are skipped and the first row that is as wide as the data and contains only text is used. Set it when the detection picks the wrong row.",
            "default": 0
          },
          "hasHeader": {
            "title": "File has a header row",
            "type": "boolean",
            "description": "Turn off for files without column names. Keys are then column_1, column_2 and so on, and every row is data.",
            "default": true
          },
          "fillMergedCells": {
            "title": "Fill merged cells",
            "type": "boolean",
            "description": "Excel stores the value of a merged cell only in its first cell. With this on, every row covered by the merge gets the value (for example a region name merged over several rows). Applies to .xlsx files up to 20 MB and to .xls files.",
            "default": true
          },
          "includeHiddenSheets": {
            "title": "Include hidden sheets",
            "type": "boolean",
            "description": "Also read sheets that are hidden in Excel. A hidden sheet named explicitly in 'sheets' is always read.",
            "default": false
          },
          "keyStyle": {
            "title": "Key names",
            "enum": [
              "original",
              "snake_case",
              "camelCase"
            ],
            "type": "string",
            "description": "How column headers become JSON keys. original: as written in the file (\"Unit Price\"). snake_case: unit_price. camelCase: unitPrice. Chinese, Japanese, Korean and accented letters are kept in every style. Empty headers become column_N and duplicate headers get a _2, _3 suffix.",
            "default": "original"
          },
          "inferTypes": {
            "title": "Convert CSV text to numbers and booleans",
            "type": "boolean",
            "description": "CSV cells are text. With this on, values that are unambiguously numbers (42, 3.5, 1,250.5) or true/false become JSON numbers and booleans. Values with leading zeros (postcodes, phone numbers, product codes), percentages, dates and numbers longer than 15 digits stay text. Excel files always keep the cell types stored in the workbook.",
            "default": true
          },
          "includeSource": {
            "title": "Add _file, _sheet and _row to each row",
            "type": "boolean",
            "description": "Add the file name, sheet name and original spreadsheet row number to every row item, so rows from several files and sheets can be told apart and traced back. Turn off to get only the column values.",
            "default": true
          },
          "delimiter": {
            "title": "CSV delimiter",
            "type": "string",
            "description": "Separator of CSV files: auto (default, detected from the content), comma, semicolon, tab, pipe, or any single character.",
            "default": "auto"
          },
          "encoding": {
            "title": "CSV text encoding",
            "type": "string",
            "description": "Text encoding of CSV files: auto (default) handles UTF-8, UTF-16, Big5, GBK/GB18030, Shift-JIS, EUC-KR and Windows-1252. Set a name such as big5 or cp1252 to force one.",
            "default": "auto"
          },
          "maxFileSizeMb": {
            "title": "Max file size (MB)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Files larger than this are not downloaded and are reported with an error.",
            "default": 50
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Usually not needed. Turn on Apify Proxy only if the server hosting your files refuses direct downloads.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}