Link Preview – Documentation


SIMPLE API REQUEST:

http://api.linkpreview.net/?q=https://www.google.com/

 

JSON RESPONSE:

{
“title”:”Google”,
“description”:”Search webpages, images, videos and more.”,
“image”:”https:\/\/www.google.com\/images\/logo.png”,
“url”:”https:\/\/www.google.com\/”
}

 

API REQUEST WITH A KEY:

http://api.linkpreview.net/?key=123456&q=https://www.google.com/

 

JAVASCRIPT SAMPLE CODE:

var target = ‘https://www.google.com’;
// cross-origin request
$.ajax({
url: “http://api.linkpreview.net”,
dataType: ‘jsonp’,
data: {q: target},
success: function (answer) {
console.log(answer);
}
});

 

Recent Posts

Contact