How to use ScreenshotMachine to create website thumbnails for an Indian blog
Create website thumbnails for an Indian blog with ScreenshotMachine: configure a screenshot request, embed or save the image, and troubleshoot common errors.
To create a website thumbnail for an Indian blog with ScreenshotMachine, send an HTTP GET request to its screenshot API with your customer key, the page URL, and the thumbnail dimensions. For a standard preview, start with 320 × 240 pixels, then embed the returned image URL in your post or download the image and host it with your blog assets. The right dimensions depend on your blog theme’s image slot; the reviewed documentation does not specify an India-only setting.
1. Get an API key and protect it
Create a ScreenshotMachine account and retrieve the customer key from your user profile. The service documents its API as an HTTP GET endpoint at https://api.screenshotmachine.com/. A request needs the key and target URL. See the ScreenshotMachine API documentation.
Do not publish an unrestricted customer key in HTML or client-side JavaScript. For public calls, ScreenshotMachine’s sample recommends using a secret phrase. Its documentation describes a hash derived from the requested URL and secret phrase, and says requests without a correct hash are ignored after a secret phrase is configured. Follow its current instructions for generating the hash; never copy a real key or secret into a public page.
2. Choose the thumbnail framing
Pick dimensions to fit the image slot in your blog theme. ScreenshotMachine’s docs use 320x240 as an example website-thumbnail size. This is a 4:3 image, but your theme may use a different ratio or crop.
- Width: documented range is 100–1920 pixels.
- Height: documented range is 100–9999 pixels, or
fullfor a full-page capture. - Device: choose desktop, phone, or tablet framing according to the preview you want readers to see.
- Format: choose JPG, PNG, or GIF as supported by the API. Match the format to the image and your blog’s needs.
A fixed-size thumbnail is usually easier to place in a post card than a full-page capture. Check the result in the actual theme: a correct API size can still be cropped by the blog’s CSS.
3. Build a screenshot request
Percent-encode the target page URL when constructing the query string. These examples use placeholders; replace them with your customer key and the page you want to capture. The API options and ranges below come from ScreenshotMachine’s documentation.
cURL
curl -G 'https://api.screenshotmachine.com/' \
--data-urlencode 'key=YOUR_CUSTOMER_KEY' \
--data-urlencode 'url=https://example.com/article' \
--data-urlencode 'dimension=320x240' \
--data-urlencode 'format=png' \
--output thumbnail.png
This saves the response body to thumbnail.png. If your account has a secret phrase configured, add the correctly generated hash according to the current vendor instructions. Keep the secret phrase private.
Python
from pathlib import Path
import requests
response = requests.get(
"https://api.screenshotmachine.com/",
params={
"key": "YOUR_CUSTOMER_KEY",
"url": "https://example.com/article",
"dimension": "320x240",
"format": "png",
},
timeout=90,
)
response.raise_for_status()
Path("thumbnail.png").write_bytes(response.content)
print("Saved thumbnail.png")
print("ScreenshotMachine response:", response.headers.get("X-Screenshotmachine-Response"))
Install the dependency with python -m pip install requests. In a public application, make this request from a server-side route so credentials are not exposed to visitors.
Node.js
import { writeFile } from "node:fs/promises";
const params = new URLSearchParams({
key: "YOUR_CUSTOMER_KEY",
url: "https://example.com/article",
dimension: "320x240",
format: "png",
});
const response = await fetch(`https://api.screenshotmachine.com/?${params}`);
if (!response.ok) {
throw new Error(`Screenshot request failed: HTTP ${response.status}`);
}
const image = Buffer.from(await response.arrayBuffer());
await writeFile("thumbnail.png", image);
console.log("Saved thumbnail.png");
console.log("ScreenshotMachine response:", response.headers.get("X-Screenshotmachine-Response"));
Run with a Node.js version that supports the built-in fetch. As with Python, keep credentials on the server. The error response may be returned as an image, so a successful HTTP status alone may not prove that the capture succeeded; inspect the vendor response header and verify the saved file.
4. Embed the image or store it with your blog
The vendor’s Python example demonstrates both using the generated screenshot URL in an <img> element and saving the image as a file. For a quick embed, use the URL returned by the vendor’s request builder, with the required credentials and options handled safely:
<img src="YOUR_GENERATED_SCREENSHOT_URL" alt="Preview of the example.com article" width="320" height="240">
For a production blog, a server-side job can request the screenshot, validate that it is an image, and save it to your media storage before rendering the post. This avoids exposing credentials in page source and gives you control over how long the image remains available. Use descriptive alternative text that explains the preview; do not use the target page’s title as alt text if the image is merely decorative or repeats nearby text.
5. Tune capture timing, cache, and zoom
| Option | How to use it | When it helps |
|---|---|---|
delay |
Choose a documented delay from immediate capture through 10 seconds. | Allow a page to finish loading or animations to settle. The vendor suggests a longer delay for long pages with images or animations. |
cacheLimit |
Use a value from 0 to 14 days; fractional-day intervals are documented. Set cacheLimit=0 to request a fresh capture. |
Use a fresh render when the page changed and accept cached results when it did not. The default cache limit is 14 days. |
zoom |
Documented range is 10–400. | Adjust framing when appropriate. The docs note that zoom is ignored for screenshots smaller than typical device dimensions. |
Cached repeats are not billed according to ScreenshotMachine’s pricing FAQ. The vendor’s pricing page observed on 2026-10-03 listed 100 fresh screenshots per month on its free Starter plan, then Basic at €9/month for 2,500, Pro at €59/month for 20,000, and Enterprise at €99/month for 50,000. Those are vendor-published figures observed on that date, not a guarantee of current availability or pricing. Verify the current pricing before choosing a plan. The pricing page also describes additional screenshot charges and says they are grouped in increments of 1,000; check current terms for the billing details that apply to your account.
6. India-specific publishing checks
The reviewed ScreenshotMachine API docs do not describe an India-specific capture workflow or special thumbnail dimensions. For an Indian blog, use the same practical checks as for any publication:
- Match the screenshot dimensions and crop to your theme’s actual card or article image slot.
- Check legibility at the size readers will see, including on phone layouts.
- Confirm the captured page is the intended version and that the screenshot is current enough for the post.
- Review rights to third-party page content, images, and logos before republishing a capture. ScreenshotMachine’s terms discuss permitted uses of screenshots, but do not establish rights to every captured third-party asset. The terms page in the dossier says it was last updated July 22, 2020, so review the current terms.
- Check applicable taxes and payment treatment for your account. The reviewed pricing material mentions EU VAT but does not verify India-specific billing treatment.
7. Troubleshooting
| Symptom | Likely cause | What to check |
|---|---|---|
| Invalid key | The customer key is wrong, incomplete, or no longer valid. | Copy the key from the account profile and ensure the request parameter is named key. |
| Invalid URL or missing URL | The target URL is absent, malformed, or not encoded correctly. | Include the full page URL in the url parameter. Use a query encoder such as cURL’s --data-urlencode, Python’s params, or URLSearchParams. |
| No credits | The account has exhausted its available fresh captures or needs a plan change. | Check current account usage and plan limits before retrying. Repeated fresh requests may continue to fail until quota is available. |
| Invalid selector | A selector supplied for a selector-based option is malformed or does not match what the service expects. | Review the selector syntax and the relevant API option in the vendor docs; test against the target page. |
| Blank, partial, or unready page | The page loads content asynchronously, or images and animations need more time. | Try a longer documented delay, up to 10 seconds, and confirm the target page loads normally. |
| Unexpected old screenshot | A cached result may be returned. | Set cacheLimit=0 when you need a fresh capture, then consider restoring caching for repeated unchanged pages. |
| Downloaded file is an error image | The service may communicate API errors through the returned image. | Inspect X-Screenshotmachine-Response, validate the response, and do not assume every image response is the requested page. |
| Key appears in page source | The API request was made directly from public browser code. | Move the request to a server-side endpoint and follow the vendor’s secret phrase/hash instructions for public calls. |
8. Reliability, performance, and cost
Capture time depends on the target page and the chosen delay; the dossier contains no independent performance benchmark for ScreenshotMachine. Use a request timeout in your application, handle non-success responses, inspect the vendor response header, and verify image content before publishing it. If a page’s screenshot does not need to update on every visit, generate it when the blog post is created or updated and reuse the stored image. This also avoids unnecessary duplicate calls.
For freshness, set cacheLimit=0; for repeat views of unchanged pages, the documented default cache period is 14 days, and the vendor says cached repeats are not billed. Track the number of distinct fresh captures your publishing workflow needs and compare that with the live plan allowance. The listed 2026 prices above are vendor statements, not independent cost or reliability measurements.
Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server from Yorker Media. One GET request can return PNG, JPEG, WebP, or PDF. Cookie banners are accepted or removed before capture, and more than 60 known consent platforms, newsletter popups, and chat widgets can be removed; each step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing, with the result reported in X-Page-Verdict and X-Billed headers. An MCP server lets AI agents use take_screenshot, get_page_info, and capture_pdf. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. 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}`);
Sign up free for 1,000 screenshots a month with no card.
FAQ
Is 320 × 240 the required size for an Indian blog?
No. It is the example thumbnail size in the API docs. Use the dimensions and crop that fit your blog theme.
Can I capture a full web page instead of a thumbnail?
Yes. The documented height option accepts full, though a full-page image serves a different purpose than a compact blog thumbnail.
Does ScreenshotMachine grant rights to republish every captured page?
No such blanket permission is established by the cited material. Review the current terms and the rights attached to the page’s own content and assets.
Does ScreenshotMachine have India-specific taxes or settings?
The reviewed documentation does not establish an India-specific capture setup or billing treatment. Check the current vendor account and pricing information for regional details.


