API Documentation

Base URL: https://linkpeek-api.linkpeek.workers.dev

Authentication

All preview endpoints require an API key. Pass it via any of:

Endpoints

POST /v1/register

Create a free API key.

Request body (JSON):

{ "email": "you@example.com" }

Response:

{
  "api_key": "lp_aBcDeFgHiJkLmNoPqRsTuVwXyZ012345",
  "plan": "free",
  "daily_limit": 100,
  "message": "Save your API key - it cannot be recovered."
}
Rate limit: 5 registrations per IP per hour.

GET /v1/preview

Extract metadata from a URL.

ParameterTypeDescription
urlstring (required)The URL to preview
keystring (required)Your API key

Response:

{
  "url": "https://github.com",
  "title": "GitHub: Let's build from here",
  "description": "GitHub is where over 100 million developers...",
  "image": "https://github.githubassets.com/assets/social.png",
  "site_name": "GitHub",
  "favicon": "https://github.githubassets.com/favicons/favicon.svg",
  "type": "website"
}

Response headers:

HeaderDescription
X-CacheHIT or MISS
X-RateLimit-LimitYour daily request limit
X-RateLimit-RemainingRequests remaining today
X-RateLimit-ResetWhen the limit resets (ISO 8601)

GET /v1/preview/image

Generate an SVG preview card from a URL.

ParameterTypeDescription
urlstring (required)The URL to preview
keystring (required)Your API key

Response: SVG image (Content-Type: image/svg+xml)

Embed directly:

<img src="https://linkpeek-api.linkpeek.workers.dev/v1/preview/image?url=https://github.com&key=YOUR_KEY" />

GET /v1/usage

Check your usage statistics.

{
  "plan": "free",
  "daily_limit": 100,
  "today": 42,
  "total": 1337
}

GET /health

Health check endpoint. No authentication required.

Error Codes

StatusMeaning
400Bad request (missing or invalid parameters)
401API key not provided
403Invalid API key
429Rate limit exceeded
502Failed to fetch target URL

Rate Limits

PlanRequests/dayPrice
Free100$0
Pro5,000$9/mo
Business50,000$29/mo

LinkPeek API v1.1 · Powered by Cloudflare Workers