Release · · SnapshotFlow Team

Node.js SDK 1.1.1, Java SDK 1.0.2 and Chrome extension 1.4

Both official SDKs now support the async batch jobs and blocking options released last week. The Chrome extension can capture a single page element, pixelate parts of a screenshot and start any capture from a shortcut or the right-click menu.

Node.js SDK 1.1.1

snapshotflow 1.1.1 is on npm. Update with npm install snapshotflow@latest. Nothing in 1.0.0 was removed, so existing code keeps working.

  • Async batches. batch({ urls, async: true }) returns { jobId, status, total } right away. TypeScript picks the right return type from the async flag.
  • Batch and diff options. batch() accepts blockAds, blockCookieBanners, waitUntil and responseType: "image_urls". diff() accepts blockAds, blockCookieBanners and waitUntil.
  • Job progress. getJob() and waitForJob() now return kind, progress, batchResults, errorCode and startedAt. Batch items include downloadUrl and screenshotId when you ask for image URLs.
  • New exported types: BatchAsyncResult, JobKind, JobProgress and JobResult.
const { jobId } = await client.batch({
  urls: ["https://example.com", "https://example.org"],
  async: true,
  responseType: "image_urls",
});
const job = await client.waitForJob(jobId);
console.log(job.progress, job.batchResults);

Full setup and examples are in the Node.js SDK guide. What the first release included is in the snapshotflow npm package launch notes.

Java SDK 1.0.2

snapshotflow-java 1.0.2 is on Maven Central. Change the version to com.snapshotflow:snapshotflow-java:1.0.2 in Maven or Gradle.

  • Async batches. client.batch().submit(request) starts a batch job and returns a JobSubmission. Wait for it with client.jobs().await(jobId, timeout).
  • Job progress. Job now has kind(), progress(), batchResults(), errorCode() and startedAt().
  • Text extraction. client.extract().extract(url) calls GET /extract and returns the page as markdown or text, with chars() and truncated().
  • Batch and diff options. BatchRequest and DiffRequest builders accept blockAds, blockCookieBanners and waitUntil. Batch items expose downloadUrl().
  • History. history().list(limit, offset, ttlSeconds, lite) sets how long signed URLs stay valid, or skips them for faster listing.
  • The default request timeout is now 90 seconds instead of 60. Diff requests are no longer retried automatically, because each diff renders two pages and uses two captures from your quota.
JobSubmission submission = client.batch().submit(
    "https://example.com", "https://example.org");
Job job = client.jobs().await(submission.jobId(), Duration.ofMinutes(2));
job.batchResults().forEach(System.out::println);

Installation, configuration and every API call are covered in the Java SDK guide. What the first release included is in the snapshotflow-java launch notes.

Chrome extension 1.4

The SnapshotFlow Chrome extension has new capture and editing tools. Chrome installs the update automatically. All of them work locally and need no account. The next release adds Markdown page details and a URL footer: see the Chrome extension 1.5 release notes.

  • Capture a page element. Choose Page element and move the pointer: the element under it is highlighted. Use ↑ and ↓ to move to the parent or child element, then click or press Enter to capture it. Elements taller than the window are captured in full, the same way as a full-page capture, and fixed headers and chat widgets are hidden while it runs.
  • Pixelate. A new Pixelate tool (P) turns an area into coarse blocks of 16 to 64 px. Annotations on top stay sharp. For passwords, card numbers and other secrets, keep using Redact: it covers the pixels completely.
  • More keyboard shortcuts. Alt+Shift+V captures the visible area, Alt+Shift+R a selected area and Alt+Shift+E a page element, next to Alt+Shift+S for a full page. If another extension already uses a combination, Chrome leaves it unassigned; change it in chrome://extensions/shortcuts.
  • Right-click menu. Right-click any website and choose SnapshotFlow screenshot to pick a capture mode without opening the toolbar menu. The menu reads nothing from the page until you choose an action.
  • File name templates. In Settings, build download names from {domain}, {date}, {time} and {title}. The default is {domain}-{date}-{time}, and dates and times are in UTC.

Get started

Update the SDK you use, or install the extension from the Chrome Web Store. Every API option is listed in the batch API reference.

All updates