Tutorial 5 min read Mar 14, 2026

URL to PDF API: Convert Any Website to PDF Programmatically

Generate pixel-perfect PDFs from any URL using a REST API. Perfect for invoices, reports, and archiving.

Generate pixel-perfect PDFs from any URL using a REST API. Perfect for invoices, reports, and archiving.

Getting Started

The GoScreenAPI API makes it simple to capture screenshots programmatically. You need an API key (free tier available -- 250 screenshots/month) and a single HTTP POST request.

Basic Request

cURL
curl -X POST 'https://goscreenapi.com/api/v1/screenshot' \
  -H 'X-API-Key: gsc_your_api_key' \
  -H 'Content-Type: application/json' \
  -d '{
    "url": "https://example.com",
    "format": "png",
    "full_page": true,
    "async": false
  }'

Response

JSON Response
{
  "id": "018e1234-abcd-7000-8000-000000000001",
  "status": "completed",
  "image_url": "https://cdn.GoScreenAPI.com/screenshots/abc123.png",
  "duration_ms": 1240,
  "cache_hit": false
}

Advanced Usage

GoScreenAPI supports advanced parameters including element capture with CSS selectors, dark mode rendering, custom CSS injection, and webhook notifications for async jobs.

Try it in the Playground

Test all parameters interactively without writing any code.

Open Playground ->

Next Steps