How Indian Bloggers Can Automate Website Thumbnail Images with Screenshotlayer
Generate website thumbnails from URLs with Screenshotlayer’s API. Learn how to automate captures, protect your key, handle errors, and manage refreshes.
Indian bloggers can automate website thumbnails by connecting Screenshotlayer’s screenshot API to a script or publishing workflow. Send the API an access key, a fully qualified target URL, and a width in pixels; save the returned image and attach it to the relevant post or directory entry. The API can generate a thumbnail at a chosen width, according to Screenshotlayer’s API documentation and FAQ.
This guide shows the request pattern and the decisions around rendering, caching, credentials, errors, and cost. The reviewed sources establish an API workflow, not a ready-made WordPress plugin or tested CMS connector. You will need to connect the API call to your own script or publishing process.
1. How the thumbnail workflow works
- Create a Screenshotlayer account and retrieve its API access key.
- From a server-side script or publishing job, request a capture with
access_key, a complete targeturlincludinghttps://orhttp://, and the desiredwidth. - Choose a viewport and image format. The documentation gives a default viewport of 1440×900 and PNG as the default format.
- If the site needs more time to render, set a documented
delay. - Save or export the resulting capture, then associate it with your post or content record.
- Choose a cache and refresh policy so repeated publishing steps do not make unnecessary requests.
The API documentation also lists css_url, user_agent, and accept_lang parameters for adjusting capture behavior. Their effect on a particular website depends on that website and was not independently tested for this guide.
2. Get a thumbnail at a custom width
Use the width parameter for the output thumbnail width in pixels. The page rendering area is a separate concern: viewport sets the dimensions used to render the target page, while width requests the thumbnail width. The official FAQ confirms that width can generate a thumbnail at a custom pixel width.
Pick the width based on the slot in your blog theme. If the site crops images to a fixed aspect ratio, account for that in your publishing pipeline or choose a capture viewport that produces a useful composition. The reviewed documentation supports choosing width and viewport; it does not promise a specific crop behavior for every destination theme.
3. Complete request examples
Keep the access key on a server or in a protected environment variable. Do not put it in browser JavaScript, a public page, or a repository. Replace the example target and key with your values. The examples show the request shape; check Screenshotlayer’s current documentation for the exact response handling and parameter syntax supported by your account.
cURL
curl -G "https://api.screenshotlayer.com/api/capture" \
--data-urlencode "access_key=YOUR_ACCESS_KEY" \
--data-urlencode "url=https://example.com" \
--data-urlencode "width=640" \
--data-urlencode "viewport=1440x900" \
--data-urlencode "format=jpg" \
-o thumbnail.jpg
Use the capture endpoint and parameter names specified in the current Screenshotlayer API documentation for your account. The documentation requires an access key and fully qualified target URL; the FAQ identifies width as the thumbnail control. If your account’s documented endpoint differs from the illustrative endpoint above, use the official endpoint shown in your account documentation.
Python
import os
import requests
API_URL = "https://api.screenshotlayer.com/api/capture"
params = {
"access_key": os.environ["SCREENSHOTLAYER_ACCESS_KEY"],
"url": "https://example.com",
"width": 640,
"viewport": "1440x900",
"format": "jpg",
}
response = requests.get(API_URL, params=params, timeout=90)
response.raise_for_status()
content_type = response.headers.get("Content-Type", "")
if not content_type.startswith("image/"):
raise RuntimeError(f"Expected an image response, received {content_type!r}")
with open("thumbnail.jpg", "wb") as image_file:
image_file.write(response.content)
Install the dependency with python -m pip install requests. Set SCREENSHOTLAYER_ACCESS_KEY in the job environment before running the script. The content-type check helps avoid saving an API error response as though it were an image.
Node.js
const apiUrl = new URL("https://api.screenshotlayer.com/api/capture");
apiUrl.search = new URLSearchParams({
access_key: process.env.SCREENSHOTLAYER_ACCESS_KEY,
url: "https://example.com",
width: "640",
viewport: "1440x900",
format: "jpg",
});
const response = await fetch(apiUrl);
if (!response.ok) {
throw new Error(`Screenshotlayer request failed: HTTP ${response.status}`);
}
const contentType = response.headers.get("content-type") || "";
if (!contentType.startsWith("image/")) {
throw new Error(`Expected an image response, received ${contentType}`);
}
const image = Buffer.from(await response.arrayBuffer());
await import("node:fs/promises").then(({ writeFile }) => writeFile("thumbnail.jpg", image));
Run this in a Node.js version with built-in fetch, and set SCREENSHOTLAYER_ACCESS_KEY in the environment. For production code, set a request timeout using your runtime’s supported abort mechanism and handle non-image API responses according to the current API documentation.
4. Choose rendering, cache, and refresh options
| Control | What it is for | Practical choice |
|---|---|---|
width |
Requests a thumbnail at a chosen pixel width. | Match the largest display width you need, then resize locally if you need smaller variants. |
viewport |
Sets page rendering dimensions; the documentation lists 1440×900 as the default. | Use a viewport close to the layout you want represented, especially if the target page is responsive. |
format |
Selects an output image format; PNG is documented as the default. | Choose an output your publishing stack accepts. Confirm current supported values in the API docs. |
delay |
Waits before capture when a page needs extra rendering time. | Start with no added delay, then add only enough for the target’s visible content to render. |
css_url |
Supplies CSS for the capture according to the API docs. | Use only when you control or have a suitable stylesheet for the capture. |
user_agent |
Customizes the capture user agent. | Use when a documented, legitimate rendering need calls for it. |
accept_lang |
Sets the accepted language for the capture. | Set it when the target chooses localized content based on request language. |
ttl |
Sets how long a snapshot is cached; the documented default is 2,592,000 seconds (30 days). | Choose a shorter TTL when target pages change often and a longer one for stable pages. |
force |
Requests a fresh capture instead of using the cached snapshot. | Use it for an intentional refresh, not on every routine page view. |
The documented default cache TTL is 30 days, and the FAQ says a custom TTL can be set below that default. Decide what freshness means for your use case: an external-site directory might tolerate a month-old thumbnail, while a frequently updated link preview may need a shorter interval. A forced refresh is useful when you know the source page changed, but unnecessary refreshes consume request allowance.
5. Connect captures to a blog publishing workflow
A simple integration can run when an editor submits a URL, when a post enters a publishing queue, or as a scheduled job. Store the source URL, capture status, image location, last successful capture time, and next refresh time alongside the post record. If the image is returned as a URL, retrieve or reference it according to the API’s current response format. Screenshotlayer also documents optional export to S3 or FTP; neither destination is required for every blogger.
- Validate the submitted URL and require an explicit protocol.
- Enqueue capture work instead of holding an editor’s save request open for a slow target.
- Set a per-job timeout and record the API status and error details needed to diagnose failures.
- Keep the previous successful thumbnail if a refresh fails, rather than replacing it with an error page or empty file.
- Deduplicate requests for the same URL and refresh only according to your chosen policy.
- Before making captures public or redistributing them, review the current Screenshotlayer terms and the rights relevant to the target content.
The terms place responsibility for keeping credentials secure and handling returned errors on the account holder. They also restrict transferring, redistributing, or exploiting API data and services beyond the licensed scope. Review the current terms before building a public thumbnail service.
6. Cost, quotas, and reliability
Screenshotlayer’s pricing page checked in 2026 listed a Free plan with 100 monthly snapshots, Basic at USD 19.99 per month for 10,000 requests, Professional at USD 59.99 per month for 30,000, and Enterprise at USD 149.99 per month for 75,000. Its FAQ describes the Free tier as non-commercial and paid plans as offering commercial-use options. It also says overage fees apply after plan limits and describes notifications at 75%, 90%, and 100% of the monthly allowance. These are vendor plan details that can change; verify the current pricing and FAQ before choosing a plan.
Those listed prices are in USD. The reviewed FAQ does not establish acceptance of Indian-issued cards, INR billing, tax treatment, or availability by country, so do not assume any of those details. Check the live signup and billing terms for your account.
The FAQ reports around 99.9% uptime as a vendor claim and says public uptime statistics are not offered. Treat that figure as an unverified vendor statement, not an independent reliability measurement. For your own workflow, preserve prior successful images, retry transient failures with bounded backoff, and alert before reaching the request limit.
Screenshotlayer explains that a dedicated worker processes one screenshot at a time, and ten workers enable ten concurrent captures. This is the vendor’s description, not an independent performance benchmark. If you have a batch, queue it and control concurrency based on your plan and observed response behavior rather than launching unlimited simultaneous requests.
7. Common errors and fixes
| Symptom | Likely cause | What to do |
|---|---|---|
| Authentication error | The key is missing, misspelled, inactive, or exposed and rotated. | Read the key from a server-side secret, confirm the request parameter name in current docs, and rotate a key that was published. |
| Invalid or unreachable URL | The URL lacks https:// or http://, contains a typo, or cannot be reached by the capture service. |
Validate the full URL and try a public page that does not require a login. |
| Saved file is an error message | The script wrote an API error response to an image filename. | Check HTTP status and content type before saving; log the response body safely without exposing the access key. |
| Thumbnail looks incomplete | The target page loads important content after the initial render. | Try a documented delay and check whether the desired content is available at the chosen viewport. |
| Thumbnail composition differs from the page | The target uses responsive layouts that change with viewport size. | Adjust viewport and inspect the resulting image before setting a default for that class of sites. |
| Old capture keeps appearing | The snapshot is still within its cache TTL. | Shorten the TTL for that workflow or use the documented force option for an intentional refresh. |
| Requests fail after quota is used | The monthly allowance has been reached, or overage behavior applies. | Check usage and plan terms, reduce duplicate captures, and alert before the limit. |
| Too many jobs wait in the queue | Capture volume exceeds available processing concurrency. | Use a bounded worker pool, stagger refreshes, and account for the vendor’s worker concurrency model. |
8. Security, image rights, and operating checklist
- Keep the access key in server-side configuration or a secret manager; never embed it in public HTML or client-side code.
- Redact credentials from application logs and error reports.
- Use HTTPS for your API request and validate that input URLs use an allowed protocol.
- Check the current terms and any rights that apply before publicly redistributing screenshots of third-party pages.
- Track request use, errors, last successful capture, and refresh time.
- Retain the previous image until a replacement capture succeeds.
- Review current plan limits, overage charges, commercial-use rights, and billing details before launch.
9. Or skip the browser setup
If you want a one-call screenshot API with image or PDF output, ScreenshotNeo is another option. Its API accepts a URL and can return PNG, JPEG, WebP, or PDF. See the ScreenshotNeo API docs.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://example.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://example.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
- Cookie banners and consent prompts, newsletter popups, and chat widgets are handled before capture; each of those steps can be turned off.
- Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed; responses identify the page verdict and billing status in headers.
- An MCP server provides
take_screenshot,get_page_info, andcapture_pdftools for Claude, Cursor, and other MCP clients. - The free plan includes 1,000 screenshots a month with no card. Paid plans start at $5 for 3,000; every feature is on every plan.
Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.
10. FAQ
How can I automatically generate a thumbnail image from a website URL?
Call the screenshot API from a server-side script with your access key, a complete URL, and a width value, then save or export the returned capture and link it to your post workflow.
Can Screenshotlayer create a website screenshot thumbnail at a custom width?
Yes. Screenshotlayer’s FAQ says its width parameter generates a thumbnail at a custom pixel width. Use viewport separately to control page rendering dimensions.
Is there a ready-made WordPress plugin?
The sources reviewed do not establish a ready-made plugin or turnkey CMS connection. Treat it as an API integration that you connect to a script or publishing workflow.
Will an Indian card work, and will I be billed in rupees?
The reviewed official FAQ does not confirm Indian-issued card acceptance, INR billing, taxes, or country availability. Verify the current signup and billing details directly before relying on them.
How often should thumbnails refresh?
Set the TTL based on how often the target page changes and how current the preview must be. Use a forced refresh for a known change rather than on every view.
Can I use the captures commercially?
Screenshotlayer describes its free plan as non-commercial and paid plans as having commercial-use options. Confirm the current plan and terms for your specific use before publishing captures.


