Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
WordPress does not include a built-in route that renders a webpage as an image. Its REST API exposes site data as JSON; to capture a WordPress page, call a separate screenshot service from server-side code, or use a plugin that connects to one. This guide shows how to find your WordPress API routes, make a provider-specific screenshot request safely, handle the response, and choose an integration.
WordPress REST API vs. a screenshot API
The WordPress REST API is an interface for applications to exchange site data as JSON, not a screenshot renderer. WordPress describes it as a way for applications to interact with a site by sending and receiving JSON objects (WordPress REST API Handbook). A screenshot API is a separate service that loads a URL in a browser-like rendering environment and returns an image or, where supported, a PDF.
That distinction matters when choosing a URL. A WordPress route such as /wp-json/wp/v2/posts returns structured data; a screenshot service should instead receive the page URL you want rendered, such as https://example.com/article/. The screenshot provider’s endpoint, authentication, request format, options, and response behavior are its own contract—not WordPress conventions.
Recommended Free Tools
Find your site’s WordPress API routes
Every WordPress installation has its own REST API root; there is no single global site API root. Open https://your-site.example/wp-json/ (replace the host with your site) to inspect its API index and discover registered routes. WordPress documents this route discovery and API index in its REST API discovery guide. You can also use the HTTP OPTIONS method to ask about the methods and schema available for a particular endpoint (REST API reference).
#1 Best Overall
The index is useful when building a WordPress integration or checking whether a plugin has registered a custom endpoint. It is not the URL to send a screenshot request to: that request goes to the screenshot provider’s endpoint.
Choose an integration path
Call a screenshot API from server-side WordPress code
This is the flexible option when you need to control when captures happen, pass capture settings, or process the returned file. Use PHP running on your server (for example, in a plugin or a carefully implemented custom integration) to call the screenshot provider. Do not put a secret API key in page HTML or browser JavaScript: visitors can inspect client-delivered code and extract it.
Use a plugin or shortcode
A plugin can provide a WordPress-facing interface such as a shortcode and make the provider request for you. For example, the Urlbox WordPress Screenshots repository describes a shortcode-based integration using Urlbox. The repository establishes that this integration example exists; it does not by itself establish current maintenance, compatibility with your WordPress version, or support status. Check those details in the repository and plugin documentation before installing it, and review what credentials and page content it handles.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Build a custom WordPress REST endpoint only when needed
If another application needs to request a capture through your own site’s API, you can create a custom WordPress REST route that calls the external screenshot service server-side. Follow WordPress route and endpoint conventions, and enforce permissions on the custom route. Do not expose protected content simply because a screenshot service needs to load it: WordPress’s public routes and restricted content have different access rules (WordPress REST API authentication).
Quick start: make a server-side request
The exact code depends on the provider. The examples below use Screenshot API’s documented request pattern; they are not universal syntax. Its documentation describes GET and POST request patterns, with advanced options limited to POST, and a bearer API key for authenticated requests (Screenshot API documentation). Verify the current endpoint, parameters, and response format there before adapting the code. Store credentials in an environment variable or another server-only secret store.
PHP example for WordPress
This example makes the request from PHP using WordPress’s HTTP API. Set SCREENSHOT_API_KEY in the server environment and replace the endpoint or request fields with the provider’s current documented values. The example assumes the provider returns image bytes in the response body; confirm that behavior for the endpoint and format you select.
<?php
$api_key = getenv( 'SCREENSHOT_API_KEY' );
if ( ! $api_key ) {
return new WP_Error( 'missing_screenshot_key', 'Screenshot API key is not configured.' );
}
$target_url = 'https://your-site.example/article/';
$response = wp_remote_post(
'https://shot.screenshotapi.net/screenshot',
array(
'timeout' => 90,
'headers' => array(
'Authorization' => 'Bearer ' . $api_key,
'Content-Type' => 'application/json',
),
'body' => wp_json_encode( array(
'url' => $target_url,
'output' => 'image',
'file_type' => 'png',
) ),
)
);
if ( is_wp_error( $response ) ) {
return $response;
}
$status = wp_remote_retrieve_response_code( $response );
$body = wp_remote_retrieve_body( $response );
if ( $status < 200 || $status >= 300 || '' === $body ) {
return new WP_Error( 'screenshot_failed', 'Screenshot provider returned an unsuccessful or empty response.' );
}
// Save or process $body only after confirming the provider returned image bytes.
return $body;
Do not copy the illustrative host, route, or fields to another provider. Screenshot API documents provider-specific request examples and output options; consult its current docs for the precise endpoint and response behavior. A different provider may return a URL or a job identifier instead of image bytes, requiring a separate retrieval step.
Screenshot API request shape
Screenshot API’s documentation also describes a JSON POST body with a target URL and output options, bearer-token authentication, a GET form, and a batch endpoint. Its documented format options include PNG, JPEG, WebP, and PDF. Advanced capture settings may require POST rather than GET. These are details of that provider’s API and should not be assumed for other services.
Handle the response and protect the result
A successful HTTP status does not always prove the response is a valid image. Before saving or displaying a capture, check the status code, response headers, and body; where appropriate, validate the file type and size. If the provider returns a hosted file URL rather than bytes, follow its documented retrieval and expiration rules.
- Save captures to a controlled location, such as WordPress uploads or private object storage, according to your intended audience and retention needs.
- Do not put API credentials into a shortcode attribute, post content, public JavaScript, or a publicly readable configuration file.
- Decide whether the target page is public. A screenshot service generally fetches a URL externally; a page behind a WordPress login may not be reachable without provider-supported authentication. Do not pass sensitive credentials or expose private page content without reviewing the provider’s handling and your access controls.
- Escape any returned URL before inserting it into HTML, and use an allowlist or validation if users can choose the target URL.
- For repeated captures, consider storing results and refreshing them on a deliberate schedule rather than making a new external request for every page view.
Options to check before choosing a provider
Compare providers on concrete implementation needs rather than assuming screenshot APIs share a common contract. The available documentation supports these distinctions, but it does not establish a controlled comparison of providers, current comparable pricing, or service reliability.
| Decision | What to verify |
|---|---|
| HTTP method | Whether the provider supports GET, POST, or both, and whether advanced settings require POST. |
| Authentication | How the credential is sent and whether the provider recommends server-side secret storage. |
| Output delivery | Whether the response contains image bytes, a file URL, or an asynchronous job result; confirm the format and retrieval steps in the provider’s documentation. |
| Capture controls | Supported output formats, viewport or full-page behavior, and any other specific options you need. |
| WordPress fit | Whether you need a shortcode/plugin interface, a custom server-side integration, or a custom REST route with permissions. |
| Operational terms | Current price, quota, retention, supported rendering environment, and service reliability. These vary and should be checked directly with the provider; the cited material does not establish comparable values. |
Troubleshooting common failures
The WordPress route returns 404
Confirm the site’s API root is the correct domain and that the route appears in /wp-json/. If it is a custom route, check that the plugin or code registering it is active and that the route path and HTTP method match. WordPress route discovery can help identify available endpoints.
The screenshot call returns an authentication error
Check that the key is present in the server environment, that it is active, and that you are using the authentication scheme specified by that provider. The Screenshot API example uses a bearer token, but another provider may use a different method. Avoid troubleshooting by placing the secret in browser code.
Rank #4
The API response is not an image
Inspect the response status, content type, and body without logging secrets. The provider may have returned a JSON error, a URL, or an asynchronous job response rather than image bytes. Follow the selected endpoint’s documented response flow before attempting to save the body as an image.
The capture is blank or cannot load the page
Check that the target URL is reachable from outside your WordPress server, uses the intended canonical page address, and does not require an interactive login or a browser-only session. If the page is private, review whether the provider supports an appropriate authenticated capture flow. Do not weaken WordPress permissions just to make a capture succeed.
The request times out
Check the PHP and WordPress HTTP timeout settings as well as the provider’s documented limits. A long-running capture may need an asynchronous workflow if the provider supports one. Avoid starting repeated synchronous captures during ordinary page rendering; queue or cache work where that fits the use case.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteOr skip the browser setup
ScreenshotNeo is a screenshot API and MCP server for developers. It accepts a URL in one GET request and returns an image or PDF. Cookie banners are accepted and removed, along with 60+ known consent platforms, newsletter popups, and chat widgets; each of those steps can be turned off. Only clean shots are billed: bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, with the result indicated in X-Page-Verdict and X-Billed headers. Its MCP server offers take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots.
Use the API key from your ScreenshotNeo account and adapt the target URL as needed. See the ScreenshotNeo API documentation.
Best Value
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://your-site.example/article/ -o shot.webp
For WordPress, keep this call in server-side PHP or a protected job rather than publishing the access key in page source. Sign up for 1,000 free screenshots a month with no card.
Frequently Asked Questions
Does WordPress include a screenshot API endpoint?
No. The WordPress REST API exposes site data and registered routes; webpage rendering into an image is provided separately.
Can I call a screenshot API from frontend JavaScript?
Only if the provider explicitly offers a safe public-key mechanism. Otherwise make the request server-side so the secret credential is not exposed.
Can a screenshot API capture a password-protected WordPress page?
Only if the provider and your integration support a suitable authenticated capture method; a public fetch cannot ordinarily access login-restricted content.
Quick Recap
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.

