{
  "openapi": "3.0.1",
  "info": {
    "title": "CSV Encoding Converter: Shift-JIS to UTF-8 & more",
    "description": "Fix garbled CSV and text files: detects the encoding (Shift_JIS, GBK, Big5, Windows-1252, UTF-8 and more) and re-saves as UTF-8 with or without BOM for Excel, or another encoding. Unifies delimiter and line endings. Empty input = free demo.",
    "version": "0.1",
    "x-build-id": "2oMDCH5Y6U2fIEFXo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ucchiii~csv-encoding-converter/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ucchiii-csv-encoding-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~csv-encoding-converter/runs": {
      "post": {
        "operationId": "runs-sync-ucchiii-csv-encoding-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~csv-encoding-converter/run-sync": {
      "post": {
        "operationId": "run-sync-ucchiii-csv-encoding-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 CSV, TSV or other text files, one per entry (up to 50 files and 50 MB each). Links to internal networks are blocked. Leave this AND 'Apify datasets with files' empty to run a free demo on a built-in sample (not charged).",
            "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."
          },
          "sourceEncoding": {
            "title": "Input encoding",
            "enum": [
              "auto",
              "utf-8",
              "utf-16",
              "shift_jis",
              "euc-jp",
              "iso-2022-jp",
              "gbk",
              "gb18030",
              "big5",
              "euc-kr",
              "cp1252",
              "iso-8859-1",
              "iso-8859-2",
              "iso-8859-15",
              "cp1250",
              "cp1251",
              "cp1253",
              "cp1254",
              "cp1256",
              "koi8-r"
            ],
            "type": "string",
            "description": "Encoding of the source files. 'auto' checks the byte-order mark, then whether the file is valid UTF-8, then a statistical detector; the result row shows what was found and how sure it is. Choose one yourself if the guess is wrong. Default: auto.",
            "default": "auto"
          },
          "targetEncoding": {
            "title": "Output encoding",
            "enum": [
              "utf-8",
              "utf-16",
              "shift_jis",
              "euc-jp",
              "iso-2022-jp",
              "gbk",
              "gb18030",
              "big5",
              "euc-kr",
              "cp1252",
              "iso-8859-1",
              "iso-8859-2",
              "iso-8859-15",
              "cp1250",
              "cp1251",
              "cp1253",
              "cp1254",
              "cp1256",
              "koi8-r"
            ],
            "type": "string",
            "description": "Encoding of the converted file. Default: utf-8. Characters that the output encoding cannot hold are handled by 'Characters that do not fit'.",
            "default": "utf-8"
          },
          "utf8Bom": {
            "title": "UTF-8: add a BOM for Excel",
            "type": "boolean",
            "description": "Adds a byte-order mark to UTF-8 output so Excel opens non-English text (Japanese, Chinese, accents) correctly by double-click. Leave off for pandas, databases and most code. Only used when the output encoding is utf-8. Default: off.",
            "default": false
          },
          "unmappable": {
            "title": "Characters that do not fit",
            "enum": [
              "fail",
              "replace",
              "drop"
            ],
            "type": "string",
            "description": "What to do when the output encoding cannot hold a character, for example an emoji in a Shift_JIS file. 'fail' keeps your data exact and the error names the characters. The number of changed characters is reported as replacedChars. Default: fail.",
            "default": "fail"
          },
          "inputDelimiter": {
            "title": "Input delimiter",
            "enum": [
              "auto",
              ",",
              ";",
              "tab",
              "|"
            ],
            "type": "string",
            "description": "Column separator of the source files, used for counting rows and for changing the separator. 'auto' looks at the first lines. Default: auto.",
            "default": "auto"
          },
          "outputDelimiter": {
            "title": "Output delimiter",
            "enum": [
              "keep",
              ",",
              ";",
              "tab",
              "|"
            ],
            "type": "string",
            "description": "Column separator of the converted file. 'keep' leaves the text as it is; any other value reads the file as CSV and rewrites it (quotes are added only where needed). Default: keep.",
            "default": "keep"
          },
          "lineEnding": {
            "title": "Line endings",
            "enum": [
              "keep",
              "lf",
              "crlf",
              "cr"
            ],
            "type": "string",
            "description": "Line break style of the converted file; mixed line endings in the source become one style. Default: keep (the most common style in the file).",
            "default": "keep"
          },
          "hasHeader": {
            "title": "First row is a header",
            "type": "boolean",
            "description": "Rows are counted without the header row, and the price follows the row count. Turn off for files that have no header (every row is then counted). Default: on.",
            "default": true
          },
          "fileName": {
            "title": "Output file name",
            "type": "string",
            "description": "File name without extension for the output; the encoding is appended (name-utf8.csv) and, with several sources, a number. 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}