ScreenshotNeo

BlogHow-to

How to Capture Indian-Language Websites with ScreenshotAPI

Set a language preference, then verify fonts, shaping, and the rendered image. This guide covers ScreenshotAPI code, troubleshooting, and an alternative capture workflow.

By the ScreenshotNeo team4 October 20268 min read

To capture a localized Indian-language page with ScreenshotAPI, send the page URL with an accept_languages preference for the language you want, wait long enough for the page and its fonts to load, and inspect the resulting image. The header asks the site for a language; it does not translate content, guarantee that the site honors the request, or ensure that a font can render the selected script. Treat language selection, font availability, and visual verification as three separate checks.

ScreenshotAPI documents a GET rendering endpoint and the accept_languages option. Its documented default is en-US,en;q=0.8; set an appropriate language tag and fallback for your target instead. See the rendering documentation, browser and request emulation guide, and custom CSS help.

1. Identify how the target page chooses its language

Before changing the request, determine how the particular site selects localized content. Language can depend on the URL path or query, cookies, account settings, geolocation, or the Accept-Language request header. A URL already containing a language path may be more reliable than a header if the site uses path-based localization.

  1. Open the exact URL you plan to capture and note the language-selection mechanism if known.
  2. Choose a valid language tag for the requested language and a fallback preference. The format supports weighted preferences; ScreenshotAPI’s docs illustrate values such as fr-FR,fr;q=0.9 and es-ES,es;q=0.8. Use the same pattern for the language the target supports rather than assuming a region tag will be honored.
  3. If the site requires a cookie, login state, or a language-specific URL, supply that state or use that URL too. accept_languages alone cannot replace it.

India has many scripts and language variants. Do not treat “Indian language” as one font or one rendering case: test the specific script and pages your application needs.

2. Make the ScreenshotAPI request

The documented ScreenshotAPI endpoint is https://shot.screenshotapi.net/v3/screenshot, authenticated with a token and given the target url. Include accept_languages and choose raw image output if you want the image response. ScreenshotAPI documents output=image; its rendering options also include wait behavior. Confirm the current option names and defaults in the official endpoint documentation.

cURL

curl --get 'https://shot.screenshotapi.net/v3/screenshot' \
  --data-urlencode 'token=YOUR_SCREENSHOTAPI_TOKEN' \
  --data-urlencode 'url=https://example.com/your-language-page' \
  --data-urlencode 'accept_languages=hi-IN,hi;q=0.9,en;q=0.8' \
  --data-urlencode 'output=image' \
  --output capture.png

Replace the sample language preference with a tag supported by the target site. The example uses Hindi as an illustration; it is not a claim that every site recognizes that particular locale tag.

Python

import requests

endpoint = "https://shot.screenshotapi.net/v3/screenshot"
params = {
    "token": "YOUR_SCREENSHOTAPI_TOKEN",
    "url": "https://example.com/your-language-page",
    "accept_languages": "hi-IN,hi;q=0.9,en;q=0.8",
    "output": "image",
}

response = requests.get(endpoint, params=params, timeout=90)
response.raise_for_status()

content_type = response.headers.get("Content-Type", "")
if "image" not in content_type:
    raise RuntimeError(
        f"Expected an image response, received {content_type!r}: "
        f"{response.text[:500]}"
    )

with open("capture.png", "wb") as image_file:
    image_file.write(response.content)

Node.js

const endpoint = new URL("https://shot.screenshotapi.net/v3/screenshot");
endpoint.search = new URLSearchParams({
  token: "YOUR_SCREENSHOTAPI_TOKEN",
  url: "https://example.com/your-language-page",
  accept_languages: "hi-IN,hi;q=0.9,en;q=0.8",
  output: "image",
});

const response = await fetch(endpoint);
if (!response.ok) {
  throw new Error(`ScreenshotAPI returned HTTP ${response.status}`);
}

const contentType = response.headers.get("content-type") ?? "";
if (!contentType.includes("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("capture.png", image)
);

Keep the token on a server or in a secret store in production; do not expose it in browser-side code or public repositories. Use a URL-building library or URL-encode query values, especially the target URL and any CSS string, so punctuation is not mistaken for API parameters.

3. Check the returned image, not just the request

A successful HTTP response proves that an API response was returned; it does not prove that the site displayed the intended language or that every glyph rendered correctly. Open the image and check a representative heading, body paragraph, punctuation, and any mixed-script content.

  • Wrong language, but glyphs look normal: check the page URL, cookies, account preferences, and whether the target honors Accept-Language.
  • Empty boxes or replacement glyphs: investigate whether the page’s selected font includes the target script and whether its font files loaded.
  • Characters appear but joins or marks look wrong: inspect shaping, line breaks, and the page’s text layout and font stack; a language header does not configure these.
  • Text is clipped or wraps differently: compare the page at the intended viewport and allow enough time for content and fonts to finish loading.

MeitY’s localization guideline treats fonts, formats, and text layout technologies as relevant parts of localization. The MeitY localization guideline is useful background when investigating script display problems.

4. Diagnose font and timing problems

If the language is correct but the text is not, check the target’s own font stack and whether its font resources load successfully. ScreenshotAPI Help documents custom CSS injection and shows a Google Fonts import example. That example is a technique to test, not a guarantee that a particular font covers a script or will load in every capture.

For a controlled test, inject CSS that selects a font you have confirmed covers the script. For example, the CSS concept is:

body {
  font-family: "A verified script-supporting font", sans-serif;
}

Use the provider’s actual font name and the ScreenshotAPI CSS-injection option described in its Help page. A CSS font-family declaration only selects from fonts available to the rendered page; if the face is not installed or its web font has not loaded, the browser may fall back. Verify font coverage and licensing with the font publisher.

For late-loading pages, use the documented wait behavior to capture after the relevant content appears. A fixed delay can help diagnose timing but may waste time on every request; where available, waiting for a meaningful selector is a more targeted check. Do not assume that waiting for the document’s initial load means a remote font or client-rendered translation has completed.

5. Validate representative pages and viewports

Test more than one representative page and the viewport sizes that matter to your use case. A single screenshot does not establish consistent behavior across browsers, platforms, pages, or responsive layouts. The India multilingual internet report discusses display variation across browsers and platforms, which is a reason to record the conditions of each validation run.

  • Record the URL, language preference, viewport, and any cookies or injected CSS used.
  • Check at least one content-heavy page and any page with forms, tables, or mixed scripts.
  • Compare desktop and mobile layouts if both are in scope.
  • When a capture changes, isolate one variable at a time: language negotiation, page state, wait timing, font loading, then viewport.

6. Troubleshooting

Symptom Likely cause What to try
The page remains in English or another language The target ignores the header, or chooses language from a URL, cookie, account, or location. Use the localized URL or required page state. Confirm the target’s selection behavior before changing fonts.
The language header seems ignored The preference may not match the site’s supported tags, or the site may not negotiate language from the header. Use a valid language tag with a fallback, then test the page directly and compare against a known localized URL.
Boxes or replacement characters appear The active font may not contain glyphs for the script, or the web font failed to load. Inspect font loading and script coverage. Test an appropriately licensed font through the page’s font stack or CSS injection.
Marks, conjuncts, or line breaks look incorrect Font choice, shaping, page CSS, or layout may be involved; the request language header does not fix text shaping. Inspect the source page and its font and text-layout setup. Compare a second suitable font and representative text.
The first capture has fallback fonts, later capture looks right The screenshot may occur before remote fonts or client-rendered localized text finish loading. Wait for a relevant element or use an appropriate delay, then capture again and check whether the font is available before capture.
Text is cut off or unusually wrapped The viewport differs from the intended device, or the selected font changes text metrics. Set the intended viewport and inspect the page at that size; check font metrics and responsive CSS.
The response is JSON or an error instead of an image The output option may be omitted or the API may return structured error information. Request output=image as documented, check the HTTP status and content type, and inspect any JSON body before saving it as an image.
Request fails after adding options A query value may be malformed or not URL-encoded, or an option value may not match the documented format. Build query parameters with a URL encoder, reduce the request to URL, token, and language option, then add options back one at a time.

7. Performance, reliability, and cost considerations

Localized captures can take longer than a simple static page when the target renders content client-side or fetches web fonts. Prefer waiting on the content you need over a large arbitrary delay when the API’s documented wait options allow it. For repeated validation, keep the URL, viewport, language preference, and capture timing consistent so changes are comparable.

Reliability depends on the target page as well as request configuration: the site may change its language behavior, font files, or responsive layout. Preserve representative screenshots and the conditions used to create them if you need to compare regressions. The provided ScreenshotAPI research does not establish a universal font guarantee, latency figure, or cost figure, so check its current documentation and plan details for those specifics.

Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server for developers. One GET request can return a PNG, JPEG, WebP, or PDF; its parameter names also work with those used by other screenshot APIs, which can make switching straightforward. Read the ScreenshotNeo documentation for the API options and use the ScreenshotNeo website for product details.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com/your-language-page -o shot.webp

With ScreenshotNeo, cookie banners are accepted and more than 60 known consent platforms, newsletter popups, and chat widgets are removed before the shot; each step can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are never billed, and response headers report the page verdict and billing status. An MCP server gives AI agents tools to take screenshots, get page information, and capture PDFs. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 screenshots.

Sign up free and capture 1,000 screenshots a month with no card.

FAQ

Does Accept-Language translate a page?

No. It is a request preference that a site may use to choose localized content; translation must be provided by the site or another translation system.

Does a successful screenshot prove a script is supported?

No. Inspect the image for missing glyphs, substitutions, shaping problems, and clipping on representative pages.

Will a Google Font fix every Indian-language rendering issue?

No. Check that the chosen family covers the specific script, loads before capture, and is appropriate for the page and its license.

Should I use a language header or a localized URL?

Use the mechanism the target actually honors. If it selects language by URL, a localized URL may be necessary even when the request also includes a language preference.