{
  "openapi": "3.0.1",
  "info": {
    "title": "Markdown to PDF and HTML: themes, code and tables",
    "description": "Turns Markdown text, .md links or stored files into styled PDF and standalone HTML. Four themes, colored code blocks, tables, task lists, footnotes, an optional table of contents and page numbers. Returns download links for each document.",
    "version": "0.1",
    "x-build-id": "e0vKCRyaJc9GDvX6I"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/examsens.ai~markdown-to-pdf/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-examsens.ai-markdown-to-pdf",
        "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/examsens.ai~markdown-to-pdf/runs": {
      "post": {
        "operationId": "runs-sync-examsens.ai-markdown-to-pdf",
        "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/examsens.ai~markdown-to-pdf/run-sync": {
      "post": {
        "operationId": "run-sync-examsens.ai-markdown-to-pdf",
        "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": {
          "markdown": {
            "title": "Markdown",
            "type": "string",
            "description": "One document as Markdown text."
          },
          "documentName": {
            "title": "Document name",
            "type": "string",
            "description": "File name for the Markdown above.",
            "default": "document"
          },
          "documents": {
            "title": "More documents",
            "type": "array",
            "description": "Several documents at once, as a JSON list: [{\"name\": \"report\", \"markdown\": \"# Title ...\"}]."
          },
          "markdownUrls": {
            "title": "Markdown file URLs",
            "type": "array",
            "description": "Links to raw Markdown files, such as raw.githubusercontent.com links. Relative image links in a file are loaded from the file's own location.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "inputStore": {
            "title": "Files in a key value store",
            "type": "string",
            "description": "To use Markdown files from your computer, upload them to one of your key value stores, then pick that store here. Every record whose key ends in .md, .markdown or .txt is converted, or only the keys you list below."
          },
          "inputKeys": {
            "title": "Record keys",
            "type": "array",
            "description": "Only convert these records from the store above, one key per line.",
            "items": {
              "type": "string"
            }
          },
          "outputFormat": {
            "title": "Output",
            "enum": [
              "both",
              "pdf",
              "html"
            ],
            "type": "string",
            "description": "PDF, standalone HTML with the styles inside, or both.",
            "default": "both"
          },
          "theme": {
            "title": "Theme",
            "enum": [
              "modern",
              "serif",
              "compact",
              "dark"
            ],
            "type": "string",
            "description": "Modern: sans serif, like a project README. Serif: book style, justified text. Compact: smaller type and tighter spacing for reports. Dark: light text on a dark background.",
            "default": "modern"
          },
          "codeStyle": {
            "title": "Code colors",
            "enum": [
              "auto",
              "default",
              "friendly",
              "vs",
              "solarized-light",
              "monokai",
              "solarized-dark",
              "github-dark",
              "nord"
            ],
            "type": "string",
            "description": "Color scheme for fenced code blocks. Auto picks one to match the theme.",
            "default": "auto"
          },
          "tableOfContents": {
            "title": "Table of contents",
            "type": "boolean",
            "description": "Add a linked list of the level 1 to 3 headings at the start, on its own page in the PDF.",
            "default": false
          },
          "pageSize": {
            "title": "Page size",
            "enum": [
              "A4",
              "Letter",
              "Legal",
              "A3",
              "A5"
            ],
            "type": "string",
            "description": "Paper size of the PDF.",
            "default": "A4"
          },
          "landscape": {
            "title": "Wide pages",
            "type": "boolean",
            "description": "Turn the pages sideways, for wide tables.",
            "default": false
          },
          "marginMm": {
            "title": "Margin (mm)",
            "minimum": 0,
            "maximum": 60,
            "type": "number",
            "description": "Page margin on every side, in millimeters.",
            "default": 18
          },
          "pageNumbers": {
            "title": "Page numbers",
            "type": "boolean",
            "description": "Print the page number and page count at the foot of every PDF page.",
            "default": true
          },
          "title": {
            "title": "Title",
            "type": "string",
            "description": "Document title for the PDF properties and the HTML title. Empty uses the first level 1 heading, or the document name."
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language code for the document, such as en, de or fr. Used for hyphenation in the Serif theme.",
            "default": "en"
          },
          "allowHtml": {
            "title": "Allow HTML in Markdown",
            "type": "boolean",
            "description": "Render HTML tags written in the Markdown. When off, they are shown as text. Scripts never run.",
            "default": false
          },
          "customCss": {
            "title": "Extra CSS",
            "type": "string",
            "description": "CSS added after the theme, such as body{font-size:14px}."
          },
          "maxFileSizeMb": {
            "title": "Maximum file size (MB)",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Larger Markdown files are skipped with an error item and are not charged.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}