API 07 · Runs on Vercel
Link Preview
Fetches a page with robots.txt respected and returns normalised preview metadata with absolute URLs, plus Open Graph, Twitter card and article meta tags.
GET https://dev.itsozy.lol/api/v1/previewRuns on Vercel. Fully served by the Rust function on Vercel.
Authentication
Send Authorization: Bearer ozy_… with an API key that includes the preview permission (or *). Signed-in dashboard sessions work in the playground. Each call costs 1 unit.
Parameters
| Name | Type | Description | |
|---|---|---|---|
url | query string | required | Public http(s) URL |
Example request
curl "https://dev.itsozy.lol/api/v1/preview?url=https://github.com" \
-H "Authorization: Bearer $OZY_KEY"
Example response (illustrative)
{
"metadata": {
"canonical_url": "https://github.com/",
"description": "…",
"favicon": "https://github.githubassets.com/favicons/favicon.svg",
"image": "https://github.githubassets.com/…png",
"language": "en",
"site_name": "GitHub",
"title": "GitHub"
},
"public_metadata": {
"og:type": "object"
},
"status": 200,
"url": "https://github.com/"
}
Errors
Errors use one envelope: {"error": {"code": "…", "message": "…"}}.
| Status | Code | Meaning |
|---|---|---|
| 403 | destination_blocked | URL resolves to a private, loopback, metadata or non-standard-port destination |
| 403 | robots_denied | The site's robots.txt disallows OzyScrape |
| 413 | response_too_large | Upstream response exceeded 2 MiB |
| 429 | domain_rate_limited | Wait one second between requests to the same host |
| 502 | upstream_failed | The site could not be reached |
| 504 | upstream_timeout | The site did not respond in time |
| 400 | invalid_input | A parameter is missing or invalid |
| 401 | unauthorized | No valid API key or session |
| 403 | permission_denied | The key does not include this API's permission |
| 429 | quota_exceeded | Free-tier quota reached (20 units/min, 100 units/day) |
| 503 | database_unavailable | Persistent storage is temporarily unavailable |
Rate limits
20 units per minute and 100 units per day per account; outbound fetches to the same host are spaced at least one second apart. Exceeding a limit returns 429.