Why Use a Webpage Capture API?

Automated webpage capture powers thousands of products across the web. From social platforms generating link previews to QA teams running visual regression tests, converting a URL to an image is one of the most common infrastructure tasks in modern software. Running your own headless browser is operationally expensive — managing Chromium processes, handling memory leaks, keeping dependencies updated, and scaling across multiple servers. PageShot eliminates all of that with a single HTTP endpoint that returns a screenshot in seconds.

Use Cases for Webpage Capture

Every team that works with URLs can benefit from automated webpage capture. Here are the four most common patterns.

📱

Social Media Previews

Generate rich visual previews for links shared on social platforms. When a user submits a URL to your application, call the PageShot API to create a thumbnail image that accompanies the link. This dramatically increases click-through rates compared to text-only links. Social media managers use the free screenshot API to pre-generate preview cards for scheduled posts across Facebook, LinkedIn, Twitter, and Instagram. The API supports custom viewport widths and device emulation, so you can capture mobile-optimized versions for platforms where mobile previews dominate the feed.

🔗

Link Preview Cards

Messaging apps, email clients, and content aggregators display link preview cards whenever someone shares a URL. While Open Graph metadata provides a title and description, a live screenshot of the target page adds visual context that metadata alone cannot convey. Use the webpage capture tutorial to learn how to generate link preview images on the fly. The API captures the page as a real user would see it, including dynamically loaded content, CSS animations frozen at render time, and dark mode variants. Developers building Slack bots, Discord integrations, or custom CMS platforms use this endpoint to enrich every shared link with an accurate visual representation.

🔍

Visual Monitoring

Track visual changes to competitor websites, your own production pages, or third-party dependencies by capturing screenshots on a schedule. Compare images pixel-by-pixel to detect layout shifts, broken CSS, missing assets, or unauthorized content changes. DevOps teams integrate the POST /v1/screenshot/batch endpoint into cron jobs or CI pipelines to capture dozens of URLs every hour. Pair the captures with image diffing tools to build a complete visual regression monitoring system without running any browser infrastructure yourself. E-commerce companies use this to monitor pricing pages, and agencies track client websites for uptime and visual consistency.

🧪

Automated Testing

QA engineers use webpage capture to create visual baselines for end-to-end test suites. Instead of maintaining a local Playwright or Puppeteer setup just for screenshot generation, call the PageShot API from your test runner to capture the page under test and compare the result against a golden image. The API supports CSS injection, JavaScript disabling, viewport customization, and element-level selectors — all the controls you need for deterministic visual testing. Teams running cross-browser tests use the deviceScaleFactor parameter to simulate retina displays, and the selector parameter to isolate individual components for focused comparisons.

How It Works

Capture any webpage in three steps. No signup, no API key, no configuration.

1

Send a URL

Make a GET or POST request to https://pageshot.site/v1/screenshot with the target URL. Include optional parameters for viewport dimensions, output format, full-page capture, delay, and device emulation. The API accepts both query parameters and JSON body payloads.

2

Chromium Renders the Page

PageShot launches a real Chromium browser instance via Playwright, navigates to the target URL, waits for the page to fully load (including JavaScript execution, font loading, and dynamic content), and captures the rendered result at the specified viewport size.

3

Receive Your Image

The API returns the screenshot as a binary image in your chosen format (PNG, JPEG, or WebP). Response headers include the content type, image dimensions, and the resolved page title. Save it to disk, store it in your CDN, or display it directly in your application.

API Endpoints

All endpoints use the base URL https://pageshot.site. No authentication required.

GET /v1/screenshot?url=...

Capture a webpage screenshot via query parameters. Supports url, format (png, jpeg, webp), width, height, fullPage, delay, selector, darkMode, and blockAds.

POST /v1/screenshot

Capture a webpage screenshot via JSON body. Same parameters as GET but sent as a JSON payload. Ideal for programmatic integrations where URL encoding is inconvenient.

POST /v1/html

Render raw HTML to an image. Send HTML content in the request body and receive a screenshot of the rendered result. Perfect for email template previews, component snapshots, and design system documentation.

POST /v1/pdf

Convert a URL or HTML to PDF format. Supports custom page sizes, margins, headers, and footers. Use this when you need a printable version alongside your image captures.

POST /v1/screenshot/batch

Capture multiple URLs in a single request. Submit an array of URL objects and receive a batch response with all screenshots. Ideal for visual monitoring, portfolio snapshots, and bulk preview generation.

Code Examples

Capture webpages programmatically in seconds. Copy, paste, run — no setup required.

terminal
# Capture a webpage as PNG (default)
curl "https://pageshot.site/v1/screenshot?url=https://example.com" \
  --output screenshot.png

# Full-page capture in WebP format
curl "https://pageshot.site/v1/screenshot?url=https://example.com&fullPage=true&format=webp" \
  --output full-page.webp

# Capture with custom viewport and dark mode
curl -X POST https://pageshot.site/v1/screenshot \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com","width":1440,"height":900,"darkMode":true,"format":"jpeg"}' \
  --output dark-mode.jpg

# Capture a specific element by CSS selector
curl "https://pageshot.site/v1/screenshot?url=https://example.com&selector=.hero-section" \
  --output hero-only.png

# Batch capture multiple URLs
curl -X POST https://pageshot.site/v1/screenshot/batch \
  -H "Content-Type: application/json" \
  -d '{"urls":["https://example.com","https://github.com"]}'

Advanced Features

PageShot goes far beyond basic URL-to-image conversion. Every capture parameter gives you precise control over the output.

🌍

Device Emulation

Simulate iPhone, iPad, Android, and custom devices with accurate viewport, user agent, and pixel density settings.

🌙

Dark Mode Capture

Force the prefers-color-scheme: dark media query to capture websites in their dark theme variant.

🚫

Ad Blocking

Strip ads, popups, cookie banners, and tracking scripts before capture. Get clean screenshots every time.

🎨

CSS Injection

Inject custom CSS before capture to hide elements, change styles, or override layouts for precise visual output.

📐

Element Selectors

Capture a specific DOM element by CSS selector. Isolate headers, cards, charts, or any component on the page.

📍

Geolocation Emulation

Set latitude and longitude to capture location-aware pages as they appear from different geographic regions.

Custom Delays

Wait for lazy-loaded content, animations, or API calls to complete before capturing with configurable delay timing.

📄

PDF Export

Convert any URL to PDF with the same Chromium rendering engine. Custom page sizes, margins, and header/footer support.

Frequently Asked Questions

Is the PageShot webpage capture API really free?

Yes. PageShot is 100% free with no API key, no signup, and no usage limits. You can capture as many webpages as you need without paying anything. The API is funded by SoftVoyagers as part of our free developer toolkit ecosystem. There are no hidden tiers, no premium plans, and no credit card required.

What image formats does the webpage capture API support?

PageShot supports three output formats: PNG (default, lossless quality), JPEG (smaller file sizes, configurable quality), and WebP (best compression-to-quality ratio for web use). Specify your preferred format with the format query parameter or JSON body field. All formats support custom viewport dimensions and full-page capture.

Can I capture a full-page screenshot including content below the fold?

Yes. Set the fullPage parameter to true and PageShot will scroll the entire page and capture everything from the top of the document to the bottom. This is useful for capturing landing pages, long-form articles, documentation pages, and any content that extends beyond the initial viewport. The resulting image can be very tall for lengthy pages.

How long does a webpage capture typically take?

Most captures complete in 1 to 3 seconds. Pages with heavy JavaScript frameworks, large media assets, or slow third-party scripts may take up to 10 seconds. You can fine-tune timing with the delay parameter (to wait for dynamic content) and the timeout parameter (to set a maximum wait time). The API returns the image as soon as rendering is complete.

Can I capture a specific element instead of the full viewport?

Yes. Use the selector parameter with any valid CSS selector (e.g., #hero, .pricing-table, [data-testid="chart"]) to capture only that element. The API renders the full page, then clips the output to the bounding box of your selected element. This is ideal for capturing individual components, widgets, pricing cards, or chart visualizations without surrounding page content.

Does the API execute JavaScript on the target page?

Yes. PageShot uses a real Chromium browser via Playwright, so all JavaScript executes exactly as it would in a user's browser. Single-page applications built with React, Vue, Angular, Next.js, and other frameworks render correctly. You can also disable JavaScript with jsEnabled=false for static HTML capture or to speed up rendering of simple pages.

Can I use the API for batch processing?

Yes. The POST /v1/screenshot/batch endpoint accepts an array of URL objects and returns all captures in a single response. This is significantly more efficient than making individual requests when you need to capture dozens or hundreds of pages for monitoring dashboards, content management previews, or portfolio snapshots. Check the API documentation for batch request limits and response format details.

Start Capturing Webpages Today

Free webpage capture API for developers. No signup. No API key. No limits. Just send a URL and get an image.

Developer toolkit family

PageShot works alongside our other free developer APIs. Convert URLs to PDF with PDFSpark, extract metadata with LinkMeta, or generate Open Graph images with OGForge.