How to capture Indian-language websites with Browserless screenshots
Capture Indian-language pages with Browserless REST, BrowserQL, or BAP. Set page readiness and framing carefully, then inspect the image for font and layout issues.
To capture an Indian-language website with Browserless, navigate to the page through its screenshot REST API, BrowserQL, or BAP SDK; wait for the page content and fonts needed in the image; then capture the viewport, full page, a CSS-selected element, or a clipped region. Inspect the resulting image for missing glyphs, clipped marks, and fallback fonts. Browserless documents fonts for common scripts in its rendering browsers and says page-provided web fonts render when they load, but its reviewed documentation does not guarantee rendering for every Indian language or script.
This guide shows the documented Browserless workflows and how to check their output. The examples are code patterns based on the cited documentation, not reports of live captures.
1. Choose a Browserless interface
| Interface | Use it when | Output |
|---|---|---|
REST /screenshot |
You want a direct HTTP request and a straightforward image response. | Image bytes |
| BrowserQL | You want navigation and screenshot actions in one GraphQL mutation. | Base64-encoded image |
| BAP SDK | Your application already uses Browserless’s SDK and you want SDK-returned bytes or a saved file in a supported runtime. | Bytes or a file path, depending on runtime |
For one-off automation or a service that already uses HTTP, start with REST. Use BrowserQL when its mutation flow fits your application. Use BAP when you want its SDK options and output handling. Browserless documents the REST API, BAP SDK, and BrowserQL as separate capture paths. REST screenshot API, BrowserQL screenshot, BrowserQL navigation, BAP SDK.
2. Capture with the REST screenshot API
Send a POST request to Browserless’s /screenshot endpoint with a JSON body containing the URL and screenshot options. The endpoint returns image bytes. The API also accepts inline HTML instead of a URL; do not send both url and html in the same request. Use the endpoint host and token configured for your Browserless account.
curl -X POST \
"https://production-sfo.browserless.io/screenshot?token=$BROWSERLESS_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"url":"https://example.com/","options":{"fullPage":true,"type":"png"}}' \
--output screenshot.png
Replace the example URL with the page you need. Keep the token in an environment variable or secret store rather than committing it to source control. The example uses fullPage to capture the entire document and PNG for lossless output. Consult the current REST reference for supported screenshot options and account endpoint details.
Capture through REST from Python
import os
import requests
endpoint = "https://production-sfo.browserless.io/screenshot"
params = {"token": os.environ["BROWSERLESS_TOKEN"]}
payload = {
"url": "https://example.com/",
"options": {"fullPage": True, "type": "png"},
}
response = requests.post(endpoint, params=params, json=payload, timeout=90)
response.raise_for_status()
with open("screenshot.png", "wb") as image_file:
image_file.write(response.content)
Capture through REST from Node.js
const token = process.env.BROWSERLESS_TOKEN;
if (!token) throw new Error("Set BROWSERLESS_TOKEN first");
const endpoint = new URL("https://production-sfo.browserless.io/screenshot");
endpoint.searchParams.set("token", token);
const response = await fetch(endpoint, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
url: "https://example.com/",
options: { fullPage: true, type: "png" },
}),
});
if (!response.ok) {
throw new Error(`Browserless returned ${response.status}: ${await response.text()}`);
}
const image = new Uint8Array(await response.arrayBuffer());
await import("node:fs/promises").then(({ writeFile }) => writeFile("screenshot.png", image));
3. Navigate and capture with BrowserQL
BrowserQL combines navigation and screenshot operations in a mutation. Its screenshot result contains a base64 image; decode that value to save a PNG. For dynamic pages, choose a navigation wait that matches the page and wait for a meaningful element or readiness signal before taking the screenshot. Browserless’s guidance cautions that failing to wait for page elements can produce blank or incomplete captures.
mutation Capture {
goto(url: "https://example.com") {
status
}
screenshot(fullPage: true, type: png) {
base64
}
}
Send the mutation to the BrowserQL endpoint for your Browserless account using its documented authentication and request format. The mutation is the illustrative query; your client must also extract the returned base64 field and decode it. BrowserQL’s goto supports a waitUntil event and timeout, while screenshot options include framing, format, image waits, and timeout. See the navigation reference and screenshot reference.
4. Use the BAP SDK when it fits your application
BAP offers a screenshot workflow with output type, full-page capture, selector or clip framing, image waiting, and viewport sizing. In Node.js and Python, its documented path option can save screenshot bytes to a file. In browser builds, use returned bytes rather than a local disk path. Consult the BAP documentation for package setup, current method signatures, and the runtime-specific request configuration.
For a page in an Indian script, set the viewport before navigation if responsive layout matters. Wait for the target content and images where needed. The screenshot options document waitForImages; the BAP PDF options document waitForFonts, so do not assume that the PDF font option is available in every screenshot interface. Verify font readiness using a page-specific signal when the site exposes one.
5. Make the capture reliable for Indian scripts
- Set the viewport. Viewport width and height can change responsive breakpoints, line wrapping, navigation, and which content appears. Choose dimensions that represent the intended device or view.
- Wait for the page to be ready. A navigation event alone may not mean that client-rendered text or web fonts are ready. Wait for a selector that contains the content, or another page-specific readiness condition.
- Trigger lazy content. For long pages with lazy-loaded sections or images, use REST’s documented
scrollPage: truebehavior and pair it withoptions.fullPage: truewhen you need the whole page. A full-page setting alone may not trigger content that loads only after scrolling. - Choose the frame. Use viewport capture for the visible screen,
fullPagefor the full document, a CSSselectorfor one element, orclipfor a specific region. - Choose a format deliberately. PNG preserves sharp text without lossy compression. JPEG or WebP can reduce file size when their quality setting is appropriate. BAP documents that quality does not apply to PNG; JPEG and WebP support quality.
- Inspect the actual image. Look for missing-glyph boxes, incorrect fallback appearance, clipped conjuncts or diacritics, and text absent because a page font had not loaded. These are practical checks; the reviewed sources do not provide a Browserless language-by-language conformance list.
Browserless says its rendering browsers include fonts for common scripts and that pages shipping their own web fonts render when those fonts load. That statement appears in its PDF API guidance, so treat it as a useful caveat about font loading, not a guarantee that every Indian script will render correctly in every screenshot environment. Browserless PDF API guidance.
6. Frame, wait, and format options
| Need | Option or approach | What to check |
|---|---|---|
| Entire long page | fullPage: true |
Trigger lazy content first; REST documents scrollPage: true. |
| One component | CSS selector |
Ensure the selector matches after navigation and content rendering. |
| Specific rectangle | clip |
Set the region to include needed marks and line height. |
| Responsive view | Set viewport dimensions | Check wrapping, font size, and responsive navigation at that size. |
| Images loaded | Use the documented image-wait option where available | Image readiness does not necessarily mean custom fonts or all application data are ready. |
| Lossless text edges | PNG | Quality settings do not apply to PNG in BAP. |
| Smaller compressed file | JPEG or WebP with quality | Inspect small glyph details after compression. |
Browserless’s screenshot reference specifies a default timeout of 30 seconds (30,000 milliseconds) and a quality range from 0 to 100 where applicable. These are API parameter specifications, not performance benchmarks. Check the current reference for the exact option names and accepted values in the interface you use. Browserless screenshot reference.
7. Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Blank or mostly blank screenshot | Capture ran before navigation or client rendering completed. | Use a suitable navigation wait and wait for a meaningful content selector or page-specific readiness signal. |
| Indian text appears as boxes or missing glyphs | The rendering environment lacks a usable glyph, or the page font failed to load. | Check the page’s font requests and wait for its web font to load. Inspect the output image and test the target script in the same environment; Browserless does not document a language-by-language guarantee. |
| Text looks like the wrong typeface | A fallback font rendered before the intended web font was available, or the intended font lacks glyph coverage. | Wait for the site’s font and inspect network/font loading. Confirm that the selected font includes the needed script. |
| Marks, conjuncts, or lines are clipped | The selector or clip is too tight, or the layout changed at the chosen viewport. | Capture a larger region, include vertical padding, and verify viewport dimensions and line height. |
| Lower sections or images are missing | The page loads content on scroll. | Enable REST scrollPage: true and use full-page capture; verify the content has loaded before capture. |
| Request returns an error instead of an image | Wrong endpoint or token, malformed JSON, invalid option, or both url and html supplied. |
Check the account endpoint and authentication, validate the JSON body and current option names, and send either URL or inline HTML. |
| Capture times out | The page or requested readiness condition did not finish within the configured timeout. | Use a realistic timeout, wait for a specific element rather than a global idle condition on a busy site, and investigate slow or blocked page resources. |
| Image is larger than expected | Full-page dimensions or lossless PNG produce a large result. | Capture only the needed frame or use a supported compressed format and inspect the result for text quality. |
8. Performance, reliability, and cost considerations
Capture latency depends on the target site’s navigation, scripts, fonts, images, and readiness condition; the reviewed documentation provides timeout settings but no benchmark for Indian-language pages. A selector-based readiness check can avoid waiting for unrelated activity on a page that never becomes network-idle. Full-page captures and scrolling can require more page work and create larger files than viewport captures. Choose the smallest frame and suitable format that meet the use case.
For repeatable results, keep viewport, wait condition, and format consistent, and retain the returned image long enough to inspect failures. Treat font availability and loading as dependencies: a successful HTTP response does not prove that every glyph rendered as intended. No specific Browserless price or cost figure is established by the reviewed research, so check your current account plan and usage terms.
Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server. Its one-call GET endpoint returns a screenshot image. See the ScreenshotNeo API docs for request options.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
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 removes cookie banners, popups, and chat widgets before the shot. Bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Sign up for 1,000 free screenshots a month with no card.
FAQ
Does Browserless guarantee support for every Indian language?
The reviewed documentation does not give a language-by-language guarantee. Check the exact script in the returned image and verify that needed fonts loaded.
Can I capture a full page through the API?
Yes. The documented screenshot options include full-page capture. For lazy-loaded content, trigger scrolling before capture as described above.
Should I use PNG for text-heavy pages?
PNG is lossless and is a sound default for inspecting glyph shape. JPEG and WebP can reduce file size, but review the compressed output for small-script detail.
Can I send HTML instead of a URL?
The REST screenshot API accepts inline HTML, but its request should contain either html or url, not both.


