{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk Text Translator – Translate CSV, Datasets & Texts Offline",
    "description": "Translate texts, CSV columns and Apify dataset fields between English, German, French and Spanish with open OPUS-MT models run offline (no Google, no API key, no LLM). Auto language detection; other fields kept. $1.20 per million characters.",
    "version": "0.1",
    "x-build-id": "5YXGwI6B5ZawEvjaW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gazidev~bulk-text-translator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gazidev-bulk-text-translator",
        "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/gazidev~bulk-text-translator/runs": {
      "post": {
        "operationId": "runs-sync-gazidev-bulk-text-translator",
        "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/gazidev~bulk-text-translator/run-sync": {
      "post": {
        "operationId": "run-sync-gazidev-bulk-text-translator",
        "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": {
          "texts": {
            "title": "Texts to translate",
            "type": "array",
            "description": "One text per line (reviews, product titles, job ads, messages...). Line breaks inside a text are kept when you pass texts through the API. The sample texts are ignored automatically when you also give a dataset, CSV or JSON items.",
            "items": {
              "type": "string"
            }
          },
          "targetLanguage": {
            "title": "Translate into",
            "enum": [
              "en",
              "de",
              "fr",
              "es"
            ],
            "type": "string",
            "description": "Target language. Supported: English, German, French, Spanish (all 12 directions; German/French/Spanish to each other go through English).",
            "default": "en"
          },
          "sourceLanguage": {
            "title": "Source language",
            "enum": [
              "auto",
              "en",
              "de",
              "fr",
              "es"
            ],
            "type": "string",
            "description": "Auto-detect per text (default) or force one language. Texts already in the target language are copied unchanged and not charged; texts detected in an unsupported language are skipped for free.",
            "default": "auto"
          },
          "datasetId": {
            "title": "Apify dataset to translate",
            "type": "string",
            "description": "Optional: an Apify dataset (e.g. the output of a review or product scraper). Every item is kept with all its fields; translations are added as new fields. Set 'Fields to translate' below."
          },
          "csvUrls": {
            "title": "CSV file URLs",
            "type": "array",
            "description": "Optional: public URLs of CSV/TSV files with a header row (Google Sheets 'anyone with the link', Google Drive and Dropbox share links work). Max 50 MB per file.",
            "items": {
              "type": "string"
            }
          },
          "items": {
            "title": "JSON items",
            "type": "array",
            "description": "Optional: a JSON array of objects to translate directly (handy for API calls and AI agents)."
          },
          "fields": {
            "title": "Fields / columns to translate",
            "type": "array",
            "description": "Names of the dataset fields, CSV columns or JSON keys to translate, e.g. title, reviewText. Required when you give a dataset, CSV or items. Other fields are kept as they are.",
            "items": {
              "type": "string"
            }
          },
          "outputFieldSuffix": {
            "title": "Suffix for translated fields",
            "type": "string",
            "description": "Translated values go into '<field><suffix>'. Empty = '_' + target language, e.g. title_en."
          },
          "overwrite": {
            "title": "Overwrite the original fields",
            "type": "boolean",
            "description": "Replace the original text instead of adding a new field.",
            "default": false
          },
          "maxItems": {
            "title": "Max texts / rows",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many texts or records (0 = no limit). Useful for a cheap first test.",
            "default": 0
          },
          "beamSize": {
            "title": "Beam size (quality vs speed)",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "1 = fastest (greedy), 2 = default, 4 = slightly better wording. The price per character is the same.",
            "default": 2
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}