{
  "openapi": "3.0.1",
  "info": {
    "title": "PDF to JPG Converter - PDF Pages to Images",
    "description": "Convert PDF to JPG online in seconds. Every page becomes an image, returned as a ZIP with one file per page. Also outputs PNG, WebP and TIFF at a DPI you choose. Up to 100 documents per run, with a page range when you only need part of a file.",
    "version": "0.1",
    "x-build-id": "s4be2fK6bdNZ6x4y9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/marcel-rbro~pdf-to-jpg/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-marcel-rbro-pdf-to-jpg",
        "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~pdf-to-jpg/runs": {
      "post": {
        "operationId": "runs-sync-marcel-rbro-pdf-to-jpg",
        "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~pdf-to-jpg/run-sync": {
      "post": {
        "operationId": "run-sync-marcel-rbro-pdf-to-jpg",
        "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": "PDF files",
            "maxItems": 100,
            "type": "array",
            "description": "The PDFs to convert, up to 100 per run. Upload files or paste direct URLs. Every page of every document is converted, and the result comes back as one ZIP with a folder per document. Password-protected files are not supported."
          },
          "file": {
            "title": "Single PDF",
            "type": "string",
            "description": "Alternative to the PDF files field for a single document, kept so existing API callers and saved input configurations keep working. Ignored when files is filled in."
          },
          "outputFormat": {
            "title": "Convert to",
            "enum": [
              "jpeg",
              "png",
              "webp",
              "tiff"
            ],
            "type": "string",
            "description": "JPEG opens everywhere and is the right answer for scans and photo-heavy pages. Choose PNG for pages that are mostly text, diagrams or screenshots: it is lossless, so the text edges stay crisp.",
            "default": "jpeg"
          },
          "dpi": {
            "title": "Resolution (DPI)",
            "minimum": 36,
            "maximum": 600,
            "type": "integer",
            "description": "How finely each page is rendered. 150 DPI turns an A4 page into roughly 1240 x 1754 pixels, which is right for reading on screen. Use 300 for printing or OCR, and note that doubling the DPI quadruples the pixels, the file size and the render time.",
            "default": 150
          },
          "pages": {
            "title": "Pages",
            "type": "string",
            "description": "Which pages to convert: \"all\", a single page (\"4\"), a range (\"2-7\"), an open range (\"5-\"), or a comma-separated list (\"1,3,8-10\"). Applies to every document in the run.",
            "default": "all"
          },
          "quality": {
            "title": "Quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Compression quality from 1 to 100, used by JPEG and WebP. 90 keeps text readable without bloating the file. Ignored for PNG and TIFF, which are lossless.",
            "default": 90
          },
          "transparentBackground": {
            "title": "Transparent background",
            "type": "boolean",
            "description": "Renders the page with a transparent background instead of white, so a logo or a signature can be laid over something else. Only applies to PNG, WebP and TIFF; JPEG has no transparency and always gets a white background.",
            "default": false
          },
          "outputFilename": {
            "title": "Output filename",
            "type": "string",
            "description": "Base name for the archive, or for the image when a single page of a single PDF is converted. Defaults to the input filename for one PDF and to pages.zip for several. Individual pages are always named after their page number and their source document."
          },
          "fileBase64": {
            "title": "File as base64",
            "type": "string",
            "description": "Alternative to the file field for API callers: the 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 ImageMagick and Ghostscript output in the Actor log. Useful when a page renders oddly.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}