SnapAPI

Screenshots, PDFs, and Markdown conversion. One API for all your document generation needs.

Online v2.0 PNG / JPEG / PDF Markdown

Document Generation Suite

URL Screenshots

Capture any webpage as PNG, JPEG, or PDF. Custom viewports, full-page support.

Markdown to PDF

Convert Markdown to beautifully styled PDFs. Light and dark themes, custom margins.

Markdown to Image

Render Markdown as PNG or JPEG images. Perfect for social cards and previews.

Markdown to HTML

Convert Markdown to styled HTML. Free endpoint, no auth required.

Get started in 30 seconds

1. Get your API key

Contact us or use the demo key below for testing (100 captures/month).

2. Capture a screenshot

curl "https://YOUR_HOST/screenshot-api/api/capture?url=https://example.com" \
  -H "X-API-Key: YOUR_API_KEY" \
  -o screenshot.png

3. Convert Markdown to PDF

curl -X POST "https://YOUR_HOST/screenshot-api/api/md2pdf" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"markdown": "# My Document\n\nHello **world**!"}' \
  -o document.pdf

Node.js Example

// Screenshot
const resp = await fetch(
  'https://YOUR_HOST/screenshot-api/api/capture?url=https://example.com',
  { headers: { 'X-API-Key': 'YOUR_API_KEY' } }
);
fs.writeFileSync('screenshot.png', Buffer.from(await resp.arrayBuffer()));

// Markdown to PDF
const pdf = await fetch('https://YOUR_HOST/screenshot-api/api/md2pdf', {
  method: 'POST',
  headers: { 'X-API-Key': 'YOUR_API_KEY', 'Content-Type': 'application/json' },
  body: JSON.stringify({ markdown: '# Hello\n\nWorld!', theme: 'light' })
});
fs.writeFileSync('doc.pdf', Buffer.from(await pdf.arrayBuffer()));

Python Example

import requests

# Screenshot
resp = requests.get(
    'https://YOUR_HOST/screenshot-api/api/capture',
    params={'url': 'https://example.com'},
    headers={'X-API-Key': 'YOUR_API_KEY'}
)
with open('screenshot.png', 'wb') as f:
    f.write(resp.content)

# Markdown to PDF
resp = requests.post(
    'https://YOUR_HOST/screenshot-api/api/md2pdf',
    headers={'X-API-Key': 'YOUR_API_KEY', 'Content-Type': 'application/json'},
    json={'markdown': '# Hello\n\nWorld!', 'theme': 'light'}
)
with open('doc.pdf', 'wb') as f:
    f.write(resp.content)

Endpoints

GET /api/capture

Capture a screenshot or PDF from a URL.

ParameterTypeDescription
urlstringRequired. The URL to capture.
formatstringpng (default), jpeg, or pdf
widthintViewport width, 320-3840. Default: 1280
heightintViewport height, 200-2160. Default: 800
fullPageboolCapture the full scrollable page
delayintWait ms after page load (max 10000)
qualityintJPEG quality, 1-100. Default: 80
paperSizestringPDF paper size: A4, Letter, Legal, etc.
landscapeboolPDF landscape orientation
userAgentstringCustom User-Agent header
timeoutintNavigation timeout ms (5000-60000)

POST /api/md2pdf

Convert Markdown to a styled PDF document. Requires authentication.

Body FieldTypeDescription
markdownstringRequired. Markdown content to convert.
themestringlight (default) or dark
paperSizestringA4 (default), Letter, Legal, Tabloid
landscapeboolLandscape orientation. Default: false
fontSizestringBase font size. Default: "16px"
marginsobject{ top, bottom, left, right } in CSS units

POST /api/md2png

Convert Markdown to a PNG or JPEG image. Requires authentication.

Body FieldTypeDescription
markdownstringRequired. Markdown content to convert.
themestringlight (default) or dark
formatstringpng (default) or jpeg
widthintImage width, 320-3840. Default: 1280
fontSizestringBase font size. Default: "16px"
qualityintJPEG quality, 1-100. Default: 85

POST /api/md2html

Convert Markdown to styled HTML. No authentication required.

Body FieldTypeDescription
markdownstringRequired. Markdown content to convert.
themestringlight (default) or dark
fontSizestringBase font size. Default: "16px"
widthstringMax content width. Default: "800px"

Authentication

Pass your API key via the X-API-Key header or the api_key query parameter. The /api/md2html endpoint does not require authentication.

Error Responses

StatusMeaning
400Missing/invalid parameters, body too large (max 1MB)
401Missing or invalid API key
429Rate limit or monthly limit exceeded
500Conversion failed
503Server busy, max concurrent tasks reached

GET /api/status

Service health and statistics. No authentication required.

Try Screenshot Capture

Try Markdown Conversion

Pricing

Free

$0/mo
  • 100 captures / month
  • Screenshots: PNG, JPEG, PDF
  • Markdown: PDF, PNG, HTML
  • 10 requests / minute
  • Light & dark themes
  • md2html: unlimited, no auth

Pro

$19/mo
  • 5,000 captures / month
  • Screenshots: PNG, JPEG, PDF
  • Markdown: PDF, PNG, HTML
  • 60 requests / minute
  • Custom viewport up to 4K
  • Custom margins & paper sizes
  • Priority support

Contact us to get started with a Pro plan or discuss enterprise needs.