
Company News
Socket Joins New OpenJS Program to Fund Node.js Security Work
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.
SnapAPI client — REST API for screenshots, PDFs, and web content extraction. No browser infrastructure required.
Official JavaScript/TypeScript client for SnapAPI — a REST API for screenshots, PDFs, QR codes, and web content extraction. No browser infrastructure required.
npm install snapapi-js
import SnapAPI from 'snapapi-js';
import { writeFileSync } from 'fs';
const client = new SnapAPI({ apiKey: 'your-api-key' });
// Take a screenshot
const screenshot = await client.screenshot({ url: 'https://example.com' });
writeFileSync('screenshot.png', screenshot);
// Convert markdown to PDF
const pdf = await client.markdownToPDF({ content: '# Hello World\n\nThis is a PDF.' });
writeFileSync('document.pdf', pdf);
// Generate a QR code
const qr = await client.qr({ text: 'https://example.com', size: 256 });
writeFileSync('qr.png', qr);
// Extract Open Graph metadata
const og = await client.og({ url: 'https://example.com' });
console.log(og);
new SnapAPI(options)| Option | Type | Required | Description |
|---|---|---|---|
apiKey | string | Yes | Your SnapAPI key (free: 100 calls/month) |
baseUrl | string | No | Custom base URL (default: https://api.opspawn.com) |
screenshot(options) → Promise<Uint8Array>| Option | Type | Default | Description |
|---|---|---|---|
url | string | Required | URL to screenshot |
width | number | 1280 | Viewport width |
height | number | 720 | Viewport height |
fullPage | boolean | false | Capture full page |
format | string | png | png, jpeg, or webp |
quality | number | 80 | Image quality (1-100) |
delay | number | 0 | Wait time in ms before capture |
markdownToPDF(options) → Promise<Uint8Array>| Option | Type | Default | Description |
|---|---|---|---|
content | string | Required | Markdown content |
title | string | PDF title | |
format | string | A4 | Page size: A4, Letter, Legal |
og(options) → Promise<object>Returns Open Graph metadata for a URL.
toMarkdown(options) → Promise<object>Converts an HTML page to Markdown.
qr(options) → Promise<Uint8Array>| Option | Type | Default | Description |
|---|---|---|---|
text | string | Required | Text/URL to encode |
size | number | 256 | Image size in pixels |
format | string | png | png or svg |
Get your free API key at opspawn.com/snapapi.
FAQs
Official JavaScript/TypeScript SDK for SnapAPI - Screenshot & PDF generation API
The npm package snapapi-js receives a total of 2 weekly downloads. As such, snapapi-js popularity was classified as not popular.
We found that snapapi-js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Company News
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.

Security News
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.

Research
/Security News
A malicious Firefox extension fetches its payload after installation to evade detection, steal Google session cookies, and automate account takeover.