DocumentationAPI DetailsScrape URLGenerate PDF File

Generate PDF

Generate a PDF document of the final rendered web page. The PDF is created after all browser commands have executed and any captchas have been solved, capturing the complete state of the page as a printable document.

Set includePdf to true to enable this feature. The resulting PDF file is stored temporarily and a download URL is provided in the response. PDF generation requires a real browser - if useBrowser is not set, it will be enabled automatically.

Each PDF generated costs an additional 2 credits. See Credit Usage for details.

When To Use This

  • Report generation - Convert dashboards, analytics pages, or data summaries into distributable PDF reports.
  • Content archival - Save web pages as PDF documents for long-term storage, legal records, or compliance requirements.
  • Offline reading - Generate PDFs of articles, documentation, or reference material for offline access.
  • Invoice and receipt capture - Automatically download billing pages, order confirmations, or transaction records as PDFs.
  • Printing - Convert web content to a print-friendly PDF format with consistent rendering.

Response Data

The PDF download URL appears in the JSON response:

{
  "pdfUrl": "https://scrapi.blob.core.windows.net/[API-KEY]/[FILE].pdf"
}

When using HTML or Markdown format, the URL is returned in the X-ScrAPI-PdfUrl header instead.

PDF files are stored temporarily. Download them promptly after the response.

Example Request

GET https://api.scrapi.tech/v1/scrape?url=https://deventerprise.com&useBrowser=true&includePdf=true

POST https://api.scrapi.tech/v1/scrape

{
  "url": "https://deventerprise.com",
  "useBrowser": true,
  "includePdf": true
}
  • Screenshot - Capture the page as a PNG image instead of (or in addition to) a PDF.
  • Video Recording - Record the full browser session for debugging or archival.
  • Browser Commands - Interact with the page before the PDF is generated.
  • Real Browser - Required for PDF generation (enabled automatically).
  • Credit Usage - PDF generation costs 2 additional credits per request.

Testing

Test this request in the Playground or view the OpenAPI specification.