{
  "openapi": "3.0.1",
  "info": {
    "title": "Spreadsheet Converter: Excel to JSON and CSV",
    "description": "Convert Excel to JSON, CSV to JSON, JSON to CSV and Excel to CSV. Reads XLSX, XLS, ODS, CSV, TSV, JSON and Apify datasets. Writes CSV, XLSX, JSON, JSON Lines or dataset rows. Detects headers, numbers and dates, flattens nested JSON, picks sheets and removes duplicates.",
    "version": "0.1",
    "x-build-id": "TVjrT7Ph4KsbEp7Jf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/maliksaid~spreadsheet-converter/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-maliksaid-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/maliksaid~spreadsheet-converter/runs": {
      "post": {
        "operationId": "runs-sync-maliksaid-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/maliksaid~spreadsheet-converter/run-sync": {
      "post": {
        "operationId": "run-sync-maliksaid-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": "Links to the files to convert, one per line. XLSX, XLS, ODS, XLSB, CSV, TSV, JSON and JSON Lines work. The Actor reads robots.txt on each host and skips files it does not allow. Leave empty to convert only the key-value store, datasets or pasted data below.",
            "items": {
              "type": "string"
            }
          },
          "keyValueStoreId": {
            "title": "Key-value store with files",
            "type": "string",
            "description": "Optional. Pick one of your key-value stores that holds uploaded spreadsheet files. The Actor only reads this store."
          },
          "keyValueStoreKeys": {
            "title": "Record keys",
            "type": "array",
            "description": "Optional. Convert only these records of the store. Leave empty to convert every spreadsheet record in the store.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "datasetIds": {
            "title": "Datasets to convert",
            "type": "array",
            "description": "Optional. Pick Apify datasets, for example the results of another Actor. Each dataset becomes one CSV, XLSX, JSON or JSON Lines file."
          },
          "pastedData": {
            "title": "Pasted data",
            "type": "string",
            "description": "Optional. Paste CSV, TSV, JSON or JSON Lines text, or a base64 file of any supported format, for example from n8n, Make or an API call. Up to 4 MB. For larger files, use a URL or a key-value store. The format is detected like a downloaded file."
          },
          "pastedFileName": {
            "title": "Pasted data file name",
            "type": "string",
            "description": "Name for the pasted data in the results and output files. The Actor adds the detected extension.",
            "default": "pasted"
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "dataset",
              "csv",
              "tsv",
              "xlsx",
              "json",
              "jsonl"
            ],
            "type": "string",
            "description": "Dataset rows: each row becomes one dataset item, which you can export from Apify in any format. The file formats save one file per sheet (XLSX: one workbook per input file) in the run's key-value store.",
            "default": "dataset"
          },
          "mergeIntoOneFile": {
            "title": "Merge all files into one output",
            "type": "boolean",
            "description": "Append the rows of every file and sheet into one output with the union of all columns. Turn on 'Add source columns' to see where each row came from.",
            "default": false
          },
          "csvBom": {
            "title": "Add a byte order mark to CSV and TSV files",
            "type": "boolean",
            "description": "Turn on when you open the CSV in Excel and the file has accents or non-Latin text, such as Arabic or Chinese. Excel then reads it as UTF-8.",
            "default": false
          },
          "maxRowsPerFile": {
            "title": "Maximum rows per file",
            "minimum": 0,
            "type": "integer",
            "description": "Stop reading a file after this many saved rows. 0 means all rows.",
            "default": 0
          },
          "maxFiles": {
            "title": "Maximum files",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Convert at most this many files in one run. The Actor converts at most 1,000 files per run.",
            "default": 1000
          },
          "sheets": {
            "title": "Sheets",
            "type": "array",
            "description": "Sheet names or tab numbers (1 is the first tab) to convert. Leave empty to convert every sheet.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "headerMode": {
            "title": "Header row",
            "enum": [
              "auto",
              "firstRow",
              "none",
              "rowNumber"
            ],
            "type": "string",
            "description": "Auto finds the first full row of text labels in the first 10 rows and skips title rows above it. First row uses row 1. None names columns column_1, column_2 and so on. Row number uses the row you set below.",
            "default": "auto"
          },
          "headerRowNumber": {
            "title": "Header row number",
            "minimum": 1,
            "type": "integer",
            "description": "Used only when Header row is 'Row number below'. Row 1 is the first row of the sheet.",
            "default": 1
          },
          "inputFormat": {
            "title": "Input format",
            "enum": [
              "auto",
              "csv",
              "tsv",
              "xlsx",
              "xls",
              "ods",
              "json",
              "jsonl"
            ],
            "type": "string",
            "description": "Auto reads the file's first bytes, so a wrong file extension does not matter. Set a format only when auto-detection picks the wrong one.",
            "default": "auto"
          },
          "delimiter": {
            "title": "CSV delimiter",
            "type": "string",
            "description": "Auto picks comma, semicolon, tab or pipe from the first lines. Type one character to force it. Type 'tab' for a tab.",
            "default": "auto"
          },
          "encoding": {
            "title": "Text encoding",
            "enum": [
              "auto",
              "utf8",
              "latin1",
              "utf16le"
            ],
            "type": "string",
            "description": "For CSV and TSV files. Auto reads a byte order mark, then checks for UTF-8, then falls back to Latin-1.",
            "default": "auto"
          },
          "jsonPath": {
            "title": "JSON path to the records",
            "type": "string",
            "description": "For JSON files whose records sit inside an object, for example 'data.items'. Leave empty to use a top-level list or the first list inside the object.",
            "default": ""
          },
          "inferTypes": {
            "title": "Detect numbers, dates and true/false",
            "type": "boolean",
            "description": "Turn CSV text such as '12.5', '1,200' and 'true' into numbers and booleans, and ISO dates into dates. Codes with leading zeros, such as '008', stay text. Spreadsheet cells keep the type they have in the file.",
            "default": true
          },
          "decimalComma": {
            "title": "Numbers use a decimal comma",
            "type": "boolean",
            "description": "Turn on for European CSV files where '1.234,5' means one thousand two hundred thirty-four and a half.",
            "default": false
          },
          "dateOrder": {
            "title": "Day and month order in text dates",
            "enum": [
              "none",
              "DMY",
              "MDY"
            ],
            "type": "string",
            "description": "Convert text dates such as '03/04/2026' to ISO dates. Choose the order your file uses. 'Leave as text' keeps them unchanged.",
            "default": "none"
          },
          "columns": {
            "title": "Keep only these columns",
            "type": "array",
            "description": "Column names to keep, in this order. Use the names in the file (nested JSON fields as 'parent.child'). Leave empty to keep every column.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "renameColumns": {
            "title": "Rename columns",
            "type": "object",
            "description": "Map old column names to new ones, for example {\"Entity\": \"country\"}.",
            "default": {}
          },
          "dedupeBy": {
            "title": "Remove duplicates by",
            "type": "array",
            "description": "Keep only the first row for each value of these columns. Use * to remove rows that are identical in every column. Leave empty to keep duplicates.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "filters": {
            "title": "Keep only rows that match",
            "type": "array",
            "description": "Keep only rows that match. One rule per line: column, operator, value, for example \"Price >= 10\" or \"Country = Jordan\". Operators: =, !=, <, <=, >, >=, contains, starts with, is empty, is not empty. Numbers compare as numbers; text compares ignore case. Filtered rows are free.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "filterMode": {
            "title": "Rows must match",
            "enum": [
              "all",
              "any"
            ],
            "type": "string",
            "description": "Keep a row when it matches all rules, or any one rule.",
            "default": "all"
          },
          "sortBy": {
            "title": "Sort by",
            "type": "array",
            "description": "Sort rows by these columns. Add \" desc\" after a name for largest first, for example \"Price desc\". Sorting holds the rows in memory: up to about 1,000,000 short rows at 512 MB. A row limit applies before sorting.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "flattenNested": {
            "title": "Flatten nested JSON",
            "enum": [
              "auto",
              "always",
              "never"
            ],
            "type": "string",
            "description": "Turn nested objects into 'parent.child' columns. Auto flattens for CSV, TSV and XLSX outputs and keeps nesting for JSON, JSON Lines and dataset outputs.",
            "default": "auto"
          },
          "arrayMode": {
            "title": "Lists inside JSON records",
            "enum": [
              "join",
              "index",
              "json"
            ],
            "type": "string",
            "description": "How flattening handles lists. Join puts simple lists in one cell, separated by '; '. Index makes one column per position ('tags.0', 'tags.1'). JSON keeps the list as JSON text.",
            "default": "join"
          },
          "skipEmptyRows": {
            "title": "Skip empty rows",
            "type": "boolean",
            "description": "Drop rows where every cell is empty.",
            "default": true
          },
          "trimValues": {
            "title": "Trim spaces",
            "type": "boolean",
            "description": "Remove spaces at the start and end of text cells. Cells that become empty are saved as empty.",
            "default": true
          },
          "addSourceColumns": {
            "title": "Add source columns",
            "type": "boolean",
            "description": "Add _file, _sheet and _row to each row, so you can trace every row back to its file, sheet and row number.",
            "default": false
          },
          "maxFileMegabytes": {
            "title": "Maximum file size (MB)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Skip files larger than this. CSV, TSV, JSON Lines and XLSX are read as streams. XLS, ODS, XLSB and JSON are read whole and have a lower limit that depends on the run memory (32 MB at 512 MB).",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}