{
  "openapi": "3.0.1",
  "info": {
    "title": "Markdown to EPUB and PDF",
    "description": "Converts Markdown into a clean EPUB file and a print-ready PDF. Paste the text, give public file links, or point at a stored record. You get download links, a word count, a chapter count, a PDF page count, and a basic EPUB check.",
    "version": "0.1",
    "x-build-id": "IMSUFqcBhRKe285nJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vizellie~markdown-to-epub-pdf/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vizellie-markdown-to-epub-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/vizellie~markdown-to-epub-pdf/runs": {
      "post": {
        "operationId": "runs-sync-vizellie-markdown-to-epub-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/vizellie~markdown-to-epub-pdf/run-sync": {
      "post": {
        "operationId": "run-sync-vizellie-markdown-to-epub-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": "The Markdown to convert. Headings, lists, tables, code, quotes, links, pictures and footnotes are kept. At most 250,000 characters. Longer text is saved as a failed row and is not charged."
          },
          "markdownUrls": {
            "title": "Markdown file links",
            "type": "array",
            "description": "Public https links to Markdown files. Private and non-https links are blocked and are not charged. At most 20 links are read.",
            "items": {
              "type": "string"
            }
          },
          "markdownKey": {
            "title": "Stored Markdown key",
            "type": "string",
            "description": "Key of a record that already holds the Markdown. Letters, digits, dots, underscores and hyphens only. Leave empty to skip."
          },
          "markdownStore": {
            "title": "Store name",
            "type": "string",
            "description": "Named key-value store for that record. Leave empty to use this run's default store. Only letters, digits and hyphens are kept."
          },
          "title": {
            "title": "Title",
            "type": "string",
            "description": "Book title. Leave empty to use the first chapter heading, or Untitled."
          },
          "author": {
            "title": "Author",
            "type": "string",
            "description": "Author or pen name. Leave empty to omit it."
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language tag, for example en or nl. A value that is not a language tag becomes en.",
            "default": "en"
          },
          "coverUrl": {
            "title": "Cover image link",
            "type": "string",
            "description": "Optional public https link to a PNG or JPEG cover. Other pictures are skipped, and the book is still saved."
          },
          "tableOfContents": {
            "title": "Table of contents",
            "type": "boolean",
            "description": "Add a contents page to the PDF and to the EPUB reading order. A short contents list stays inside the EPUB either way.",
            "default": true
          },
          "chapterSplit": {
            "title": "Chapter split",
            "enum": [
              "h1",
              "h2"
            ],
            "type": "string",
            "description": "Start a new chapter at each heading of this level.",
            "default": "h1"
          },
          "pageSize": {
            "title": "Page size",
            "enum": [
              "A4",
              "Letter",
              "6x9",
              "5x8"
            ],
            "type": "string",
            "description": "PDF page size. The EPUB does not have a fixed page size.",
            "default": "A4"
          },
          "marginMm": {
            "title": "Margins",
            "minimum": 8,
            "maximum": 40,
            "type": "integer",
            "description": "Margin on each side of the PDF, in millimetres, from 8 to 40.",
            "default": 18
          },
          "fontSize": {
            "title": "Base font size",
            "minimum": 8,
            "maximum": 18,
            "type": "integer",
            "description": "Body text size in the PDF, in points, from 8 to 18.",
            "default": 11
          },
          "formats": {
            "title": "Output formats",
            "type": "array",
            "description": "Which files to save. Leave both on unless you only want one of them.",
            "items": {
              "type": "string",
              "enum": [
                "epub",
                "pdf"
              ],
              "enumTitles": [
                "EPUB",
                "PDF"
              ]
            },
            "default": [
              "epub",
              "pdf"
            ]
          },
          "maxDocuments": {
            "title": "Max documents",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Most documents in one run, from 1 to 10. Default 5. Documents past the cap 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}