API Documentation

The URLPreview API allows you to retrieve clean, structured metadata for any public URL, including title, description, images, and favicon.

Base Endpoint

GET https://app.urlpreview.com/api/v1/preview

Authentication

You can authenticate in one of two ways:

Authorization: Bearer YOUR_API_KEY

You can find your API key in your dashboard after signing up.

Query Parameters

Example Request (Query)

curl "https://app.urlpreview.com/api/v1/preview?url=https://example.com&apiKey=YOUR_API_KEY"

Example Request (Bearer Token)

curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://app.urlpreview.com/api/v1/preview?url=https://example.com"

Example Response

{
    "url": "https://example.com",
    "title": "Example Domain",
    "description": "This domain is for use in illustrative examples in documents.",
    "image": "https://example.com/og-image.jpg",
    "favicon": "https://example.com/favicon.ico"
}

Usage Limits

Your plan determines your monthly quota:

Error Handling

On error, the API responds with a JSON object containing an error field.

{
    "error": "Invalid or unreachable URL"
}

Support

For help, contact us at support@urlpreview.com.