Prism Endpoint:
Link Preview
Usage
Description
The link preview endpoint allows you to easily extract a URL's metadata like its title, description, and cover image to help you generate rich link previews.
Method & Path
Use https://prism.optical-labs.ca/web/link-preview to access this endpoint. The method must be POST and the header should contain your secret API key, as shown below:
Body Fields
| Field Name | Type | Description |
|---|---|---|
| url | String (required) | URL with a length between 1 and 2048 characters |
Valid Response
Each successful request to this endpoint costs 1 credit. Your usage and remaining credits are always returned in the meta object of the response.
Interactive Preview
Send a real request to the endpoint for free, directly from your browser!
Examples
Basic Request
Request With Null Fields
Fields are not guaranteed to return a value. Some URLs just won't have the requested content:
Redirected Request
If the provided URL initiates a redirect, the endpoint will automatically follow it. As a result, the final URL might not match the initial input: