{
  "openapi": "3.0.1",
  "info": {
    "title": "Global Document Factory & Universal Converter",
    "description": "This Actor is a Compliance Engine. It comes pre-loaded with strict formatting rules for global bureaucracies—from UAE Ministry Offer Letters to Chinese \"Red Head\" official documents—ensuring your generated files meet local legal standards (margins, fonts, layout) automatically.",
    "version": "0.0",
    "x-build-id": "y3svBe75nR3uzg0BC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/visita~universal-document-converter/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-visita-universal-document-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/visita~universal-document-converter/runs": {
      "post": {
        "operationId": "runs-sync-visita-universal-document-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/visita~universal-document-converter/run-sync": {
      "post": {
        "operationId": "run-sync-visita-universal-document-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",
        "required": [
          "output_format"
        ],
        "properties": {
          "start_urls": {
            "title": "🌐 Start URLs (Batch Processing)",
            "type": "array",
            "description": "List of URLs to scrape and convert. Supports multiple simultaneous documents.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "content_string": {
            "title": "📝 Source Content",
            "type": "string",
            "description": "Paste text, Markdown, or HTML."
          },
          "source_url": {
            "title": "🔗 Or Import from URL",
            "type": "string",
            "description": "Any public link like Wikipedia. 💡 TIP: Paste any URL. For Google Docs, change `/edit?usp=sharing` to `/export?format=txt` at the end of the link."
          },
          "target_language": {
            "title": "🌍 Target Language (AI Translation)",
            "enum": [
              "",
              "Arabic",
              "Chinese (Simplified)",
              "Chinese (Traditional)",
              "English",
              "French",
              "German",
              "Hindi",
              "Indonesian",
              "Japanese",
              "Korean",
              "Malay",
              "Portuguese (Brazilian)",
              "Russian",
              "Spanish",
              "Turkish",
              "Urdu",
              "Afrikaans",
              "Zulu",
              "Swahili",
              "Thai",
              "Vietnamese",
              "Italian",
              "Dutch",
              "Polish"
            ],
            "type": "string",
            "description": "Select a language to translate the document into using AI. Leave on 'None' to skip translation."
          },
          "industry_preset": {
            "title": "🏛️ Region & Compliance Preset",
            "enum": [
              "Legal_SA_HighCourt",
              "Gov_PublicSector_SA",
              "Corporate_Enterprise",
              "Tech_Startup",
              "USA_Delaware",
              "UAE_MOHRE",
              "KSA_Mudad",
              "Qatar_MADLSA",
              "Turkey_MERSIS",
              "China_GB_Standard",
              "Russia_GOST",
              "India_CSMOP",
              "Brazil_ABNT",
              "Malaysia_MyCoID",
              "Indonesia_OSS",
              "Singapore_BizFile"
            ],
            "type": "string",
            "description": "Select the target bureaucracy to automatically apply strict margins, fonts, and layout rules."
          },
          "branding_logo": {
            "title": "🖼️ Header Logo URL",
            "type": "string",
            "description": "URL to Coat of Arms or Company Logo."
          },
          "branding_header": {
            "title": "Header Text",
            "type": "string",
            "description": "Text for the header (e.g. Entity Name for China Red Head)."
          },
          "branding_footer": {
            "title": "Footer Text",
            "type": "string",
            "description": "Text for the footer (e.g. 'Confidential', 'Page 1 of X')."
          },
          "branding_watermark": {
            "title": "Watermark Text",
            "type": "string",
            "description": "Overlay text (e.g., DRAFT, CONFIDENTIAL)."
          },
          "output_format": {
            "title": "📤 Output Format",
            "enum": [
              "docx",
              "pdf"
            ],
            "type": "string",
            "description": "Select the result format.",
            "default": "docx"
          },
          "data_context": {
            "title": "🧩 Template Data (JSON)",
            "type": "object",
            "description": "Data to fill {{ placeholders }}."
          },
          "filename_template": {
            "title": "💾 Filename Template",
            "type": "string",
            "description": "Example: 'Contract_{{ id }}'"
          },
          "document_metadata": {
            "title": "🏷️ Document Metadata",
            "type": "object",
            "description": "Set properties for the generated file."
          },
          "paper_size": {
            "title": "📄 Paper Size",
            "enum": [
              "a4",
              "letter",
              "legal"
            ],
            "type": "string",
            "description": "Set the page size for PDF generation. Overrides preset if set.",
            "default": "a4"
          },
          "margin": {
            "title": "📐 Page Margins",
            "type": "string",
            "description": "Set margins (e.g., '1in', '2cm'). Overrides preset if set."
          },
          "custom_pandoc_args": {
            "title": "🛠️ Custom Pandoc Arguments",
            "type": "array",
            "description": "Pass raw flags to the conversion engine.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}