Skip to main content
POST
Get a link preview
curl --request POST \
  --url https://api.peekalink.io/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "link": "<string>",
  "source": "API",
  "forceNewSnapshot": "true",
  "forceNewSnapshotRecursive": "true"
}
'
{
  "id": 123,
  "ok": true,
  "updatedAt": "2023-11-07T05:31:56Z",
  "url": "<string>",
  "domain": "<string>",
  "type": "UNKNOWN",
  "status": 123,
  "redirected": true,
  "requestId": "<string>",
  "size": 123,
  "redirectionUrl": "<string>",
  "redirectionCount": 123,
  "redirectionTrail": [
    "<string>"
  ],
  "title": "<string>",
  "description": "<string>",
  "language": "<string>",
  "text": {
    "size": 123,
    "estimatedReadingTime": 123,
    "rawTextUrl": "<string>"
  },
  "page": {
    "estimatedReadingTimeInMinutes": 123,
    "htmlUrl": "<string>",
    "markdownUrl": "<string>",
    "rawTextUrl": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

accept-language
string

The language of the user

Body

Request to generate a link preview

source
enum<string>
default:API

Source of the link preview request

Available options:
API,
WEB
forceNewSnapshot
enum<string>
default:true

Only available to enterprise customers working on integrations. Every link is guaranteed fresh, this is just for debugging timing issues.

Available options:
true,
false
forceNewSnapshotRecursive
enum<string>
default:true

Only available to enterprise customers working on integrations. Every link is guaranteed fresh, this is just for debugging timing issues.

Available options:
true,
false

Response

Successfully retrieved link preview

Complete information about a link and its associated content

id
number
required

Unique identifier for the link

ok
boolean
required

Whether the link is valid

updatedAt
string<date-time>
required

Last update timestamp

url
string
required

Original URL

domain
string
required

Domain name from the URL

type
enum<string>
default:UNKNOWN
required

Type of content the link represents

Available options:
UNKNOWN,
IMAGE,
VIDEO,
AUDIO,
DOCUMENT,
TEXT,
PAGE,
YOUTUBE_USER,
X_USER,
X_POST,
INSTAGRAM_USER,
INSTAGRAM_POST,
YOUTUBE_VIDEO,
AMAZON_PRODUCT,
ETSY_PRODUCT,
REDDIT_USER,
REDDIT_POST,
REDDIT_SUBREDDIT,
TIKTOK_USER,
TIKTOK_VIDEO,
GITHUB_REPOSITORY
status
number
required

HTTP status code

redirected
boolean
required

Whether the URL was redirected

requestId
string

Optional identifier for tracking the request

size
number

Content size in bytes

redirectionUrl
string

Final URL after redirects

redirectionCount
number

Number of redirects

redirectionTrail
string[]

Redirect URL

title
string

Page title (only missing when ok: false)

description
string

Page description (only missing when ok: false)

language
string

Content language code

icon
object

Information about a website icon/favicon

image
object

Collection of differently sized versions of an image

video
object

Detailed information about a video file

audio
object

Detailed information about an audio file

document
object

Detailed information about a document

text
object

Information about plain text content

page
object

Information about a web page

youtubeVideo
object

Information about a YouTube video

youtubeUser
object

Information about a YouTube channel

xUser
object

Information about an X (formerly Twitter) user

xPost
object

Information about an X (formerly Twitter) post

instagramUser
object

Information about an Instagram user

instagramPost
object

Information about an Instagram post

amazonProduct
object

Information about an Amazon product

etsyProduct
object

Information about an Etsy product

tiktokUser
object

Information about a TikTok user

tiktokVideo
object

Information about a TikTok video

redditUser
object

Information about a Reddit user

redditSubreddit
object

Information about a Reddit subreddit

redditPost
object

Information about a Reddit post

githubRepository
object

Detailed information about a GitHub repository