zshot/cliDownload

Run an API server

Requires a Pro license

--server runs zshot as an HTTP API that keeps a browser warm between requests. Put it behind a token: pass a shared secret and every request must carry Authorization: Bearer <token>, or it gets a 401. Server mode is Pro.

Start it on :3000 with a token, locally or from the Docker image — the image reads the same token from ZSHOT_SERVER_TOKEN_AUTH:

zshot --server
zshot --server --server-bind-port 3000 \
  --server-token-auth s3cr3t

A client sends the capture request as JSON and reads the response body. This Node script asks the server to render the Gazette as Markdown and writes it to gazette.md:

// gazette.js — render the Gazette as Markdown through the token-protected server.
import { writeFile } from "node:fs/promises";

const res = await fetch("http://localhost:3000/", {
  method: "POST",
  headers: {
    Authorization: "Bearer s3cr3t",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    url: "https://zshot-cli.com/example_assets/gazette/",
    output_type: "markdown",
  }),
});
if (!res.ok) throw new Error(`zshot ${res.status}: ${await res.text()}`);
await writeFile("gazette.md", await res.text());

Run it with node gazette.js on Node 18 or newer. The server returns the page as Markdown, written to gazette.md.

Expected output
# The ZShot Gazette

Daily Edition · No. 1 Thursday, June 18, 2026 Price: one (1) free license

![](https://zshot-cli.com/example_assets/gazette/zshot-mark.svg)

# The ZShot Gazette

All The Markup That's Fit To Render · zshot-cli.com

[Sports](https://zshot-cli.com/example_assets/gazette/#) [Weather](https://zshot-cli.com/example_assets/gazette/#) [Lifestyle](https://zshot-cli.com/example_assets/gazette/#) [Food](https://zshot-cli.com/example_assets/gazette/#) [Technology](https://zshot-cli.com/example_assets/gazette/#) [Politics](https://zshot-cli.com/example_assets/gazette/#)

Politics

## [Mayor Blamed For Bandwidth Deficit](https://zshot-cli.com/example_assets/gazette/#)

![A rack of network switches with a tangle of blue Ethernet cables](https://zshot-cli.com/example_assets/gazette/img/bandwidth.jpg)

City uplink, pictured Tuesday, allegedly leaking egress that officials insist is not real.

The mayor remains tangled in the city's long-running bandwidth controversy after a hot-mic moment caught him insisting that _"egress isn't real."_ Aides spent the afternoon explaining that the packets are, in fact, leaving. Opposition leaders demanded an immediate uplink and a public traceroute.

By Ada O'Verflow · City Desk

[![A historic theater marquee lit up over a city street at night](https://zshot-cli.com/example_assets/gazette/img/marquee.jpg)](https://zshot-cli.com/example_assets/gazette/#)

Technology

… 53 more lines