ScreenshotNeo

BlogHow-to

How to Capture GST Portal Webpage Screenshots with Screenshotlayer

Capture publicly accessible GST portal pages with Screenshotlayer. Learn which settings to use, how to save the image, and why logged-in capture is unverified.

By the ScreenshotNeo team4 October 20269 min read

To capture a GST portal webpage with Screenshotlayer, send its capture API your access key and the complete URL, then choose settings such as viewport size, full-page mode, format, delay, and cache lifetime. This is documented for URL-based capture of reachable pages. The available documentation does not establish that Screenshotlayer can log in to a GST account, solve a CAPTCHA, complete an OTP challenge, or reuse an authenticated browser session. Treat capture of pages behind GST login as unverified.

This guide covers the documented public-page workflow, runnable cURL, Python, and Node.js examples, options, failure cases, and privacy precautions. It does not claim that a live GST capture was tested.

1. Check whether the page is public

Choose the exact page you are permitted to capture. Screenshotlayer requires a complete target URL, including its protocol, and an access key. A publicly reachable informational page is the straightforward use case. If the page is inside a taxpayer account, do not assume the API can access it: the available API references describe URL capture and request options, but do not document interactive login or authenticated-session handling. Screenshotlayer API specification

GST login can involve CAPTCHA and, depending on circumstances such as first login or a new device, OTP. Changing a user agent or language header is not evidence that these checks can be completed. See the GST tutorial on logging in and managing passwords.

2. Choose the capture settings

Need Setting Practical guidance
Capture the visible area viewport Set the intended browser dimensions. The API specification illustrates 1440x900.
Capture the entire page height fullpage=1 Use for long pages; inspect the result for clipping, unreadable text, and information below the intended section.
Set image dimensions width Use the documented width option when you need a specific output width.
Select an image type format The specification documents PNG as the default. The FAQ lists PNG, JPEG, and GIF. Use a lossless format such as PNG when small text must remain legible.
Wait for rendering delay Request a wait before capture if the public page needs time to render. No particular delay is established as optimal for GST pages.
Control cached results ttl, force The documented default TTL is 2,592,000 seconds (30 days). Consider freshness needs before relying on a cached image; consult the API docs for the force option.
Set request identity or language user_agent, accept_lang These documented request options do not authenticate a taxpayer or bypass CAPTCHA or OTP.
Customize the page appearance Custom CSS The product page describes custom CSS. Check current vendor documentation for supported parameter syntax before using it.
Export output Export options Export options are listed in the API specification; use the specification for their exact accepted values.

Sources: API specification, Screenshotlayer FAQ, and product page. Vendor examples demonstrate options; they are not evidence of GST-specific compatibility.

3. Capture a public page with cURL

Replace the example URL with a non-sensitive, publicly accessible page you are authorized to capture, and replace the placeholder with your own key. This example asks for a full-page capture at a 1440 by 900 viewport, in PNG format, with a short rendering delay. Adjust or remove options to fit the page.

curl -G "https://api.screenshotlayer.com/api/capture" \
  --data-urlencode "access_key=YOUR_ACCESS_KEY" \
  --data-urlencode "url=https://www.example.com/" \
  --data-urlencode "fullpage=1" \
  --data-urlencode "viewport=1440x900" \
  --data-urlencode "format=PNG" \
  --data-urlencode "delay=2" \
  --output gst-page.png

Check the current Screenshotlayer API specification for the endpoint and accepted values associated with your account and plan. Do not put an access key in a public repository, shared command history, or URL log. If the service returns an error payload instead of an image, save or inspect the response before treating the output file as a screenshot.

4. Runnable Python example

This example uses requests. Install it with python -m pip install requests. It checks the HTTP status and writes the response bytes; inspect the saved file to confirm that the response is an image rather than an error message.

import os
import requests

access_key = os.environ["SCREENSHOTLAYER_ACCESS_KEY"]
params = {
    "access_key": access_key,
    "url": "https://www.example.com/",
    "fullpage": "1",
    "viewport": "1440x900",
    "format": "PNG",
    "delay": "2",
}

response = requests.get(
    "https://api.screenshotlayer.com/api/capture",
    params=params,
    timeout=90,
)
response.raise_for_status()

content_type = response.headers.get("content-type", "")
if not content_type.startswith("image/"):
    raise RuntimeError(
        f"Expected an image, received {content_type}: "
        f"{response.text[:500]}"
    )

with open("gst-page.png", "wb") as image_file:
    image_file.write(response.content)

Set the environment variable before running: export SCREENSHOTLAYER_ACCESS_KEY='your-key' in a POSIX shell, or use the equivalent environment-variable command for your shell. Avoid printing the key or request URL in shared logs.

5. Runnable Node.js example

On a current Node.js release with built-in fetch, this example requests the image and writes it to disk. Set the key in the environment rather than embedding it in source code.

import { writeFile } from "node:fs/promises";

const accessKey = process.env.SCREENSHOTLAYER_ACCESS_KEY;
if (!accessKey) throw new Error("Set SCREENSHOTLAYER_ACCESS_KEY first");

const query = new URLSearchParams({
  access_key: accessKey,
  url: "https://www.example.com/",
  fullpage: "1",
  viewport: "1440x900",
  format: "PNG",
  delay: "2",
});

const response = await fetch(
  `https://api.screenshotlayer.com/api/capture?${query}`,
  { signal: AbortSignal.timeout(90_000) },
);
if (!response.ok) {
  throw new Error(`Screenshot request failed: HTTP ${response.status}`);
}

const contentType = response.headers.get("content-type") ?? "";
if (!contentType.startsWith("image/")) {
  const body = await response.text();
  throw new Error(`Expected an image, got ${contentType}: ${body.slice(0, 500)}`);
}

await writeFile("gst-page.png", Buffer.from(await response.arrayBuffer()));

Run with SCREENSHOTLAYER_ACCESS_KEY='your-key' node capture.mjs. The exact endpoint and option values should match the current vendor specification.

6. Review the screenshot before using it

  1. Open the output and confirm it is an image, not an API error response.
  2. Check whether it shows the intended public page rather than a block page, redirect, or incomplete load.
  3. Check text legibility, viewport cropping, and whether full-page capture included unrelated content.
  4. Check freshness. The documented default cache lifetime is 30 days; use TTL and refresh behavior deliberately if the source may have changed.
  5. Before sharing, redact taxpayer identifiers, financial details, and other private information. Do not share credentials or OTPs.

7. GST login and filing pages: what is and is not established

Screenshotlayer’s documented URL capture options do not establish a supported way to complete GST login, carry a taxpayer’s browser session, submit forms, or pass CAPTCHA and OTP. Do not send account credentials or OTPs to a screenshot endpoint unless the provider explicitly documents a secure, authorized method and you have determined it is appropriate for the data.

For GSTR-1, the official GST tutorial describes logging in at gst.gov.in, opening Services > Returns > Returns Dashboard, selecting the financial year and filing period, then choosing Prepare Online or Prepare Offline. The tutorial explains that online preparation happens on the portal while offline preparation uses a JSON file prepared with offline tools. This workflow source does not establish Screenshotlayer compatibility with either route. See the official GSTR-1 procedure.

If your objective is to keep a filing record, use the GST portal’s own download facilities where available rather than assuming a screenshot is a substitute. The cited sources do not establish screenshot admissibility or a general evidentiary rule.

8. Troubleshooting

Symptom Likely cause What to do
Invalid request or URL error The target URL is incomplete or malformed, or an option value is unsupported. Use a complete URL including https://; remove optional parameters and add them back one at a time. Compare values with the API specification.
Authentication or access-key error The key is missing, mistyped, inactive, or not accepted for the request. Check the key in the provider account, keep it out of logs, and retry with a minimal request.
The image is a login, CAPTCHA, or block page The target is protected, redirected, or challenging automated access. Do not interpret this as a successful authenticated capture. The available documentation does not verify GST login support. Use an authorized, documented workflow or capture a public page instead.
The screenshot is blank or incomplete The page may not have finished rendering, may require scripts, or may have failed to load. Try a modestly longer documented delay and inspect the URL in a normal browser. A delay cannot guarantee a successful load.
The saved file will not open An API error response may have been saved with an image extension. Check HTTP status, response content type, and error body before writing bytes as an image.
Old page content appears A cached capture may be returned within the configured TTL. Review ttl and the documented force option when freshness matters.
Text is too small or content is cut off Viewport, width, or full-page choice does not suit the page. Adjust viewport or width, compare viewport capture with fullpage=1, and inspect the resulting image at its intended display size.
Request times out The target or capture service did not finish within the client timeout. Use a reasonable client timeout, retry selectively, and verify that the target is reachable. Avoid uncontrolled retries that expose sensitive URLs repeatedly.

9. Performance, reliability, and cost considerations

  • Delay adds waiting time: use it only when the page needs additional rendering time. No GST-specific optimal value is documented.
  • Full-page captures are larger: long pages can take longer to render and produce larger image files than a viewport capture. Choose the smallest image scope that serves the task.
  • Cache affects freshness: the FAQ states the default TTL is 2,592,000 seconds. A cached result may not reflect recent portal content; choose TTL and refresh behavior to match the need.
  • Capture success is not guaranteed by settings: a URL, user agent, or delay does not prove that a protected page can be accessed or that all content loaded.
  • Check current pricing: the research sources report vendor-published plans, but prices and quotas can change. Consult the Screenshotlayer product page before estimating current costs. No independent accuracy, speed, or GST compatibility benchmark was located for this guide.
  • Protect sensitive data: taxpayer account pages can contain private filing information. Restrict access to captures and avoid transmitting account credentials, OTPs, or unnecessary personal data.

10. Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server. For a public page, one GET request can return an image; see the API documentation for the complete options. For a GST page behind login, CAPTCHA, or OTP, do not assume any screenshot service can access it; ScreenshotNeo’s listed features do not establish GST account login support.

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

ScreenshotNeo accepts cookie and consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and response headers report the page verdict and billing status. Its 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 screenshots.

Sign up for 1,000 free screenshots a month, with no card required.

Frequently asked questions

Can I capture a GST page after logging in?

That capability is unverified in the available Screenshotlayer documentation. The documented URL and header options do not establish session import or interactive login, and GST login can involve CAPTCHA or OTP.

Should I use Prepare Online or Prepare Offline for GSTR-1?

The GST tutorial documents both routes: online entry on the portal and offline preparation with tools and a JSON file. Choose the route that fits your filing workflow; a screenshot service is not part of that documented choice.

Is a screenshot an official filing record?

The sources cited here do not establish the legal or evidentiary status of screenshots. Use the portal’s own records and download facilities where available.

Does changing the user agent solve CAPTCHA?

No such capability is established by the vendor documentation. The user-agent option is a request setting, not documented CAPTCHA or OTP handling.