Industrial Lisp

Capture screenshots in Common Lisp

Add screenshot and scrolling GIF capabilities to your Common Lisp applications with Dexador or Drakma. Powerful, mature, no headless browsers to manage.

Installation

  1. 1Install Dexador via Quicklisp: (ql:quickload :dexador)
  2. 2Get your API key from the dashboard
  3. 3Set the X-KEY header in your requests

Authentication

Include your API key in the X-KEY header with every request:

(ql:quickload :dexador)

(multiple-value-bind (body status headers)
    (dex:get url :headers '(("X-KEY" . "your-api-key")))
  ;; body contains the image bytes
  )

Common Lisp Screenshot Example

Capture a screenshot or create a scrolling GIF animation with a simple GET request:

Screenshot
(ql:quickload :dexador)

(multiple-value-bind (body status headers)
    (dex:get "https://api.scrnpix.com/screenshot?url=https%3A%2F%2Fexample.com&width=1280&height=720&format=png"
      :headers '(("X-KEY" . "your-api-key")))
  (with-open-file (out "screenshot.png"
                   :direction :output
                   :element-type '(unsigned-byte 8)
                   :if-exists :supersede)
    (write-sequence body out)))
Animation
(ql:quickload :dexador)

(multiple-value-bind (body status headers)
    (dex:get "https://api.scrnpix.com/animate?url=https%3A%2F%2Fexample.com&scroll_duration=3000&scroll_easing=ease-in-out"
      :headers '(("X-KEY" . "your-api-key")))
  (with-open-file (out "animation.gif"
                   :direction :output
                   :element-type '(unsigned-byte 8)
                   :if-exists :supersede)
    (write-sequence body out)))

Response Format

On success, the API returns the image binary data directly in the response body.

Status Code200 OK
Content-Typeimage/png, image/jpeg, or image/gif
BodyBinary image data (vector)
Error ResponseError message with 4xx/5xx status

Key Features

Zero Setup

Just quickload Dexador or Drakma. No browser installations required.

Production Ready

Built on Cloudflare Workers with global edge network. Handles concurrency and browser lifecycle automatically.

Common Lisp Integration

Works with SBCL, CCL, ECL, or any Common Lisp implementation. Use cl-png or opticl for image processing.

Rich Features

Custom viewport sizes, full page capture, PNG/JPEG formats, scrolling GIFs with 15 easing functions.

Frequently Asked Questions

Which Common Lisp implementation should I use?

Any implementation with Quicklisp support works — SBCL, CCL, ECL, ABCL, or others.

Do I need to install browser dependencies?

No. Scrnpix runs browsers on our infrastructure. Just use Dexador or Drakma for HTTP calls.

How do I handle errors in Common Lisp?

Use handler-case or handler-bind for condition handling. Check the status value from dex:get.

Should I use Dexador or Drakma?

Dexador is recommended for its speed and modern API. Drakma also works well. Both support HTTPS.

Ready to capture screenshots in Common Lisp?

Get your API key and start rendering screenshots in seconds. Free tier includes 50 screenshots per month.

Start Free