apyhub

Generate Link Preview API

Hosted on ApyHub

What it does

Link Preview fetches a URL and returns the metadata you need to build a rich preview card. Send a URL, and Link Preview returns the page title, description, images, videos, favicons, site name, media type, and content type when available.

Use it when you need to render previews for shared links, build bookmark collections, or show a summary before a user opens a page. If the URL is missing a protocol, Link Preview prepends http:// automatically. You can also set a custom user_agent, accept_language, and allow_redirects to match your crawler or app behavior.

For security-sensitive workflows, secure_mode checks the URL against a malicious-URL database before fetching. When that flag is enabled, the response includes reported_malicious for clean URLs, and malicious URLs return the detected threat instead of preview metadata. You can also choose whether image metadata should come from og or twitter tags with images_property_type.

tags: link-preview, open-graph, metadata-extraction, web-scraping, url-safety

▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.