ScreenshotNeo

BlogHow-to

How to Screenshot GST Portal Pages with Browserless for Records

Capture a GST Portal page with Browserless, verify what the image contains, and keep it alongside any official downloads available for that record.

By the ScreenshotNeo team4 October 20269 min read

Short answer: Browserless can capture a rendered GST Portal page through its Screenshot API, but a screenshot records only the visible page state. Save an official portal download as well whenever one is available, and inspect every capture for missing content, a blank page, a CAPTCHA, or an access-denied screen. The sources reviewed do not establish Browserless as an approved GST Portal integration or show that a screenshot alone meets any particular recordkeeping obligation.

1. Decide what record you need

Identify the GST Portal page, return or form, tax period, and information you need to preserve. Keep only the taxpayer information required for that purpose, since screenshots may include sensitive details.

Prefer the portal’s own downloadable record when it offers one. For specific GSTR-1 e-invoice workflows, GST Portal guidance describes downloading e-invoice details as Excel and a PDF summary. The guidance applies to those workflows, not every portal page. Check the relevant official instructions for the page you are recording:

A portal export can preserve structured details or a portal-generated summary. A screenshot can add visual context about what appeared on screen at a particular moment. Keep both when both serve your recordkeeping need.

2. Get a Browserless API token

Browserless’s Screenshot API requires an API token. Create or access a Browserless account and obtain a token through its service. Treat the token as a credential: do not paste it into public scripts, commit it to source control, or print it in logs. Browserless documents the token in the request URL, so take care when shell history, proxy logs, or diagnostic output may retain full URLs.

See the Browserless Screenshot API documentation for the current endpoint and supported options. The endpoint is /screenshot; requests include a target URL and may include screenshot options.

3. Capture the page with Browserless

For an unauthenticated page, a minimal request can look like this. Replace the placeholder with your Browserless token and the target URL with the page you need. Use a URL-encoding tool or client library when the target URL contains query parameters or other reserved characters.

curl -X POST 'https://production-sfo.browserless.io/screenshot?token=YOUR_BROWSERLESS_TOKEN' \
  -H 'Content-Type: application/json' \
  --data '{"url":"https://example.com","options":{"fullPage":true}}' \
  --output gst-page.png

This example uses fullPage to request a full-page capture. The exact available options and accepted request shape can change; check Browserless’s documentation before relying on additional parameters. A full-page image may be tall and can still miss content that never rendered or requires interaction.

Python example

import os
import requests

# Set BROWSERLESS_TOKEN in your environment before running this script.
token = os.environ["BROWSERLESS_TOKEN"]
endpoint = "https://production-sfo.browserless.io/screenshot"
response = requests.post(
    endpoint,
    params={"token": token},
    json={
        "url": "https://example.com",
        "options": {"fullPage": True},
    },
    timeout=90,
)
response.raise_for_status()
with open("gst-page.png", "wb") as image_file:
    image_file.write(response.content)

Install the dependency with python -m pip install requests. Set the token in the environment, for example with export BROWSERLESS_TOKEN='your-token' in a shell that supports that syntax. Avoid placing a real token in shared shell history.

Node.js example

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 },
  }),
  signal: AbortSignal.timeout(90_000),
});
if (!response.ok) {
  throw new Error(`Browserless returned HTTP ${response.status}: ${await response.text()}`);
}
const image = Buffer.from(await response.arrayBuffer());
await import("node:fs/promises").then(fs => fs.writeFile("gst-page.png", image));

These runnable examples use a public example URL because GST Portal pages may require sign-in. Do not assume that passing a login URL will produce an authenticated capture. Authentication has to be handled deliberately, and the portal may block or challenge automated browsing.

Choose capture options carefully

  • Full page: useful for a long page when the entire rendered document matters. Review the result for lazy-loaded or below-the-fold content.
  • Wait behavior: where supported by the API, wait for a relevant selector or for the page to settle before capture. Excessive waiting increases latency; too little can capture an incomplete view.
  • Element capture: where supported, target a specific rendered element when only a particular section is needed. Confirm the element is present before relying on the result.
  • Output format: Browserless documents PNG, JPEG, and WebP screenshot output. Choose a format based on readability and file handling; retain enough detail for small text.

Consult the API reference for exact option names, defaults, and limits rather than assuming options from another browser automation product behave the same way.

4. Handling a page that requires login

Browserless documents persistent browser sessions and authenticated profiles that can load saved browser state before rendering. These capabilities may help with workflows that need cookies or prior navigation, but they do not guarantee compatibility with a particular GST Portal account or sign-in flow. The sources reviewed do not establish Browserless as a GSTN-approved integration.

  1. First, complete the relevant portal workflow manually and determine which official export is available.
  2. If a visual screenshot is still needed, assess whether an authorized persistent session or authenticated profile fits your security requirements and Browserless account setup. Follow Browserless’s documentation for creating and protecting that state: Authenticated Profiles and browser sessions.
  3. Do not put passwords, tokens, or taxpayer data into shared code or logs. Restrict access to saved sessions and resulting files.
  4. Run a small, controlled capture and inspect the result in a normal image viewer. If the portal presents verification, CAPTCHA, blank content, or an access-denied screen, stop treating that result as a record of the intended page.

5. Verify and file the result

Open the returned image before saving it as evidence of a page state. Check that the expected account or page, period, relevant values, and visible status are present and legible. Look for an automation challenge, blank output, stale content, clipped sections, or missing images. A successful HTTP response alone does not prove that the intended portal content was captured.

Save the screenshot with any official portal files in a controlled location. A useful filename can identify the return or page, period, capture date, and format, for example gstr1-summary-2026-09-2026-10-04-screenshot.png. This is an organizational suggestion, not a statutory naming rule. Follow the retention and access requirements that apply to your record type and situation; the reviewed sources do not establish a universal retention period for screenshots.

6. Screenshot, portal export, or PDF?

Format Useful for Limit to keep in mind
GST Portal Excel export Structured e-invoice details for the specific GSTR-1 workflows described in the portal guidance It is not documented here as an export for every GST Portal page.
GST Portal PDF summary A portal-generated summary for the relevant return workflow A summary may not show every screen or interaction.
Browserless screenshot A visual snapshot of rendered page content Automation blocking, early capture, or failed rendering can make it incomplete or unrelated to the intended page.
Browserless PDF A PDF rendered through Chrome’s print engine with selectable text Selectable text does not establish legal sufficiency for GST recordkeeping.

Browserless documents a PDF API that uses Chrome’s print engine. Choose a PDF when selectable page text is useful; choose a screenshot when the visible visual state is what you need to preserve. Neither format should be assumed to have official status or legal sufficiency based on the sources cited here. See the Browserless PDF API.

7. Troubleshooting

Symptom Likely cause What to do
Blank image The page did not render in the capture session, or automation was blocked. Inspect the page in a regular browser, check the returned image, and verify the URL and load state. Do not file a blank capture as the intended record.
CAPTCHA or verification screen The site challenged automated access. Do not try to treat the challenge as portal content. Use the portal through an appropriate manual workflow and retain its official downloads.
Access denied or different content The site may block automation or serve a different page to the remote browser. Confirm what the image actually shows. Browserless explicitly warns that blank images, CAPTCHA pages, or content unlike a real browser can indicate blocking. A capture does not prove successful access to the expected page.
Login page instead of account data The request had no valid authenticated browser state, or the session did not persist. Use Browserless’s documented session/profile workflow only where authorized, check its setup, and verify the resulting image. Do not assume every account flow is supported.
Missing lower-page content The screenshot was not full-page, content was lazy-loaded, or rendering had not completed. Use the documented full-page option, wait for relevant content where the API supports it, and inspect the entire image.
HTTP error or rejected request The token, endpoint, request body, or request format may be wrong; service-side limits may also apply. Check the current Browserless API reference, confirm the token is present, validate JSON and URL encoding, and read the response status and body without exposing the token in shared logs.
Image file appears unreadable The response may be an error body saved with an image extension, or the selected format may not match the file handling. Check the HTTP status before writing the body, inspect the response content type, and open the file in an image viewer.

8. Performance, reliability, and cost considerations

Capture time depends on page load and rendering behavior. Full-page capture and waits for slow or absent content can increase latency. Set a client timeout appropriate to the page, handle HTTP failures, and avoid repeatedly capturing the same state when an official export already provides the record you need.

Reliability depends on both the remote browser and the portal’s response to automation. A completed request can still yield a challenge page or incomplete image, so image inspection is part of the workflow. For an important record, retain the official download where available and use the screenshot as supplemental visual context.

Browserless pricing and service limits are not specified in the research sources for this article; check its current service information before estimating the cost of repeated captures. Do not infer that a screenshot is free or that a particular GST workflow will succeed.

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. For this use case, remember that any authenticated portal page still depends on a supported, authorized way to provide the required access; verify the returned file before retaining it.

See the ScreenshotNeo API documentation 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}`);
  • Cookie banners, popups, and chat widgets are removed before the shot; each cleanup step can be turned off.
  • Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed. Responses include page-verdict and billing headers.
  • 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 for ScreenshotNeo and get 1,000 screenshots a month free, with no card.

FAQ

Does Browserless have official GST Portal approval?

The sources reviewed do not establish Browserless as GSTN-approved or officially integrated with the GST Portal.

Can a screenshot replace a GSTR-1 download?

No such equivalence is established in the cited guidance. Save the portal’s available Excel details or PDF summary when relevant, and use a screenshot to preserve visual context.

How long must I retain a GST Portal screenshot?

The reviewed sources do not establish one retention period that applies to every screenshot or GST record. Confirm the requirement for your situation with an authoritative GST source or qualified adviser.

Will a Browserless authenticated profile always work with GST Portal?

No guarantee is supported by the cited documentation. Browserless describes saved authenticated state as a capability, while portal compatibility and automation challenges remain specific to the flow.