What to Do When a Screenshot API Captures Only Half an Indian Website
When a screenshot API shows only the top of a page, check capture mode, rendering readiness, lazy loading, and provider limits in that order.
If a screenshot API returns only the top half of an Indian website, first check whether the request asks for a full-page capture or only the visible viewport. Then check whether the rest of the page had rendered before capture, whether lazy-loaded content needed scrolling, and whether the provider enforces a height limit. These are separate problems: a short image usually points to viewport mode or a cap; an image with the right dimensions but blank lower sections often points to loading or readiness.
Parameter names, defaults, limits, and response headers vary by provider. Use the exact options documented for your endpoint. The examples below are diagnostic patterns, not verified tests against any particular Indian website.
1. Confirm whether the request is viewport or full-page
A viewport screenshot captures the visible browser area, commonly a configured width and height. A full-page screenshot is intended to cover the document’s scrollable height. Many services default to viewport capture unless you explicitly request full-page mode. For example, APIScreenshot documents fullPage=true; other providers use spellings such as full_page. Do not assume one provider’s parameter works with another.
| What you see | Likely cause | First check |
|---|---|---|
| Image ends near the configured viewport height | Viewport mode is active | Enable the provider’s full-page option |
| Image is taller, but its bottom is blank or incomplete | Content did not render or lazy-load | Check readiness waits and pre-capture scrolling |
| Image stops at a repeatable height | Provider or browser height cap | Check documented maximum page dimensions |
| Some sections are missing while others appear | Client-side rendering, lazy loading, or conditional content | Wait for a meaningful selector and inspect the page status |
Check the final image dimensions as well as the request. If the returned image height is close to the requested viewport height, the API may have honored viewport mode. If it is taller but still incomplete, investigate page rendering and provider limits next.
2. Check page readiness before capture
A full-page setting cannot capture content that the page has not created yet. JavaScript applications may render sections after the initial document load, and network activity can continue after the page appears visually ready.
- Look for a documented wait option such as a navigation condition, a selector wait, or a delay.
- Prefer waiting for a selector that marks the content you need, such as the results container, over an arbitrary long delay.
- If the page does not expose a stable selector, use a modest delay and adjust it based on repeated captures.
- Use network-idle waits carefully: analytics, polling, ads, and long-lived requests can prevent the page from becoming idle.
Some screenshot APIs document conditions such as load, domcontentloaded, networkidle0, networkidle2, a delay, or waiting for a selector. The exact names and semantics are provider-specific. Choose the least permissive wait that reliably includes the target content.
3. Trigger lazy-loaded content
Full-page dimensions do not guarantee that every image or section has loaded. Websites often defer images until they approach the viewport, or use IntersectionObserver to reveal content only after scrolling. A capture engine that measures page height without scrolling through it can therefore produce blank or incomplete lower sections.
- Check whether your provider offers pre-capture scrolling or an auto-scroll full-page mode.
- If you control the browser, scroll through the document in steps before taking the screenshot, allowing content to load at each step.
- Wait for a representative lower-page image or content selector if the API supports selector waits.
- Do not assume that full-page mode implies auto-scroll. This behavior differs across services.
For example, ScreenshotAPI documents a scroll option, and ShotPilot describes scrolling in chunks in its full-page mode. These are examples of provider-specific behavior, not a guarantee shared by all APIs. See the providers’ respective documentation for their supported options: ScreenshotAPI documentation and ShotPilot documentation.
4. Check viewport settings, height caps, and response signals
Inspect the request’s width and height, the returned image dimensions, and the provider’s documented maximum full-page height. Some services limit the final capture dimensions or handle very long pages in a provider-specific way. A width that triggers a different responsive layout can also change page structure and page length.
- Use the viewport width at which you want the site rendered; mobile and desktop breakpoints can show different content.
- Check whether the provider caps full-page height or image dimensions, and whether it documents a way to capture a long page in segments.
- Inspect HTTP status and any documented response headers that report the loaded page’s status. For example, screenshotapi.net documents an
X-Page-Statusheader; other providers may expose different signals or none. - When the capture is unexpectedly short, distinguish the returned image’s actual pixel dimensions from the browser viewport requested.
Do not treat another service’s header names, limits, or parameters as universal API behavior.
5. A practical diagnosis sequence
- Record the response. Save the image and note its dimensions, HTTP status, and provider-specific page-status or error headers.
- Verify the full-page flag. Confirm the exact spelling, accepted value, and endpoint from your provider’s documentation.
- Check for a page-height cap. Compare the returned height with the service’s documented limits.
- Wait for content. Add a selector wait for a required section, or use an appropriate navigation condition or bounded delay.
- Trigger lazy loading. Enable the provider’s pre-capture scroll feature if available. If operating a browser yourself, scroll the page in steps before capture.
- Repeat at the same viewport. Keep width, user agent, and other request settings fixed while diagnosing so responsive changes do not confound the result.
- Check the target page directly. Confirm the lower content appears in a normal browser, and note whether it appears only after scrolling, interaction, or consent.
6. Runnable request patterns
These examples show how to make a request to an API that documents a full-page option. Replace the endpoint, key, parameter names, and values with those supported by your provider. The full_page parameter below is illustrative; it is not universal. Check the response content type and status before treating the body as a valid image.
cURL
curl -G "https://YOUR_PROVIDER_ENDPOINT" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "url=https://example.in/" \
--data-urlencode "full_page=true" \
--data-urlencode "wait_until=networkidle2" \
-o page.png
Python
import requests
response = requests.get(
"https://YOUR_PROVIDER_ENDPOINT",
headers={"Authorization": "Bearer YOUR_API_KEY"},
params={
"url": "https://example.in/",
"full_page": "true", # Use your provider's documented spelling.
"wait_until": "networkidle2",
},
timeout=90,
)
response.raise_for_status()
content_type = response.headers.get("content-type", "")
if "image/" not in content_type:
raise ValueError(f"Expected an image response, got {content_type!r}")
with open("page.png", "wb") as image_file:
image_file.write(response.content)
print("Saved", len(response.content), "bytes")
Node.js
const params = new URLSearchParams({
url: 'https://example.in/',
full_page: 'true', // Use your provider's documented spelling.
wait_until: 'networkidle2',
});
const response = await fetch(`https://YOUR_PROVIDER_ENDPOINT?${params}`, {
headers: { Authorization: 'Bearer YOUR_API_KEY' },
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/')) {
throw new Error(`Expected an image response, got ${contentType}`);
}
const image = Buffer.from(await response.arrayBuffer());
await import('node:fs/promises').then(fs => fs.writeFile('page.png', image));
console.log(`Saved ${image.length} bytes`);
These are request-shape examples rather than copy-and-paste configuration for a named third-party provider. A provider may use a different authentication scheme, output format, wait option, or full-page parameter.
7. Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server. Its one-call endpoint can return an image or PDF. See the ScreenshotNeo API documentation for supported parameters and response behavior.
curl -G "https://api.screenshotneo.com/v1/shot" \
-d access_key=YOUR_API_KEY \
--data-urlencode url=https://example.in/ \
-d full_page=true \
-o shot.webp
ScreenshotNeo removes cookie and consent banners, newsletter popups, and chat widgets before the shot; each cleanup 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 shots a month with no card; paid plans start at $5 for 3,000 shots. Every feature is on every plan.
Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.
8. Performance, reliability, and cost
Full-page captures take more work than viewport captures because the browser must render and encode a larger image. Long waits also hold a browser session open. Use the smallest viewport and page area that meet your use case, wait for the content you need rather than an unnecessarily long fixed delay, and avoid retrying a deterministic height cap as if it were a transient failure.
For a production workflow, classify failures before retrying: distinguish API transport errors, target-page errors, timeouts, partial renders, and valid captures that hit a documented size limit. Retry only transient cases with a bounded policy and a unique job or idempotency mechanism if the provider supports one. Keep a record of the request settings and response dimensions so regressions are diagnosable.
Cost depends on the provider’s billing rules. Check whether it bills requests, successful captures, output size, or another unit, and whether retries or cache hits count. Do not infer billing behavior from HTTP status alone. ScreenshotNeo states that only clean shots are billed and that cache hits and failed or blocked page outcomes are not billed; consult its documentation for the response headers that identify verdict and billing status.
9. Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Capture has only the initial viewport | Full-page option is missing, false, misspelled, or unsupported on that endpoint | Use the endpoint’s documented parameter and confirm the returned dimensions |
| Lower page is white or images are missing | Lazy loading or deferred JavaScript rendering | Enable supported pre-capture scrolling; wait for target content or a representative selector |
| Capture is consistently truncated at the same height | Full-page height or output dimension cap | Check provider limits; use documented segmented capture if available |
| Request waits until timeout | Network-idle condition never occurs, often due to ongoing requests | Wait for a selector or use a less strict readiness condition and bounded delay |
| Desktop content is missing or layout looks mobile | Viewport width or user agent selects a responsive breakpoint | Set the intended viewport and user agent explicitly where supported |
| Response body is not an image | API returned an error page, JSON error, or authentication response | Check HTTP status, content type, and provider-specific error fields before saving |
| Some content remains covered or changes between runs | Consent prompts, popups, chat overlays, personalization, or other page state | Use documented cookie/state controls or cleanup options; keep the setup consistent |
10. Frequently asked questions
Does full-page mode always load images below the fold?
No. Full-page mode concerns the capture area; lazy loading may require scrolling or a provider feature that triggers scrolling before capture.
Should I increase the wait time until the screenshot looks right?
Only if rendering time is the cause. A selector tied to required content is usually a clearer readiness signal. A longer wait does not bypass a height cap or enable full-page mode.
Can an Indian website behave differently from another site?
Yes. The capture diagnosis is the same, but a particular site’s scripts, responsive breakpoints, consent flow, or lazy-loading behavior can affect the result. This guide does not claim a tested reproduction on a specific Indian site.
Why does the image height differ from the page’s apparent length?
The provider may cap output dimensions, capture a viewport, or measure the document before dynamic sections expand. Compare the returned dimensions with the request and provider limits, then verify page readiness.


