Skip to content

Sleywill/snapapi-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

snapapi-cli

CLI for SnapAPI — capture screenshots, generate PDFs, and extract web content from the command line.

Quick Start

# No install needed:
npx snapapi screenshot https://example.com -o screenshot.png

# Or install globally:
npm install -g snapapi-cli
snapapi screenshot https://example.com

Get a free API key at snapapi.pics (200 captures/month, no credit card).

Commands

# Screenshot
npx snapapi screenshot https://example.com -o shot.png
npx snapapi screenshot https://example.com --full-page --dark-mode
npx snapapi screenshot https://example.com --device iphone-15-pro -o mobile.png

# PDF
npx snapapi pdf https://example.com -o output.pdf

# Extract as markdown (for LLMs/RAG)
npx snapapi extract https://example.com --type markdown

# Health check
npx snapapi ping

API Key

export SNAPAPI_KEY=your_key_here
npx snapapi screenshot https://example.com

Or pass inline: npx snapapi screenshot https://example.com --api-key YOUR_KEY

Full Options

Option Description Default
--api-key, -k API key $SNAPAPI_KEY
--output, -o Output file auto
--format, -f png/jpeg/webp/pdf png
--full-page Capture full page false
--device, -d Device preset -
--dark-mode Dark mode false
--width Viewport width 1280
--height Viewport height 800
--type Extract type (markdown/text/article/links) markdown

Free Tier

snapapi.pics — 200 captures/month free.
Full API docs: snapapi.pics/docs.html

About

CLI for SnapAPI — capture screenshots, generate PDFs, extract web data. Works with npx.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors