{
  "openapi": "3.0.1",
  "info": {
    "title": "MOBI to EPUB Converter - AZW3, AZW and PRC",
    "description": "Convert MOBI to EPUB in seconds, along with AZW, AZW3 and PRC. Drop in one ebook or a whole shelf - up to 100 files a run, returned as a single ZIP. Amazon stopped delivering MOBI in 2022, so this puts old Kindle files back on Kobo, Apple Books, Nook or Send to Kindle. DRM-free only.",
    "version": "0.2",
    "x-build-id": "YDkPZf2CAobEyWkmg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/marcel-rbro~mobi-to-epub/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-marcel-rbro-mobi-to-epub",
        "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/marcel-rbro~mobi-to-epub/runs": {
      "post": {
        "operationId": "runs-sync-marcel-rbro-mobi-to-epub",
        "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/marcel-rbro~mobi-to-epub/run-sync": {
      "post": {
        "operationId": "run-sync-marcel-rbro-mobi-to-epub",
        "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": {
          "files": {
            "title": "Ebooks",
            "maxItems": 100,
            "type": "array",
            "description": "The ebooks to convert. Upload files or paste direct URLs - up to 100 per run. Each one is converted separately and the results come back as a single ZIP. Accepts .mobi, .prc, .azw and .azw3. DRM-protected books cannot be converted: in a batch they are skipped and reported, and the rest of the run carries on."
          },
          "file": {
            "title": "Single ebook (alias)",
            "type": "string",
            "description": "Alias for a single-book run, kept so existing API callers and saved input configurations keep working. Pass one URL. Ignored when Ebooks is filled in."
          },
          "epubVersion": {
            "title": "EPUB version",
            "enum": [
              "3",
              "2"
            ],
            "type": "string",
            "description": "EPUB 3 is what Amazon's Send to Kindle, Kobo and Apple Books expect. Choose EPUB 2 only for old readers. Applies to every book in the run.",
            "default": "3"
          },
          "outputFilename": {
            "title": "Output filename",
            "type": "string",
            "description": "Name of the resulting file. Defaults to the input filename with an .epub extension. Applies to a single book only - in a batch it is ignored, each EPUB keeps its own filename and the archive is called epubs.zip."
          },
          "bookTitle": {
            "title": "Override title",
            "type": "string",
            "description": "Sets the title metadata of the EPUB. Leave empty to keep the title stored in the source file. Ignored when converting more than one book, since it would stamp the same title onto all of them."
          },
          "bookAuthors": {
            "title": "Override authors",
            "type": "string",
            "description": "Sets the author metadata of the EPUB. Separate multiple authors with an ampersand, for example \"Ursula K. Le Guin & Someone Else\". Ignored when converting more than one book."
          },
          "smartenPunctuation": {
            "title": "Smarten punctuation",
            "type": "boolean",
            "description": "Converts plain quotes, dashes and ellipses into their typographic equivalents.",
            "default": false
          },
          "fileBase64": {
            "title": "File as base64",
            "type": "string",
            "description": "Alternative to the file field for API callers: a single source file encoded as base64. Adds about 33% to the payload size."
          },
          "filename": {
            "title": "Filename for base64 input",
            "type": "string",
            "description": "Original filename to use when the file is passed as base64."
          },
          "verboseLog": {
            "title": "Verbose log",
            "type": "boolean",
            "description": "Includes the full calibre conversion log in the Actor log. Useful when a conversion produces odd output.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}