How to Capture Hindi Web Pages with the Microlink Screenshot API
Capture a Hindi web page with Microlink by requesting a screenshot, setting the target language when supported, and waiting for the Devanagari content to render.
To capture a Hindi web page with the Microlink screenshot API, send the page URL with screenshot=true. If the site supports language negotiation, include Accept-Language: hi. For pages rendered by JavaScript, wait for an element that confirms the Hindi content is present. Then inspect the returned image for missing Devanagari glyphs: Microlink’s reviewed documentation does not guarantee a particular Hindi font is installed.
1. Make a basic screenshot request
Microlink accepts a target URL and a screenshot option. The default response is JSON; the screenshot metadata and hosted image URL are in data.screenshot. Use meta=false when you only need the screenshot and do not need page metadata.
curl -G 'https://api.microlink.io' \
--data-urlencode 'url=https://example.in/hindi-page' \
--data 'screenshot=true' \
--data 'meta=false'
Use your actual Hindi page URL in place of the example. URL-encode it when constructing a request manually; using a query-parameter option such as curl’s --data-urlencode avoids mistakes with nested query strings.
A successful JSON response contains data.screenshot.url and can include fields such as type, size, width, and height. Read the URL from the response rather than trying to construct an asset URL yourself. See Microlink’s screenshot parameter reference and first screenshot guide.
2. Ask the site for Hindi
Language selection is controlled by the target website. If it negotiates language using request headers, send Accept-Language: hi. This asks the site for Hindi; it does not translate an English-only page. Some sites choose language from a URL path, a cookie, or a language menu instead, so use the site’s Hindi URL or interact with its language control when necessary.
curl -G 'https://api.microlink.io' \
--data-urlencode 'url=https://example.in/hindi-page' \
--data 'screenshot=true' \
--data 'meta=false' \
--data-urlencode 'headers[Accept-Language]=hi'
Header forwarding syntax and availability can depend on the request and plan. Microlink’s guide distinguishes public header values such as language from secrets such as cookies or authorization. Check the current header and authentication guide before sending credentials. Do not put credentials in query strings.
3. Wait until the Hindi content is ready
A page navigation can finish before a single-page app has rendered its text. Prefer a selector that only appears when the expected Hindi content is available. A generic page shell or navigation bar may appear too early to be a useful readiness signal.
const result = await microlink.screenshot('https://example.in/hindi-page', {
waitUntil: 'domcontentloaded',
waitForSelector: 'main h1',
fullPage: true
})
console.log(result.url)
Choose a content-specific selector where possible. If the site needs a language-menu click before showing Hindi, interact with that control and then wait for a Hindi heading or other content-specific element. Microlink also documents lifecycle waits, scrolling, clicking, and a timeout wait as capture controls. Scrolling can help trigger lazy-loaded sections; a fixed delay is a fallback when there is no stable selector, since a guessed delay may be too short or needlessly long. See the guide to JavaScript-rendered pages.
4. Choose the capture and response options
| Choice | Use it when |
|---|---|
| Viewport or full page | Use a viewport capture for a visible-screen preview; use fullPage when you need the whole scrollable document. |
| JSON response | Use the normal JSON response when your code needs the hosted image URL or screenshot metadata. |
| Direct image response | Use embed=screenshot.url when the caller needs the image itself for markup or another direct-image use. |
| Selector wait or fixed delay | Prefer a selector that proves the Hindi content is ready. Use a timeout only when no reliable page condition is available. |
| Page route or language header | Use the site’s Hindi route or language control if that is how it selects content; use Accept-Language if it negotiates by header. |
The screenshot option can also be provided as an object to select settings such as full-page capture and output type. Consult the current parameter reference for supported options including element capture, image type, quality, and dimensions, since exact options and defaults are API-specific.
https://api.microlink.io?url=https%3A%2F%2Fexample.in%2Fhindi-page&screenshot=true&meta=false&embed=screenshot.url
For a direct response in your application, retrieve the response rather than copying the illustrative URL above unchanged. It contains an encoded example target.
5. Verify Devanagari rendering
Inspect the actual output for empty squares, missing conjuncts, misplaced vowel marks, or unexpected fallback fonts. A correctly localized page can still produce a poor screenshot if the browser cannot access a font with the needed Devanagari glyphs.
The reviewed Microlink documentation describes style injection, but does not publish a Hindi-specific font inventory or guarantee a particular bundled font. If glyphs are missing, make a suitable Devanagari font reachable to the rendered page and use documented CSS injection to set an appropriate font-family. The font must actually load in the capture environment. Re-capture and inspect the resulting image; do not assume the override worked merely because the CSS was accepted. See Microlink’s page-shaping and style injection information.
6. Use the result in code
With the standard JSON response, parse data.screenshot.url and use that returned URL. If you need a direct image response for an HTML image source or similar consumer, request embed=screenshot.url. Choose JSON when your workflow also needs dimensions, type, or size metadata.
const response = await fetch(
'https://api.microlink.io?url=https%3A%2F%2Fexample.in%2Fhindi-page&screenshot=true&meta=false'
)
if (!response.ok) throw new Error(`Microlink returned ${response.status}`)
const payload = await response.json()
const screenshotUrl = payload.data?.screenshot?.url
if (!screenshotUrl) throw new Error('Screenshot URL was not present in the response')
console.log(screenshotUrl)
Check current Microlink documentation for quotas, caching behavior, and plan details before estimating production usage; those details can change.
7. Troubleshoot common problems
| Symptom | Likely cause | What to do |
|---|---|---|
| The screenshot is in English | The site ignored Accept-Language, selects language through a route or cookie, or requires an in-page choice. |
Use the Hindi URL or language control, then wait for a Hindi-specific element. |
| The screenshot shows a shell or loading state | Navigation completed before the client rendered the page content. | Wait for a selector that appears with the Hindi content; use a delay only if no stable selector exists. |
| Some page sections are missing | Content may be lazy-loaded below the fold or exposed after interaction. | Use full-page capture and the documented scrolling or clicking controls as needed. |
| Devanagari appears as boxes or has broken marks | The captured page may not have access to a font with the required glyphs, or a fallback font may be used. | Make a suitable font reachable, set its family through supported style injection if needed, and inspect a fresh capture. |
| The response has no usable screenshot URL | The request may have failed, returned an error payload, or used a response mode different from the one your code expects. | Check the HTTP status and response body, confirm screenshot=true, and parse data.screenshot.url for JSON mode. |
| The request behaves differently with custom headers | Header forwarding may be restricted for the chosen workflow or plan; secret headers also need careful handling. | Review the current header guide and plan conditions. Keep tokens and cookies out of URLs and logs. |
8. Reliability, speed, and cost considerations
- Wait on a condition. A selector tied to the target content makes captures less dependent on network timing than an arbitrary sleep.
- Skip unneeded work. Microlink’s guide says
meta=falseskips metadata extraction and is usually the largest speedup when only the screenshot is needed. - Check the artifact. A successful HTTP response alone does not prove the desired language, complete page, or correct font rendered.
- Handle the response defensively. Validate HTTP status, parse the expected response mode, and treat a missing screenshot field as an error rather than constructing a guessed URL.
- Confirm current plan limits. This research does not establish current quotas or prices. Consult Microlink’s official documentation before planning volume or cost.
Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server for developers. A GET request takes a URL and returns an image or PDF. For a Hindi page, send the language header to the target when supported, and use the docs for the capture options:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.in/hindi-page -H 'Accept-Language: hi' -o shot.webp
See the ScreenshotNeo API documentation for configuration details. 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, and 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: hi translate a page?
No. It only requests Hindi from a site that supports language negotiation. Use the site’s own Hindi route or language control otherwise.
Does Microlink guarantee a Hindi font?
The reviewed documentation does not specify a Hindi-capable bundled font. Inspect the screenshot and make a suitable font available if glyphs are missing.
Should I use full-page capture for every Hindi page?
No. Use it when you need content below the initial viewport. A viewport capture is suitable for a visible-screen preview.
Can I use the screenshot directly in an image tag?
Microlink documents embed=screenshot.url for a direct image response. Use the default JSON response when you need the hosted URL and metadata in code.


