{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Translator - Bulk Translate Text, JSON, Subtitles & Pages",
    "description": "Translate texts, JSON and datasets, SRT/VTT subtitles and web pages into many languages at once. Glossary, tone, Markdown kept. A Google Translate / DeepL alternative, no API key. $1.50/1M chars.",
    "version": "0.1",
    "x-build-id": "T8C6ZAcJNzHuZCTrm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tidytools~web-page-translator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tidytools-web-page-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/tidytools~web-page-translator/runs": {
      "post": {
        "operationId": "runs-sync-tidytools-web-page-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/tidytools~web-page-translator/run-sync": {
      "post": {
        "operationId": "run-sync-tidytools-web-page-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": {
          "urlsText": {
            "title": "Page URLs",
            "type": "string",
            "description": "Main input (fill this, or `urls` / `texts` / `subtitleUrls` / `subtitles` / `items` / `datasetId`). Web pages to translate, one per line (bare domains such as example.com work too). A line that is not a URL becomes one free error row; the rest of the run continues."
          },
          "urls": {
            "title": "URLs (request list, optional)",
            "type": "array",
            "description": "Same as \"Page URLs\", in Apify's request list format (also accepts a link to a text file with URLs). Kept for existing integrations; new integrations should use \"urlsText\".",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "texts": {
            "title": "Texts to translate (optional)",
            "type": "array",
            "description": "Your own texts or Markdown, translated the same way. Short texts are billed by their real length (characters are added up over the run).",
            "items": {
              "type": "string"
            }
          },
          "subtitleUrls": {
            "title": "Subtitle files to translate (SRT / VTT, optional)",
            "type": "array",
            "description": "Links to .srt or .vtt files, e.g. the srtUrl / vttUrl of our Audio & Video Transcriber. Translated cue by cue in batches (so sentences keep their context); every timestamp is kept. The translated files are saved in the run's key-value store and linked in the results. Billed by characters like texts.",
            "items": {
              "type": "string"
            }
          },
          "subtitles": {
            "title": "Subtitle text (optional)",
            "type": "string",
            "description": "Or paste the content of one SRT or VTT file here."
          },
          "targetLanguage": {
            "title": "Target language",
            "type": "string",
            "description": "Language name, e.g. Spanish, German, Japanese, Traditional Chinese, Brazilian Portuguese."
          },
          "targetLanguages": {
            "title": "More target languages (optional)",
            "type": "array",
            "description": "Translate into several languages in one run, e.g. French, German, Japanese. Pages are read once; each language is billed separately.",
            "items": {
              "type": "string"
            }
          },
          "items": {
            "title": "JSON items to translate (optional)",
            "type": "array",
            "description": "A JSON array of objects, e.g. products or reviews. The chosen text fields are translated and added next to the original as <field>_<language> (title_spanish); everything else is kept as is."
          },
          "datasetId": {
            "title": "Dataset ID (optional)",
            "type": "string",
            "description": "Translate the items of another Actor run's dataset (e.g. reviews or product listings), the same way as JSON items."
          },
          "fields": {
            "title": "Fields to translate",
            "type": "array",
            "description": "For JSON items and datasets: field names such as title, description (dot paths such as details.text work). Empty = every text field is detected automatically (URLs, IDs, codes and dates are skipped).",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max dataset items",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Read at most this many items from the dataset.",
            "default": 10000
          },
          "glossary": {
            "title": "Glossary: never translate (optional)",
            "type": "array",
            "description": "Brand names, product names and terms to keep exactly as written, e.g. Apify, Actor, TidyTools. Up to 200 terms.",
            "items": {
              "type": "string"
            }
          },
          "tone": {
            "title": "Tone",
            "enum": [
              "neutral",
              "formal",
              "casual",
              "marketing",
              "technical"
            ],
            "type": "string",
            "description": "Register of the translation.",
            "default": "neutral"
          },
          "sourceLanguage": {
            "title": "Source language (optional)",
            "type": "string",
            "description": "Language of the original, e.g. English. Empty = detected automatically."
          },
          "engine": {
            "title": "Engine",
            "enum": [
              "fast",
              "quality"
            ],
            "type": "string",
            "description": "\"Fast\" (Llama 4 Scout, default) is quick and accurate for most languages and is recommended for Chinese, Japanese and Korean; \"Quality\" (Llama 3.3 70B) is slower. Same price.",
            "default": "fast"
          },
          "cssSelector": {
            "title": "Content selector (CSS)",
            "type": "string",
            "description": "Optional, e.g. \"main\" or \"article\", to translate only the main content."
          },
          "maxCharactersPerPage": {
            "title": "Max characters per page",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Optional cost cap for web pages: translate only the first N characters of each page (cut at a paragraph break; the row gets contentTruncated: true). Empty or 0 = the whole page. A long Wikipedia article can have 146,000 characters, about $0.22 per target language."
          },
          "mode": {
            "title": "Page loading mode",
            "enum": [
              "auto",
              "fast",
              "browser"
            ],
            "type": "string",
            "description": "\"Auto\" uses plain HTTP and a real browser only when needed. Values: auto = Auto (recommended); fast = Fast (HTTP only); browser = Browser (JavaScript rendering).",
            "default": "auto"
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many pages, texts or batches of JSON strings are translated at the same time.",
            "default": 3
          },
          "httpVia": {
            "title": "Plain HTTP requests from",
            "enum": [
              "auto",
              "backend",
              "direct",
              "vm"
            ],
            "type": "string",
            "description": "Some sites block requests from data centers. Auto retries from a second network before falling back to a real browser. If both are refused, Auto also tries our second server (Oracle, different IP) before a real browser.",
            "default": "auto"
          },
          "proxyConfiguration": {
            "title": "Proxy (optional)",
            "type": "object",
            "description": "Only used for requests sent from Apify's network. Apify proxy usage is billed to your Apify account."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}