Is available

An endpoint to check whether preview for a given link is available.

This is useful to store as a flag on your database to be able to load your frontend layout taking this into consideration, instead of waiting for the response real-time.

  • Method: POST
  • Accepts: JSON
  • Returns: JSON

Endpoint

https://api.peekalink.io/is-available/

Sample code

import requests

response = requests.post(
    "https://api.peekalink.io/is-available",
    headers={"X-API-Key": "YourSecretKey"},
    data={"link": "https://bit.ly/3frD2OP"},
)

Sample response

{
  "isAvailable": true
}

Response attributes

isAvailable

Whether a link preview is available for the given link.

Type

boolean

Example

{
  // ...
  "isAvailable": true
  // ...
}