{
  "openapi": "3.0.1",
  "info": {
    "title": "Markdown to HTML Converter, Sanitized & Safe",
    "description": "Converts Markdown to clean, sanitized HTML: texts, file URLs or Apify dataset columns. GFM tables, task lists, footnotes, code blocks, heading ids, optional table of contents, safe links. Failed documents are free; empty input runs a free demo.",
    "version": "0.1",
    "x-build-id": "g3ODUzJC81dbxUTSc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ucchiii~markdown-to-html/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ucchiii-markdown-to-html",
        "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~markdown-to-html/runs": {
      "post": {
        "operationId": "runs-sync-ucchiii-markdown-to-html",
        "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~markdown-to-html/run-sync": {
      "post": {
        "operationId": "run-sync-ucchiii-markdown-to-html",
        "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": {
          "markdownTexts": {
            "title": "Markdown texts",
            "maxItems": 5000,
            "type": "array",
            "description": "Markdown documents to convert, one string per document (up to 2 MB each). Use this when the Markdown is already in your hands, for example from a CMS export or an AI answer. Leave texts, file URLs and datasets all empty for a free demo."
          },
          "fileUrls": {
            "title": "Markdown file URLs",
            "maxItems": 5000,
            "type": "array",
            "description": "Public links (http:// or https://) to Markdown or plain-text files, for example a README or a blog post file. Each file is one document (up to 2 MB; the download stops at 50 MB). Failed requests are retried up to 3 times. Internal and private addresses are refused.",
            "items": {
              "type": "string"
            }
          },
          "datasetIds": {
            "title": "Datasets with Markdown",
            "type": "array",
            "description": "Datasets whose items hold Markdown in the field named below (the 'defaultDatasetId' of a finished run). You can paste a dataset URL from Apify Console too. Every item becomes one document."
          },
          "markdownField": {
            "title": "Markdown field in dataset",
            "type": "string",
            "description": "Name of the field in each dataset item that holds the Markdown text. Use dots for a nested field, for example 'content.body'.",
            "default": "markdown"
          },
          "gfm": {
            "title": "GitHub-flavored Markdown",
            "type": "boolean",
            "description": "Tables, ~~strikethrough~~, task lists (- [x]) and footnotes ([^1]). Turn off for plain CommonMark. Bare URLs in the text are not turned into links; write them as [text](url) or <url>.",
            "default": true
          },
          "toc": {
            "title": "Build a table of contents",
            "type": "boolean",
            "description": "Adds a nested contents list built from the headings to the 'tocHtml' field of each row. Headings get ids so that the links work.",
            "default": false
          },
          "tocDepth": {
            "title": "Table of contents depth",
            "minimum": 1,
            "maximum": 6,
            "type": "integer",
            "description": "Deepest heading level in the table of contents: 2 means h1 and h2, 3 means h1 to h3. Allowed range 1 to 6 (default 3).",
            "default": 3
          },
          "prependToc": {
            "title": "Put the table of contents at the top of the HTML",
            "type": "boolean",
            "description": "Also place the table of contents before the document in the 'html' field. Only has an effect when the table of contents is on and the document has headings.",
            "default": false
          },
          "headingIds": {
            "title": "Add ids to headings",
            "type": "boolean",
            "description": "Give every heading an id made from its text (for example 'getting-started', Japanese text is kept) so that pages can link to a section. Repeated headings get -1, -2. Always on when the table of contents is on.",
            "default": true
          },
          "sanitize": {
            "title": "Sanitize the HTML",
            "type": "boolean",
            "description": "Remove everything that could run code or load something unexpected: script and style elements, on* attributes, javascript: and data: links, forms and iframes. Only a safe list of tags and attributes is kept. Recommended for any text you did not write yourself. Turn off only for Markdown you trust: the HTML is then passed through as written.",
            "default": true
          },
          "allowRawHtml": {
            "title": "Allow raw HTML inside Markdown",
            "type": "boolean",
            "description": "Keep HTML tags written inside the Markdown (with sanitizing on, only safe tags survive). If off, they are shown as text instead.",
            "default": true
          },
          "linkTargetBlank": {
            "title": "Open external links in a new tab",
            "type": "boolean",
            "description": "Add target=\"_blank\" to links that point to another site (http, https). Links to sections of the same page are left alone.",
            "default": false
          },
          "addNoopener": {
            "title": "Add rel=\"noopener noreferrer\" to links",
            "type": "boolean",
            "description": "Protects your page when a link opens in a new tab. With sanitizing on it is added to every link; with sanitizing off, to external Markdown links.",
            "default": true
          },
          "lineBreaks": {
            "title": "Treat line breaks as <br>",
            "type": "boolean",
            "description": "Turn a single line break inside a paragraph into <br>, as chat apps do. Off follows the Markdown standard (a line break is a space).",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}