{
  "openapi": "3.0.1",
  "info": {
    "title": "NDJSON Converter: JSONL to CSV, JSON and Excel",
    "description": "Convert NDJSON / JSON Lines to CSV, JSON array or Excel, and CSV, JSON or Apify datasets back to NDJSON. Flattens nested objects, keeps every column, reads .gz, skips broken lines and reports them. Empty input = free demo.",
    "version": "0.1",
    "x-build-id": "xMuKlqRbZGMdq5URI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ucchiii~ndjson-converter/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ucchiii-ndjson-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/ucchiii~ndjson-converter/runs": {
      "post": {
        "operationId": "runs-sync-ucchiii-ndjson-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/ucchiii~ndjson-converter/run-sync": {
      "post": {
        "operationId": "run-sync-ucchiii-ndjson-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 http(s) links to NDJSON / JSONL, CSV, TSV or JSON files, one per entry. Files ending in .gz are unzipped (up to 50 files, 50 MB each, 100 MB after unzipping). Links to internal networks are blocked. Leave this AND 'Apify datasets' empty to run a free demo on a built-in sample (not charged).",
            "items": {
              "type": "string"
            }
          },
          "datasetIds": {
            "title": "Apify datasets",
            "type": "array",
            "description": "Optional. Dataset IDs to convert: every item becomes one row of the output file (usually NDJSON). Or, if the items hold 'contentBase64' (the file bytes, base64-encoded) and optionally 'fileName', each item is read as one file like a file URL."
          },
          "inputFormat": {
            "title": "Input format",
            "enum": [
              "auto",
              "ndjson",
              "csv",
              "tsv",
              "json"
            ],
            "type": "string",
            "description": "Format of the source files. 'auto' uses the file name, the content type and the first line. Choose one yourself if the guess is wrong. Not used for datasets. Default: auto.",
            "default": "auto"
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "auto",
              "csv",
              "json",
              "xlsx",
              "ndjson",
              "jsonl"
            ],
            "type": "string",
            "description": "Format of the converted file. 'auto' turns NDJSON into CSV and turns CSV, JSON and datasets into NDJSON. NDJSON and JSON Lines have the same content; only the file extension differs. Default: auto.",
            "default": "auto"
          },
          "arrayMode": {
            "title": "Lists in cells",
            "enum": [
              "json",
              "join"
            ],
            "type": "string",
            "description": "How a list inside a line is written into a CSV or Excel cell. 'json' keeps it exact; 'join' is easier to read for lists of words or numbers (lists of objects stay JSON). Only used for CSV and Excel output. Default: json.",
            "default": "json"
          },
          "flattenSeparator": {
            "title": "Nested key separator",
            "type": "string",
            "description": "Joins the names of nested keys into one column name, so {\"a\": {\"b\": 1}} becomes the column a.b. Up to 5 characters. Only used for CSV and Excel output. Default: a dot.",
            "default": "."
          },
          "outputDelimiter": {
            "title": "CSV delimiter",
            "enum": [
              ",",
              ";",
              "tab",
              "|"
            ],
            "type": "string",
            "description": "Column separator of a CSV output file. Quotes are added only where needed. Default: comma.",
            "default": ","
          },
          "inferTypes": {
            "title": "Turn CSV numbers into numbers",
            "type": "boolean",
            "description": "When reading CSV or TSV, writes cells like 12 or 3.5 as numbers in the JSON output. Values with a leading zero (01234), more than 15 digits or an exponent stay text. Turn off to keep every cell as text. Default: on.",
            "default": true
          },
          "csvBom": {
            "title": "CSV: add a BOM for Excel",
            "type": "boolean",
            "description": "Adds a byte-order mark to CSV output so Excel opens non-English text correctly by double-click. Leave off for pandas, databases and most code. Default: off.",
            "default": false
          },
          "csvEscapeFormulas": {
            "title": "CSV: neutralize formulas",
            "type": "boolean",
            "description": "Puts a ' in front of CSV cells that start with =, +, - or @ so a spreadsheet cannot run them as formulas. Useful when the file comes from untrusted data; it changes those cells. Excel output never runs formulas. Default: off.",
            "default": false
          },
          "maxRows": {
            "title": "Maximum rows per file",
            "minimum": 1,
            "maximum": 500000,
            "type": "integer",
            "description": "A file or dataset with more rows than this fails and is not charged, so a surprise file cannot run up a bill. Default and upper limit: 500,000.",
            "default": 500000
          },
          "fileName": {
            "title": "Output file name",
            "type": "string",
            "description": "File name without extension for the output; the extension follows the output format and, 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}