ScreenshotNeo

BlogHow-to

How to Generate Website Screenshots in India with ScreenshotOne and Node.js

Use ScreenshotOne’s Node.js SDK to capture a website with an India country setting. Get runnable code, configuration guidance, and fixes for common issues.

By the ScreenshotNeo team4 October 20267 min read

To request a website screenshot using ScreenshotOne’s India location setting, call its API from Node.js with the country code in. The official SDK package is screenshotone-api-sdk. The setting asks the service to render from an India data-center proxy; it does not guarantee every website will return the same content to every visitor in India.

1. Install the SDK and get credentials

Install the official Node.js package:

npm install screenshotone-api-sdk

Create ScreenshotOne credentials and keep both the access key and secret key on your server. Do not put them in browser-side JavaScript or commit them to source control. See the official Node.js SDK examples and the options reference.

2. Capture a page with the India country setting

The API option is ip_country_code=in. This runnable example uses the SDK for the capture and saves the response bytes as a PNG:

import * as fs from "node:fs";
import * as screenshotone from "screenshotone-api-sdk";

const accessKey = process.env.SCREENSHOTONE_ACCESS_KEY;
const secretKey = process.env.SCREENSHOTONE_SECRET_KEY;

if (!accessKey || !secretKey) {
  throw new Error("Set SCREENSHOTONE_ACCESS_KEY and SCREENSHOTONE_SECRET_KEY");
}

const client = new screenshotone.Client(accessKey, secretKey);
const options = screenshotone.TakeOptions
  .url("https://example.com")
  .ipCountryCode("in");

const imageBlob = await client.take(options);
const buffer = Buffer.from(await imageBlob.arrayBuffer());
fs.writeFileSync("india.png", buffer);
console.log("Saved india.png");

Save this as capture.mjs and run it with Node.js. Set the two environment variables in your shell before running node capture.mjs. The country option is documented as ip_country_code; confirm that your installed SDK version exposes the .ipCountryCode("in") builder method. If it does not, use the direct HTTP example below with the documented API parameter.

3. Make a direct API request

ScreenshotOne accepts GET options in the query string and POST options in a JSON body. The returned screenshot is binary data, while API errors are JSON with an error code and message. Always call the API over HTTPS; the vendor warns that plain HTTP can expose credentials and other sensitive request data in transit. See Getting Started.

cURL

curl -G "https://api.screenshotone.com/take" \
  --data-urlencode "access_key=$SCREENSHOTONE_ACCESS_KEY" \
  --data-urlencode "url=https://example.com" \
  --data-urlencode "ip_country_code=in" \
  --output india.png

Python

import os
import requests

response = requests.get(
    "https://api.screenshotone.com/take",
    params={
        "access_key": os.environ["SCREENSHOTONE_ACCESS_KEY"],
        "url": "https://example.com",
        "ip_country_code": "in",
    },
    timeout=90,
)
response.raise_for_status()
with open("india.png", "wb") as image_file:
    image_file.write(response.content)

Node.js fetch

const params = new URLSearchParams({
  access_key: process.env.SCREENSHOTONE_ACCESS_KEY,
  url: "https://example.com",
  ip_country_code: "in",
});

const response = await fetch(`https://api.screenshotone.com/take?${params}`);
if (!response.ok) {
  const error = await response.json();
  throw new Error(`${response.status}: ${error.message ?? JSON.stringify(error)}`);
}
const image = Buffer.from(await response.arrayBuffer());
await import("node:fs/promises").then(({ writeFile }) => writeFile("india.png", image));

For a large request payload, POST JSON instead of putting all options in a URL. ScreenshotOne documents a maximum POST body of 100 MiB; for large HTML or Markdown input, host the content and pass its URL when practical. Avoid logging URLs that contain keys or sensitive query values.

4. Tune location and rendering options

Need Guidance
Country-dependent content Set ip_country_code=in. The documented code for India is in.
Specific language or local time Set the language and time-zone options as well when the page uses those signals. Country alone may not reproduce a visitor’s experience.
Custom proxy A custom proxy overrides ip_country_code. Choose one approach deliberately and check the active proxy configuration.
Dynamic content Use a suitable wait or delay option if the page fills in content after its initial load. Avoid an unnecessarily long delay in bulk jobs.
Full page versus viewport Choose full-page capture when below-the-fold content is needed; otherwise a viewport capture is usually smaller and quicker to transfer.
Image format Select the output format and quality appropriate for the destination. The response content type follows the requested output format; write bytes to a matching file extension.
GET versus POST GET is convenient for compact options. POST JSON is appropriate for larger inputs and avoids unwieldy query strings, subject to the 100 MiB documented limit.

These are data-center proxies, not residential proxies. The vendor says proxy routing is slower than requests without a proxy. Do not treat the country option as a way to bypass a site’s restrictions. Regional results can still vary with language, time zone, cookies, account state, and the site’s own rules.

5. Protect credentials and share captures safely

  • Use HTTPS for all API requests.
  • Keep the secret key server-side. Avoid placing credentials in frontend code, public repositories, logs, or shared URLs.
  • The SDK can generate a request URL, but its default generated URL is unsigned and can expose the API key if shared. Use generateSignedTakeURL() when you need a shareable URL.
  • Treat successful responses as binary image bytes; parse JSON for error responses and report the HTTP status and vendor error message.

6. Troubleshooting

Symptom Likely cause Fix
The SDK says the country builder is missing The installed SDK version may not expose the builder method shown in an example. Check the installed version’s SDK reference. Use a direct request with ip_country_code=in if needed.
The result still looks like another country The target may use language, time zone, cookies, account state, or other signals; a custom proxy may also override the country option. Check proxy configuration and align language and time zone. Verify what the target site uses to select regional content.
The page is blank or incomplete Client-rendered content may not have appeared before capture, or the site may have failed to load. Use an appropriate wait or delay option, then check the target page directly and inspect the API status and JSON error response.
The request times out or is slow Proxy routing adds latency, or the page has slow resources or a long rendering wait. Keep the wait as short as the page permits, reduce unnecessary page work, and retry transient failures with a bounded retry policy.
The saved file is not a valid image An error JSON response may have been written as if it were image bytes. Check HTTP status before saving; on failure, parse and log the documented JSON error shape. On success, use a filename matching the requested format.
Authentication fails A missing, invalid, or exposed key may be used, or credentials may have been copied incorrectly. Read credentials from server environment variables, confirm the active account keys, and avoid sharing unsigned generated URLs.
POST is rejected The JSON body may exceed the documented 100 MiB maximum or be malformed. Validate JSON and reduce the body. Host large HTML or Markdown input and pass a URL instead.

7. Performance, reliability, and cost

India proxy routing can take longer than a request without a proxy. Capture only the required area, avoid excessive waits, and reuse a completed image where your application’s freshness requirements allow. For production workloads, use explicit timeouts, bounded retries for transient network or server errors, and a limit on concurrent requests. Do not blindly retry authentication or invalid-option errors.

ScreenshotOne’s product page advertised 100 free screenshots per month when accessed for this research, and its pricing page displayed Basic at $17/month for 2,000 screenshots and Growth at $79/month for 10,000 screenshots on October 3, 2026. These are dated vendor figures, so check the current pricing page before budgeting. No independent performance benchmark is available in the research for this guide.

8. Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server from Yorker Media. A single GET request returns an image or PDF; see the API documentation.

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

ScreenshotNeo accepts cookie banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks, blank pages, failed loads, timeouts, and cache hits cost nothing, and response headers report the page verdict and billing status. Its MCP server lets Claude, Cursor, and other MCP clients 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 screenshots. Create a free ScreenshotNeo account.

FAQ

Does ip_country_code=in guarantee an Indian visitor’s exact result?

No. It requests the India country location option, but websites can also vary content based on language, time zone, cookies, account state, and other signals.

Is the India option a residential proxy?

No. The documentation describes data-center proxies and notes that proxy routing is slower than a request without a proxy.

Can I expose a generated screenshot URL to a user?

Use the SDK’s signed URL method for shareable URLs. Its default generated URL is unsigned and can reveal the API key.

Should I use GET or POST?

Use GET for compact option sets and POST JSON for larger input. Keep POST bodies within the documented 100 MiB maximum.