{
  "openapi": "3.0.1",
  "info": {
    "title": "CSV Cleaner + Change Log",
    "description": "Free CSV/TSV cleaner by TORIX (AI-assisted). Trims whitespace, converts date columns to ISO YYYY-MM-DD, normalizes number columns, optional Title Case, drops empty rows/columns and duplicates. Outputs cleaned CSV, a before/after change log and an issues list. Review results before use.",
    "version": "0.1",
    "x-build-id": "wMCrYe9dWhGZUMJo9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/torix33~csv-cleaner-change-log/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-torix33-csv-cleaner-change-log",
        "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/torix33~csv-cleaner-change-log/runs": {
      "post": {
        "operationId": "runs-sync-torix33-csv-cleaner-change-log",
        "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/torix33~csv-cleaner-change-log/run-sync": {
      "post": {
        "operationId": "run-sync-torix33-csv-cleaner-change-log",
        "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": {
          "csvText": {
            "title": "CSV text",
            "type": "string",
            "description": "Paste the CSV here (first line = column names). Use this OR a public link below. The prefilled sample is made-up data."
          },
          "csvUrl": {
            "title": "Public link to a CSV file",
            "type": "string",
            "description": "Direct http(s) link to a .csv/.tsv file that anyone can open (no login). Private OneDrive/Google Drive links are not supported. Leave empty when you paste text above."
          },
          "delimiter": {
            "title": "Delimiter",
            "enum": [
              "auto",
              "comma",
              "semicolon",
              "tab",
              "pipe"
            ],
            "type": "string",
            "description": "Auto-detected from the first lines by default.",
            "default": "auto"
          },
          "dateOrder": {
            "title": "Day/month order of dates like 03/11/2026",
            "enum": [
              "DMY",
              "MDY"
            ],
            "type": "string",
            "description": "Dates are never guessed: a date that is impossible in this order is reported in the issues list instead of being swapped.",
            "default": "DMY"
          },
          "decimalSeparator": {
            "title": "Decimal separator in numbers",
            "enum": [
              "auto",
              "comma",
              "dot"
            ],
            "type": "string",
            "description": "Auto reads 1 200,50 / 1,200.50 / 1.200,50 correctly. A lone 1,200 is read as 1200 and a lone 1.200 as 1.2 - set this option if your file differs.",
            "default": "auto"
          },
          "titleCaseColumns": {
            "title": "Columns to write in Title Case",
            "type": "array",
            "description": "Column names (as in the header), e.g. name, city. Makes 'anna KOVAL' and 'Anna Koval' identical so duplicates are found.",
            "items": {
              "type": "string"
            }
          },
          "dateColumns": {
            "title": "Date columns (optional)",
            "type": "array",
            "description": "Leave empty to detect date columns automatically.",
            "items": {
              "type": "string"
            }
          },
          "numberColumns": {
            "title": "Number columns (optional)",
            "type": "array",
            "description": "Leave empty to detect number columns automatically. Phone, ZIP, ID, IBAN and similar columns are never converted automatically (leading zeros) - list them here only if you really want numbers.",
            "items": {
              "type": "string"
            }
          },
          "removeDuplicates": {
            "title": "Remove duplicate rows",
            "type": "boolean",
            "description": "Rows that are identical AFTER cleaning are removed (first one is kept). Typos are not matched - near-duplicates are not touched.",
            "default": true
          },
          "dedupeKey": {
            "title": "Duplicate key columns (optional)",
            "type": "array",
            "description": "Compare only these columns (e.g. email) instead of the whole row.",
            "items": {
              "type": "string"
            }
          },
          "removeEmptyRows": {
            "title": "Remove empty rows",
            "type": "boolean",
            "description": "Removes data rows in which every cell is empty or contains only whitespace. Each removal is listed in the change log. Turn off to keep such rows.",
            "default": true
          },
          "removeEmptyColumns": {
            "title": "Remove empty columns",
            "type": "boolean",
            "description": "Removes columns that have no value in any data row (the header name alone does not count). Each removal is listed in the change log. Turn off to keep such columns.",
            "default": true
          },
          "maxRows": {
            "title": "Max data rows",
            "minimum": 1,
            "type": "integer",
            "description": "Safety limit; the run stops with a message if the file has more rows.",
            "default": 100000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}