ForHosting KIT · Web Scraping & Monitoring

Screenshot one element

Sometimes the only thing worth capturing is one chart, one pricing card, one embed widget — not the header, not the footer, not the ads around it. This endpoint targets a single CSS selector and returns exactly that element, cropped precisely, nothing extraneous included.

● StablePer request + per URL$0.040
Use it from WebAPIEmailApp soonTelegram soon

Run this on our servers with your account. Free tools run in your browser; this one bills your KIT balance per the price above.

When the whole page is noise

A full-page or viewport screenshot is the wrong tool the moment you only care about one piece of a page: a live stock ticker widget, a single product card in a grid of forty, a chart embedded halfway down a dashboard. Cropping a full screenshot after the fact is fragile — it breaks the moment the layout shifts a pixel — while targeting the element directly at capture time stays accurate no matter what surrounds it.

How targeting works

Send POST /web/screenshot-element with a URL and a CSS selector, and the task loads the page, locates the matching element in the rendered DOM, waits for it to finish rendering, and captures only its bounding box — no header, no sidebar, no unrelated whitespace. It's asynchronous like every task here: an immediate task_id, and the final image delivered by signed webhook or a signed link valid for 24 hours.

Why selector-based capture is the reliable approach

CSS selectors have identified page elements since the earliest days of styled HTML, and that same addressing scheme turns out to be the most durable way to target a screenshot — far more reliable than fixed pixel coordinates, which break the instant a page's layout changes, an ad loads, or a cookie banner shifts everything down by forty pixels. Selector-based capture keeps working as long as the element's class or id stays intact, which is usually far longer than any fixed coordinate survives a redesign.

What it gets used for

Embed and widget providers generating a preview thumbnail of exactly their widget, without the host page's chrome around it, price-monitoring tools capturing just a competitor's price element on a schedule, dashboard tools archiving a single chart's rendered state at a point in time, and QA teams verifying that one specific component — a button, a banner, a form — renders correctly after a change without reviewing the whole page.

Built for repeated, targeted checks

At a $0.040 base per request plus $0.001 per URL, capturing the same selector on a schedule — hourly, daily, after every deploy — stays affordable enough to automate without a second thought. A failed capture, whether the selector doesn't match or the page times out, is never billed; the task retries three times automatically and then returns a clear, specific error so a broken selector doesn't fail silently in a monitoring pipeline.

Widget preview thumbnails

An embeddable widget provider generates a clean preview image of just the widget for its own marketing site, with none of the host page around it.

Competitor price monitoring

A pricing tool captures just the price element on a competitor's product page on a schedule, ignoring the rest of the page entirely.

Dashboard chart archiving

An analytics tool saves a visual snapshot of a single chart element at the end of each reporting period for historical reference.

Component-level QA

A QA process captures one specific UI component after a code change to confirm it renders correctly without reviewing the full page manually.

How does the element screenshot API know what to capture?

You provide a CSS selector along with the URL, and the task locates that exact element in the rendered page and captures only its bounding box.

What if my selector matches multiple elements?

The task targets the matching element found on the rendered page; for predictable results, use a selector specific enough to identify a single element, such as an id.

Is there a free tier?

There's no free tier — free tiers get abused and slow everyone down. Access runs on a prepaid ForHosting KIT balance: top up from $10.00 (it never expires) and each request is charged at its published price, so a call with no balance returns HTTP 402. No subscription, no tokens, no invented credits, and a failed task is never charged.

How is pricing structured?

A $0.040 base per request plus $0.001 per URL, published and predictable for scheduling recurring captures.

Can I monitor the same element over time?

Yes, scheduling repeated requests against the same URL and selector is a common pattern for price or content monitoring.

Does it wait for the element to finish rendering?

Yes, the task waits for the targeted element to finish rendering before capturing it, which matters for elements that load asynchronously.

How do I get the image back?

Through a signed webhook when the task completes, or a signed link that stays valid for 24 hours.

What happens if the selector doesn't match anything?

The task retries up to three times and then returns a clear error rather than failing silently; you are never charged for a failed capture.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/web/screenshot-element

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, and soon from our app, email and Telegram.

curl -X POST https://api.kit.forhosting.com/web/screenshot-element \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://ejemplo.com"}'
{
  "url": "https://ejemplo.com"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "web.screenshot_element",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.040
Per URL$0.001

Published price — no tokens, no invented credits. A failed task is never charged.

timeout_sec30
max_crawl_pages25
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.
422task_failedThe task failed after 3 retries. You are never charged for it.

Read the full KIT documentation →