{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk Webpage to PDF Converter – Batch URL to PDF",
    "description": "Convert one URL, a batch of URLs, or a CSV list to PDFs in a single run. Per-URL success/failure JSON manifest, deterministic filenames, retries, webhooks and optional ZIP bundle. Designed for agents and automation pipelines.",
    "version": "0.1",
    "x-build-id": "o0qbh8vEMcdtDtOkU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/graphitactlabs~webpage-to-pdf-batch/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-graphitactlabs-webpage-to-pdf-batch",
        "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/graphitactlabs~webpage-to-pdf-batch/runs": {
      "post": {
        "operationId": "runs-sync-graphitactlabs-webpage-to-pdf-batch",
        "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/graphitactlabs~webpage-to-pdf-batch/run-sync": {
      "post": {
        "operationId": "run-sync-graphitactlabs-webpage-to-pdf-batch",
        "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": {
          "url": {
            "title": "Single URL",
            "type": "string",
            "description": "One webpage to convert. The https:// scheme is added automatically when missing."
          },
          "urls": {
            "title": "Batch URL array",
            "type": "array",
            "description": "Array of webpage URLs to convert in one batch.",
            "items": {
              "type": "string"
            }
          },
          "csv_text": {
            "title": "CSV / list input",
            "type": "string",
            "description": "Paste a CSV with a 'url' column (or first column = URLs), or a plain list of URLs, one per line."
          },
          "csv_url": {
            "title": "CSV file URL",
            "type": "string",
            "description": "URL of a CSV file to fetch at run start; the 'url' column (or first column) is used. Max 10 MB."
          },
          "pageSize": {
            "title": "Page size",
            "enum": [
              "A0",
              "A1",
              "A2",
              "A3",
              "A4",
              "A5",
              "Letter",
              "Legal",
              "Ledger",
              "Tabloid"
            ],
            "type": "string",
            "description": "Paper format of every PDF.",
            "default": "A4"
          },
          "landscape": {
            "title": "Landscape",
            "type": "boolean",
            "description": "Rotate pages to landscape orientation.",
            "default": false
          },
          "scale": {
            "title": "Scale",
            "minimum": 0.1,
            "maximum": 2,
            "type": "number",
            "description": "Render scale from 0.1 to 2 (1 = 100%).",
            "default": 1
          },
          "margin": {
            "title": "Margin",
            "type": "string",
            "description": "CSS-style page margin: \"0\", \"10mm\", or \"10mm 15mm\" (top right bottom left).",
            "default": "0"
          },
          "waitAfterLoadMs": {
            "title": "Settle time (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Extra wait after page load so late content renders, in milliseconds.",
            "default": 300
          },
          "timeoutMs": {
            "title": "Per-URL timeout (ms)",
            "minimum": 5000,
            "maximum": 120000,
            "type": "integer",
            "description": "Navigation timeout for each URL, in milliseconds.",
            "default": 30000
          },
          "retries": {
            "title": "Retries",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "Retry attempts for timeouts, network errors and HTTP 5xx. HTTP 4xx is never retried.",
            "default": 1
          },
          "blockImages": {
            "title": "Block images",
            "type": "boolean",
            "description": "Skip loading images and media: smaller PDFs, faster and cheaper runs.",
            "default": false
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 6,
            "type": "integer",
            "description": "How many pages render in parallel (1-6). Higher is faster but needs more memory.",
            "default": 3
          },
          "bundleZip": {
            "title": "ZIP bundle",
            "type": "boolean",
            "description": "Also store all successful PDFs as one batch-output.zip record in the key-value store (skipped if over 100 MB).",
            "default": false
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "POST {event:'batch_completed', summary, results[]} when the batch finishes (up to 3 retries with backoff)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}