ForHosting KIT · Web Scraping & Monitoring

Link preview

Paste a link into a chat app and a rich card appears with a title, a summary and an image, almost instantly. This endpoint generates that same card data on demand for any URL you give it, so you can build the same experience into your own product without maintaining a scraper for every site's markup quirks.

● StablePer request + per URL$0.002
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.

The card behind every shared link

Whenever a link turns into a card with a headline, a short description and a thumbnail, some system had to read that page and pick out the right pieces. Messaging apps, forums, note-taking tools and CMS platforms all need the same thing when a user pastes a URL: enough of a preview to know what they're about to click, without leaving the app to find out, and without the awkward wait or blank card that shows up when that lookup is done poorly.

What gets extracted and how

Submit a URL and this endpoint fetches the page, reads Open Graph and Twitter Card tags where present, and falls back sensibly to the page title, meta description and a likely representative image when those specific tags are missing. The result comes back as a task_id first, then the preview data through a webhook or a signed link valid for 24 hours: title, description, image URL, and the site's own name when it's available.

Why Open Graph exists in the first place

Open Graph tags were introduced so that a page could describe itself once and have every platform that links to it render a consistent preview, instead of each site guessing independently. Not every page implements them well, or at all, which is exactly why a reliable fallback chain matters more than just reading the OG tags and hoping for the best, particularly on older sites, personal blogs and internal tools that were never built with social sharing in mind.

Where this saves real engineering time

Building a link preview feature from scratch means handling redirects, malformed meta tags, missing images, and pages that block naive scrapers, none of which is core to whatever product you're actually building. Calling this endpoint instead means your chat feature, your bookmarking tool or your content curation dashboard gets accurate previews without your team owning that maintenance burden long-term, freeing engineering time for the part of the product that's actually differentiated.

Chat and messaging apps

Show a rich preview card the moment a user pastes a link into a conversation, matching the experience of major messaging platforms.

Bookmarking and read-later tools

Populate a saved link with a title, thumbnail and description automatically instead of leaving it as a bare URL.

Content curation dashboards

Generate consistent preview cards for a roundup or newsletter that pulls in links from many different external sources.

CMS and page builder link blocks

Let editors drop in a URL and have the link block auto-fill with the right title, image and description.

How does the link preview API work?

Send a POST request to /web/link-preview with a URL; you get a task_id right away and the preview data (title, description, image) arrives by webhook or a signed link once it's ready.

Is the link preview API free?

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.

Does it read Open Graph and Twitter Card tags?

Yes, it reads Open Graph and Twitter Card metadata first and falls back to the page title, meta description and a likely image when those tags are missing or incomplete.

What if a page has no preview image at all?

The image field is returned empty rather than guessed at randomly, so your interface can decide how to display a link with no available thumbnail.

Can I generate previews in bulk for many URLs?

Yes, submit multiple requests and let the webhook collect each result as it completes, which works well for populating a batch of saved links or a content feed.

How is this different from just reading meta tags myself?

It handles the fallback logic, redirect following and inconsistent tag implementations across real-world sites, so you get one clean structure regardless of how the source page is built.

How do I receive the preview data?

Choose a signed webhook for automatic delivery, or fetch the result from a signed link that stays valid for 24 hours after the task completes.

Is the page content kept after the preview is generated?

No, data is deleted after the retention window and is never used to train any model.

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/link-preview

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/link-preview \
  -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.link_preview",
  "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.002

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.

Read the full KIT documentation →