Updated February 2026 · 5 min read
Website Screenshots
with cURL
One cURL command. That's all it takes. No browser, no dependencies, no code. Just pipe a URL in, get a screenshot out. Works on Linux, macOS, Windows (WSL), CI/CD pipelines, and Docker containers.
Basic Screenshot
Save a screenshot of any website to a file:
curl -o screenshot.webp "https://grabshot.dev/v1/screenshot?url=https://github.com&format=webp&apiKey=YOUR_API_KEY"
That's it. The -o flag saves the response body (the image) to a file. Replace YOUR_API_KEY with your free key from grabshot.dev.
All Options
# PNG format, custom viewport
curl -o screenshot.png "https://grabshot.dev/v1/screenshot?\
url=https://stripe.com&\
format=png&\
width=1920&\
height=1080&\
apiKey=YOUR_API_KEY"
# With device frame (MacBook mockup)
curl -o mockup.png "https://grabshot.dev/v1/screenshot?\
url=https://vercel.com&\
format=png&\
deviceFrame=macbook-air&\
apiKey=YOUR_API_KEY"
# Full page screenshot
curl -o full.webp "https://grabshot.dev/v1/screenshot?\
url=https://tailwindcss.com&\
format=webp&\
fullPage=true&\
apiKey=YOUR_API_KEY"
# AI cleanup (removes cookie banners, popups)
curl -o clean.webp "https://grabshot.dev/v1/screenshot?\
url=https://bbc.com&\
format=webp&\
aiCleanup=true&\
apiKey=YOUR_API_KEY"
# Mobile viewport
curl -o mobile.webp "https://grabshot.dev/v1/screenshot?\
url=https://github.com&\
format=webp&\
width=390&\
height=844&\
apiKey=YOUR_API_KEY"
Bash Script for Batch Screenshots
Screenshot multiple URLs at once:
#!/bin/bash
# batch-screenshots.sh
API_KEY="YOUR_API_KEY"
URLS=(
"https://github.com"
"https://stripe.com"
"https://vercel.com"
"https://linear.app"
"https://notion.so"
)
mkdir -p screenshots
for url in "${URLS[@]}"; do
# Extract domain name for filename
filename=$(echo "$url" | sed 's|https\?://||;s|/.*||;s|\.|-|g')
echo "Capturing $url..."
curl -s -o "screenshots/${filename}.webp" \
"https://grabshot.dev/v1/screenshot?url=${url}&format=webp&width=1440&apiKey=${API_KEY}"
echo " Saved screenshots/${filename}.webp"
sleep 1 # Be nice to the API
done
echo "Done! $(ls screenshots/ | wc -l) screenshots saved."
CI/CD Integration
Take screenshots in GitHub Actions (visual regression, deploy previews):
# .github/workflows/screenshot.yml
name: Visual Snapshot
on:
pull_request:
types: [opened, synchronize]
jobs:
screenshot:
runs-on: ubuntu-latest
steps:
- name: Capture preview screenshot
run: |
curl -s -o screenshot.png \
"https://grabshot.dev/v1/screenshot?\
url=${{ github.event.pull_request.head.ref }}.preview.example.com&\
format=png&\
width=1440&\
apiKey=${{ secrets.GRABSHOT_API_KEY }}"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: screenshot
path: screenshot.png
Scheduled Screenshots with Cron
Monitor a website visually by taking daily screenshots:
# Take a screenshot every day at 9am and save with date
# Add to crontab: crontab -e
0 9 * * * curl -s -o "/var/screenshots/mysite-$(date +\%Y-\%m-\%d).webp" \
"https://grabshot.dev/v1/screenshot?url=https://mysite.com&format=webp&apiKey=YOUR_API_KEY"
Parameters Reference
| url | Website to capture (required) |
| format | png, webp, or jpg (default: webp) |
| width | Viewport width in pixels (default: 1440) |
| height | Viewport height in pixels (default: 900) |
| fullPage | Capture full scrollable page (true/false) |
| deviceFrame | Wrap in device mockup (macbook-air, iphone-15, etc.) |
| aiCleanup | Remove cookie banners and popups with AI (true/false) |
| apiKey | Your API key (required) |
See it in action
Try GrabShot right now — paste any URL and get a screenshot instantly. No signup needed.
Try Free Screenshot Tool →