Method: POST
Content Type: application/json
Request Body
| Parameter | Type | Mandatory | Description |
|---|
| url | String | Yes | The URL of the webpage. |
| images_property_type | “og” or “twitter” | No | Fetches images only with the specific property. |
| user_agent | String | No | The User-Agent header value of the HTTP request. (ex: user_agent: "google-bot"). |
| accept_language | String | No | The Accept-Language header value of the HTTP request. (ex: accept_language: "en-US"). |
| allow_redirects | Boolean | No (defaults to false) | Allow redirects (max 1), e.g. https://google.com/ → https://www.google.com/ |
| secure_mode | Boolean | No (defaults to true) | When enabled (by default), the API checks if the URL is reported as malicious, returning the threat as a string if found. Recommended for user safety. |
For more information on user_agent value and accept_language value, you can refer to the following resources:
Response
| Attribute | Type | Description |
|---|
| url | String | Provid the URL of the webpage. |
| title | String | The title of the webpage. |
| siteName | String | The name of the website. |
| description | String | The description of the webpage. |
| mediaType | String | The media type of the webpage. |
| contentType | String | The content type of the webpage. |
| images | Array of Strings | The URLs of the images associated with the webpage. |
| videos | Array of Strings | The URLs of the videos associated with the webpage. |
| favicons | Array of Strings | The URLs of the favicons associated with the webpage. |
| reported_malicious | Boolean | A boolean indicating whether the URL has been reported as malicious. This attribute is only included if the secure_mode parameter is set to true. |
Sample Response 1
If the secure_mode parameter is set to true and the URL has been reported as malicious, the API will not fetch any link-preview metadata. Instead, it will return a JSON object with the reported_malicious boolean set to "true" and the "threat" attribute indicating the type of threat associated with the URL.
Sample Response 2
HTTP Response Codes
The method may return one of the following HTTP status codes:
| Status Code | Description |
|---|
| 200 | The request was successful. |
| 400 | The request was invalid or could not be understood by the server. |
| 401 | Required authentication information is either missing or not valid for the resource. |
| 408 | The server timed out waiting for the request. (5000ms) |
| 500 | If any unexpected error occurs while processing the request. |