MCP Hub
Back to servers

PageShot MCP

Capture webpage screenshots with format, viewport, and dark mode options

Updated
Feb 18, 2026

Quick Install

npx -y pageshot-mcp

PageShot API

Free Screenshot & Webpage Capture API for developers. Capture any public URL as a PNG/JPEG/WebP image via a simple REST API.

Features

  • URL → ImageGET or POST to capture any public webpage
  • Full-page capture — render the entire scrollable page
  • Device emulation — custom viewport, scale factor, user-agent
  • Element selector — capture a specific CSS selector on the page
  • Dark mode — force prefers-color-scheme: dark
  • Ad blocking — block common ad/tracker domains
  • CSS injection — apply custom styles before capture
  • Multiple formats — PNG, JPEG, WebP with quality control
  • SSRF protection — private/internal IPs are blocked
  • Rate limiting — 30 req/min per API key
  • Free tier — 100 screenshots/month, no credit card required

Tech Stack

LayerTechnology
RuntimeNode.js 20+
FrameworkExpress 4
BrowserPlaywright (Chromium, headless)
Image processingSharp
SecurityHelmet, CORS, rate limiting
DeploymentDocker → Azure Web App

Quick Start

Prerequisites

  • Node.js 20 or later
  • npm (comes with Node.js)

Install & Run

# Clone the repo
git clone https://github.com/your-org/pageshot-api.git
cd pageshot-api

# Install dependencies
npm install

# Install Playwright's Chromium browser
npx playwright install chromium

# Start the development server (auto-reload on changes)
npm run dev

The server starts at http://localhost:3000.

URLDescription
http://localhost:3000Landing page
http://localhost:3000/docsAPI documentation
http://localhost:3000/v1API info endpoint
http://localhost:3000/healthHealth check

Take a Screenshot

curl "http://localhost:3000/v1/screenshot?url=https://example.com" \
  -H "Authorization: Bearer ps_live_demo" \
  -o screenshot.png

Running with Docker

# Build and start
docker-compose up --build

# The API is available at http://localhost:3000

Or build the image manually:

docker build -t pageshot-api .
docker run -p 3000:8080 pageshot-api

API Endpoints

MethodPathAuthDescription
GET/v1/screenshotYesCapture a URL, return the image directly
POST/v1/screenshotYesCapture with JSON body, optional JSON response
GET/v1/statusNoService health check
GET/healthNoDocker/container health check
GET/docsNoInteractive API documentation
GET/NoLanding page

Authentication

Pass your API key using any of these methods:

Authorization: Bearer ps_live_xxxxx
X-API-Key: ps_live_xxxxx
?api_key=ps_live_xxxxx

Keys are auto-registered on first use (demo mode).

Screenshot Parameters

ParameterTypeDefaultDescription
urlstringrequiredURL to capture
widthint1280Viewport width (320–3840)
heightint720Viewport height (200–2160)
full_pageboolfalseCapture the full scrollable page
formatstringpngOutput format: png, jpeg, webp
qualityint80JPEG/WebP quality (1–100)
dark_modeboolfalseForce dark color scheme
block_adsboolfalseBlock common ad/tracker domains
selectorstringCSS selector to capture
delayint0Wait ms after page load before capture
scalefloat1Device scale factor (1–3)
user_agentstringCustom User-Agent string
cssstringCSS to inject before capture

Environment Variables

VariableDefaultDescription
PORT3000 (dev) / 8080 (prod)Server listen port
NODE_ENVdevelopmentdevelopment or production

Project Structure

pageshot-api/
├── src/
│   ├── server.js              # Express app & route wiring
│   ├── routes/
│   │   ├── screenshot.js      # GET & POST /v1/screenshot
│   │   └── docs.js            # /docs route
│   ├── middleware/
│   │   ├── apiKey.js          # API key auth + usage tracking
│   │   └── rateLimit.js       # Rate limiting
│   ├── services/
│   │   └── browser.js         # Playwright browser management
│   └── public/                # Landing page & docs assets
├── Dockerfile                 # Production container image
├── docker-compose.yml         # Local Docker development
└── package.json

Scripts

CommandDescription
npm startStart the production server
npm run devStart with --watch (auto-reload on file changes)

License

MIT

Reviews

No reviews yet

Sign in to write a review