{
  "openapi": "3.0.1",
  "info": {
    "title": "CSV to JSON Converter: nested, typed, any shape",
    "description": "Convert CSV files to JSON: detects encoding (Shift_JIS, UTF-8, Windows-1252) and delimiter, types numbers/booleans/null, nests dotted headers, writes arrays, NDJSON or keyed objects. Empty input = free demo.",
    "version": "0.1",
    "x-build-id": "LmGlrEwVIT9evfTEX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ucchiii~csv-to-json/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ucchiii-csv-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/ucchiii~csv-to-json/runs": {
      "post": {
        "operationId": "runs-sync-ucchiii-csv-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/ucchiii~csv-to-json/run-sync": {
      "post": {
        "operationId": "run-sync-ucchiii-csv-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": "File URLs",
            "type": "array",
            "description": "Public http(s) links to CSV, TSV or other delimited text files, one per entry (up to 50 files, 15 MB and 100,000 rows each). Links to internal networks are blocked. Leave this and the other file inputs empty to run a free demo on a built-in sample (not charged).",
            "items": {
              "type": "string"
            }
          },
          "keyValueStoreId": {
            "title": "Or a key-value store with files",
            "type": "string",
            "description": "Optional. ID or name of a key-value store that holds your CSV files as records (for example files you uploaded in Apify Console or saved with another Actor). Converted in addition to the URLs. Text records are read as UTF-8; store files in another encoding as binary records."
          },
          "keyValueStoreKeys": {
            "title": "Record keys",
            "type": "array",
            "description": "Optional. Keys of the records to convert from the key-value store above, for example 'orders.csv'. Leave empty to convert every record in the store except INPUT, up to 50.",
            "items": {
              "type": "string"
            }
          },
          "datasetIds": {
            "title": "Apify datasets with files",
            "type": "array",
            "description": "Optional. Dataset IDs whose items each hold one file: 'contentBase64' (the file bytes, base64-encoded) and optionally 'fileName'. Use this when an earlier step produced the file content. Each item becomes one output file."
          },
          "outputShape": {
            "title": "Output shape",
            "enum": [
              "array",
              "ndjson",
              "keyed",
              "columns"
            ],
            "type": "string",
            "description": "Layout of the JSON file. 'array' is the usual list of row objects. 'ndjson' writes one object per line (good for big files and loaders). 'keyed' needs 'Key column' and gives an object keyed by that column's values, which must be unique. 'columns' gives one array per column. Default: array.",
            "default": "array"
          },
          "keyColumn": {
            "title": "Key column",
            "type": "string",
            "description": "Only for the 'keyed' shape: the header of the column whose values become the keys, for example 'id'. Values must be filled and unique, otherwise the file fails (nothing charged). The key stays inside each object too."
          },
          "inferTypes": {
            "title": "Detect numbers, true/false and null",
            "type": "boolean",
            "description": "On: a column where every filled cell is a number becomes JSON numbers, every cell true/false becomes booleans, empty cells and the word null become null. Anything else stays text, including dates (2026-04-01 stays a string), leading-zero codes (007, 09012345678) and numbers longer than 15 digits. Off: every cell is text, empty cells are null. Default: on.",
            "default": true
          },
          "stringColumns": {
            "title": "Always keep as text",
            "type": "array",
            "description": "Optional. Headers of columns that must stay text even when they look like numbers, for example 'zip' or 'sku'. Matches the header exactly.",
            "items": {
              "type": "string"
            }
          },
          "decimalSeparator": {
            "title": "Decimal separator",
            "enum": [
              ".",
              ","
            ],
            "type": "string",
            "description": "How numbers are written in the file. Choose comma for files from European Excel, where 12,50 means 12.5 (usually semicolon-delimited). Only used when number detection is on. Default: point.",
            "default": "."
          },
          "nestDottedHeaders": {
            "title": "Nest dotted headers",
            "type": "boolean",
            "description": "On: a header like 'address.city' becomes {\"address\": {\"city\": ...}}. If one header is both a value and the start of another ('address' and 'address.city'), the file fails with a message naming them. Off: the header stays as written. Default: off.",
            "default": false
          },
          "omitNulls": {
            "title": "Leave out empty values",
            "type": "boolean",
            "description": "On: keys whose value is null (empty cell) are left out of each object. Off: they are written as null so every object has the same keys. Does not apply to the 'columns' shape. Default: off.",
            "default": false
          },
          "hasHeader": {
            "title": "First row is a header",
            "type": "boolean",
            "description": "On: the first row gives the key names. Off: the keys are column_1, column_2 and so on, and every row is data. Default: on.",
            "default": true
          },
          "trimCells": {
            "title": "Trim spaces around cells",
            "type": "boolean",
            "description": "Removes spaces at the start and end of every cell and header. Default: on.",
            "default": true
          },
          "inputDelimiter": {
            "title": "Input delimiter",
            "enum": [
              "auto",
              ",",
              ";",
              "tab",
              "|"
            ],
            "type": "string",
            "description": "Column separator of the CSV files. 'auto' looks at the first lines and chooses between comma, semicolon, tab and pipe. Default: auto.",
            "default": "auto"
          },
          "sourceEncoding": {
            "title": "Input encoding",
            "enum": [
              "auto",
              "utf-8",
              "utf-16",
              "shift_jis",
              "euc-jp",
              "gbk",
              "big5",
              "euc-kr",
              "cp1252",
              "iso-8859-1",
              "iso-8859-2",
              "iso-8859-15",
              "cp1250",
              "cp1251",
              "koi8-r"
            ],
            "type": "string",
            "description": "Text encoding of the CSV files. 'auto' checks the byte-order mark, then whether the file is valid UTF-8, then a statistical detector (Shift_JIS, Windows-1252 and others); the result row shows what was found and how sure it is. Choose one yourself if the guess is wrong. The JSON output is always UTF-8. Default: auto.",
            "default": "auto"
          },
          "prettyPrint": {
            "title": "Indent the JSON",
            "type": "boolean",
            "description": "On: the JSON file is indented for reading and is larger. Off: compact. Has no effect on NDJSON, which is always one compact object per line. Default: off.",
            "default": false
          },
          "pushRowsToDataset": {
            "title": "Also write the rows to the dataset",
            "type": "boolean",
            "description": "On: the first 10,000 rows of each file (50,000 per run) are also written to the run's dataset as separate items, each with '_source' and '_row', so you can use or download them there. The JSON file always holds every row. No extra charge. Default: off.",
            "default": false
          },
          "fileName": {
            "title": "Output file name",
            "type": "string",
            "description": "File name without extension for the output (name.json; with several sources a number is added). 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}