Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

WordPress does not include a built-in endpoint for turning a webpage into an image. Its REST API exposes WordPress site data as JSON; to render a page as a screenshot or PDF, call a separate screenshot service from server-side WordPress code or use a plugin that wraps one. This guide shows how to choose the integration, make the request safely, handle its response, and troubleshoot the result.

WordPress REST API versus a screenshot API

The WordPress REST API is an interface for applications to exchange site data as JSON; it is not a browser renderer. WordPress documents it as an API for interacting with your site: WordPress REST API Handbook. A screenshot API is a separate service that loads a webpage in a browser-like environment and returns an image or document according to that provider’s contract.

Each WordPress installation has its own REST API. To inspect the routes available on your site, open https://your-site.example/wp-json/ and replace the example host with your domain. The index describes WordPress routes; it is not the address of a screenshot service. WordPress also documents route discovery and the OPTIONS method for inspecting endpoint capabilities: REST API discovery and REST API handbook guidance.

Public WordPress content is generally available without authentication, but private or restricted content requires appropriate authentication and permissions. A screenshot provider does not automatically gain WordPress access just because it receives a URL. For protected pages, design the authorization flow deliberately rather than exposing credentials or making private content public. See WordPress REST API authentication.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

Choose an integration approach

Call a provider from server-side WordPress code

This suits developers who need control over when captures run, how results are stored, and which page or user can request them. Your WordPress server holds the provider credential and makes the HTTP request. Provider interfaces differ: one may offer GET and POST, while another requires POST for particular options. Their endpoint, authentication, parameters, and return format are not interchangeable.

Use a plugin or shortcode

A plugin can reduce the amount of integration code and may make it possible to embed a screenshot with a shortcode. For example, the Urlbox WordPress Screenshots repository describes a shortcode-based integration using Urlbox. The repository’s existence does not establish current maintenance or compatibility with your WordPress version. Before installing, check its latest release, support status, permissions, and compatibility with your site and provider account.

Extend the WordPress REST API only when you need a WordPress route

A custom WordPress route can provide a controlled interface for a theme, plugin, or application to request a capture. It does not replace the screenshot renderer: your handler still needs to call a screenshot provider or another rendering system. Follow WordPress route and permission-callback conventions, and verify that the caller is allowed to request a capture of the chosen content. WordPress’s documentation explains adding custom REST API endpoints.

Quick start: server-side PHP request

The following is a provider-neutral integration pattern, not a universal screenshot API request. Replace the endpoint, authentication header, request fields, and response handling with the exact instructions for the provider you choose. The example assumes the provider accepts a POST with a JSON body and returns image bytes; confirm those details in its documentation before using it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
  1. Put the API key in server configuration. Define SCREENSHOT_API_KEY in the environment or a server-side configuration mechanism that is not delivered to visitors. Do not place the secret in a public JavaScript file, shortcode output, or a page template rendered to the browser.
  2. Make the request from PHP. WordPress provides the HTTP API functions below. Change $endpoint and the JSON fields to match the provider’s documented contract.
  3. Check the HTTP status and response content. Do not assume every successful HTTP response is an image; inspect content type and handle provider errors before saving or displaying the result.
<?php
function mysite_capture_screenshot( $page_url ) {
    $api_key = getenv( 'SCREENSHOT_API_KEY' );
    if ( ! $api_key ) {
        return new WP_Error( 'missing_api_key', 'Screenshot API key is not configured.' );
    }

    $endpoint = 'https://provider.example/v1/screenshot'; // Replace with provider endpoint.
    $response = wp_remote_post(
        $endpoint,
        array(
            'timeout' => 60,
            'headers' => array(
                'Authorization' => 'Bearer ' . $api_key,
                'Content-Type'  => 'application/json',
                'Accept'        => 'image/png',
            ),
            'body' => wp_json_encode(
                array(
                    'url'    => esc_url_raw( $page_url ),
                    'format' => 'png',
                )
            ),
        )
    );

    if ( is_wp_error( $response ) ) {
        return $response;
    }

    $status       = wp_remote_retrieve_response_code( $response );
    $content_type = wp_remote_retrieve_header( $response, 'content-type' );
    $body         = wp_remote_retrieve_body( $response );

    if ( 200 !== $status ) {
        return new WP_Error(
            'screenshot_http_error',
            'Screenshot provider returned HTTP ' . $status
        );
    }

    if ( false === strpos( (string) $content_type, 'image/' ) || '' === $body ) {
        return new WP_Error( 'unexpected_screenshot_response', 'Provider did not return image data.' );
    }

    return $body;
}

This function returns bytes; it does not save a Media Library attachment or expose a public image URL. If you need a stored WordPress image, use WordPress’s upload APIs after validating the response, choose a safe filename and MIME type, and decide whether the file should be public. If you only need to display a screenshot temporarily, consider whether storing it is necessary at all.

Provider-specific request examples

Use these examples to understand the kinds of differences to expect, not as syntax shared by all services. Confirm current request fields and response behavior in each provider’s documentation before deploying.

Screenshot API: documented GET and POST patterns

The Screenshot API documentation describes GET and POST requests to its own screenshot endpoint; its advanced options are limited to POST in the documented interface. Its parameter table includes PNG, JPEG, WebP, and PDF formats, and it documents a batch endpoint. Authentication, exact endpoint, and response handling must follow that service’s current documentation: Screenshot API documentation. Do not paste those parameters into another provider’s request and assume they will work.

ScreenshotEngine: bearer-authenticated POST pattern

ScreenshotEngine’s quick start demonstrates a POST request to https://api.screenshotengine.com/v1/screenshot using a bearer token and JSON body, including a full-page PNG example. Store the credential in an environment variable as shown in its instructions. This is ScreenshotEngine’s contract, not a WordPress standard or a contract shared with Screenshot API: ScreenshotEngine quick start.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

These provider examples illustrate why a WordPress integration should separate its own input validation and permission checks from provider-specific HTTP code. If you change services, update the endpoint, authentication scheme, payload, supported capture options, and response parsing together.

Security, permissions, and publishing the result

  • Keep credentials off the client. A server-rendered page can still expose a key if you print it into HTML or JavaScript. Keep secrets in server configuration and avoid logging them.
  • Validate the target URL. If a public-facing endpoint accepts a URL from a visitor, constrain allowed hosts or otherwise mitigate server-side request forgery risks. Do not let an unauthenticated caller use your server to request arbitrary internal or sensitive addresses.
  • Apply WordPress permissions. A custom route should use a permission callback appropriate to the content and the caller. Do not treat a valid screenshot provider key as proof that a WordPress user may view protected content.
  • Decide whether captures may be public. A saved image can reveal content even if the original page is access-controlled. Restrict its storage or delivery when necessary, and consider whether cookies or authorization headers sent to the renderer could expose secrets.
  • Escape display output. When inserting a resulting image URL into markup, validate and escape it for the relevant HTML context. If the provider returns bytes, save them through a controlled upload path rather than treating arbitrary response text as an image.

Capture options and response handling

Available settings depend on the provider. Before implementing a feature, check whether that provider documents the specific option and whether it works with the chosen request method. Common differences worth checking include:

  • Output format and whether the response is raw bytes, a URL, or a job identifier.
  • Viewport dimensions, full-page capture, and whether lazy-loaded content is included.
  • Wait conditions, such as a delay, selector, or network-idle state.
  • Authentication headers or cookies needed to reach the page, and how those secrets are protected.
  • Whether batches or asynchronous jobs are available for many URLs.
  • Provider-specific limits, retention behavior, quotas, and current price, which must be checked in that provider’s current documentation or account terms.

Build your response handling around the documented return type. For image bytes, verify status, non-empty body, content type, and—where appropriate—image decodability before saving. For a returned URL, validate the host and expected scheme before embedding it. For an asynchronous job, persist the job identifier and handle completion according to the provider’s documented mechanism. Do not infer reliability, speed, or retention from the existence of a working request example.

Or skip the browser setup

ScreenshotNeo is a screenshot API and MCP server for developers. Its one-request endpoint returns a PNG, JPEG, WebP, or PDF; it can also remove cookie/consent banners, newsletter popups, and chat widgets before capture. Here is a direct request using the documented API shape:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://your-site.example/page -o shot.webp

See the ScreenshotNeo API documentation for authentication and capture options. The same endpoint can be called from Python or Node.js:

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://your-site.example/page"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://your-site.example/page' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

Use the endpoint from server-side code when the access key must remain private. ScreenshotNeo says bot checks, blank pages, and failed loads are not billed, and its response includes page-verdict and billing headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for MCP clients such as Claude and Cursor. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Sign up for the free plan.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting common failures

The request returns 401 or 403

Check that the key is present on the server, has not been revoked, and is sent in the exact authentication format required by that provider. A bearer token is not interchangeable with a query-string key. If the target WordPress page is private, separately confirm that the rendering service can access it using a provider-supported, appropriately scoped method.

The request times out or returns an empty response

Check the target URL from the server’s network, the provider’s documented timeout requirements, and WordPress’s HTTP timeout setting. A slow page, blocked request, or provider-side failure can prevent a usable capture. Handle WP_Error and non-success status codes rather than returning an empty image to the visitor.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The response is JSON instead of an image

The provider may return an error object or a job/result URL rather than image bytes. Inspect status, content type, and the provider’s response schema. Update your handler to parse the documented response instead of saving JSON with an image extension.

Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

The screenshot is missing content or shows a consent banner

Confirm the exact page URL, viewport, wait behavior, and any provider option for full-page capture or delayed content. Cookie banners and client-rendered sections can depend on browser state or timing; check whether the service documents consent handling or a selector-based wait, rather than assuming the page has finished rendering when the initial HTML arrives.

The custom WordPress route exposes content unexpectedly

Review its permission callback and URL validation. Ensure the route does not accept arbitrary destinations or return screenshots of protected pages to callers without authorization. Restrict access and rotate any credential that was accidentally exposed in browser code or logs.

Costs and operational choices

There is no single WordPress screenshot API price or quota: the service sets its own billing, request limits, and supported capture features. Compare providers using the same practical criteria—request methods and output delivery, capture options, authentication, batching, documented limits, and current price. The available provider documentation cited above does not establish a controlled comparison of cost, performance, or reliability, so verify current terms directly before choosing a production dependency.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Also account for your own implementation costs: storage for retained screenshots, WordPress permissions and caching, retries for transient failures, and the operational work of rotating credentials. Cache only when the page’s freshness and privacy requirements permit it; a screenshot of a frequently changing or personalized page may not be safe to reuse.

Frequently Asked Questions

Does the WordPress REST API have a built-in screenshot endpoint?

No. It exposes WordPress resources and custom routes; rendering a page into an image requires a separate renderer or integration.

Can I call a screenshot API directly from WordPress JavaScript?

Only if the provider explicitly supports safe public-client authentication. A private API key should remain in server-side code, not browser-delivered JavaScript.

Can a screenshot API capture a password-protected WordPress page?

Only if the renderer can be authorized to access it through a provider-supported method. Do not expose the page publicly merely to make capture work.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.