microlink logo

Turn facebook.com into structured data

Microlink SDK

Make your content attractive

Microlink SDK converts facebook.com links into beautiful previews, engaging better your links.

iframe

const mql = require('@microlink/mql')

module.exports = props => {

  const { status, data } = await mql('https://www.facebook.com/natgeo/videos/10156364216738951/', {
    video: true,
    audio:true,
    palette: true,
    iframe: true,
    ...props
  })
}

large

const mql = require('@microlink/mql')

module.exports = props => {

  const { status, data } = await mql('https://www.facebook.com/natgeo/videos/10156364216738951/', {
    video: true,
    audio:true,
    palette: true,
    iframe: true,
    ...props
  })
}

normal

const mql = require('@microlink/mql')

module.exports = props => {

  const { status, data } = await mql('https://www.facebook.com/natgeo/videos/10156364216738951/', {
    video: true,
    audio:true,
    palette: true,
    iframe: true,
    ...props
  })
}

small

const mql = require('@microlink/mql')

module.exports = props => {

  const { status, data } = await mql('https://www.facebook.com/natgeo/videos/10156364216738951/', {
    video: true,
    audio:true,
    palette: true,
    iframe: true,
    ...props
  })
}

Features

Capabilities under the hood.

  • Background Refresh
    Stale revalidation, keeping things fresh and always up to date via ttl, reflecting any change on the target URL.
  • Unified Metadata
    Normalized from Open Graph, JSON+LD or HTML markup, such as author, images, colors, dates, lang, etc.
  • Caching Level
    Using Microlink CDN to deliver a different resource each time the query string changes.
  • Color Detection
    Get predominant and complementary colors per every image detected.
  • Contextual Data
    Get more from any data, expanding it to get extra useful information.
  • Media Detection
    Get the original source of any image, video or audio.
  • Native Embeds
    Using oEmbed to get the embedded representation of any URL.
  • Prerender Ready
    Cloud based solution with superior operational performance.
  • Cloud Browsing
    Fast, scalable, and reliable browser automation.
  • Background Refresh
    Stale revalidation, keeping things fresh and always up to date via ttl, reflecting any change on the target URL.
  • Unified Metadata
    Normalized from Open Graph, JSON+LD or HTML markup, such as author, images, colors, dates, lang, etc.
  • Caching Level
    Using Microlink CDN to deliver a different resource each time the query string changes.
  • Color Detection
    Get predominant and complementary colors per every image detected.
  • Contextual Data
    Get more from any data, expanding it to get extra useful information.
  • Media Detection
    Get the original source of any image, video or audio.
  • Native Embeds
    Using oEmbed to get the embedded representation of any URL.
  • Prerender Ready
    Cloud based solution with superior operational performance.
  • Cloud Browsing
    Fast, scalable, and reliable browser automation.

Microlink API

Build APIs from websites

Microlink Query Language (MQL) is a programmatic way to getting content from any URL.

Using MQL (docs)

const mql = require('@microlink/mql')

module.exports = props => {

  const { status, data } = await mql('https://www.facebook.com/natgeo/videos/10156364216738951/', {
    video: true,
    audio:true,
    palette: true,
    iframe: true,
    ...props
  })
}

Using Microlink CLI (docs)

$ microlink-api https://www.facebook.com/natgeo/videos/10156364216738951/
{
  "title": "Meditative Snow Monkeys",
  "description": "Enjoy a moment of Zen with Japanese macaques (or snow monkeys) as they soak in natural hot springs.",
  "lang": "en",
  "author": "National Geographic",
  "publisher": "National Geographic",
  "image": {
    "url": "https://cdn.microlink.io/data/assets/facebook.com!natgeo!videos!10156364216738951/scontent-mad1-1.xx.fbcdn.net!v!t15.5256-10!p200x200!14694173_10154032640148951_491265175429578752_n.",
    "type": "jpg",
    "size": 9664,
    "height": 200,
    "width": 355,
    "size_pretty": "9.66 kB",
    "palette": [
      "#6C84C4",
      "#A4C4FB",
      "#25355E",
      "#747EA1",
      "#90A0C6",
      "#3C4C6F"
    ],
    "background_color": "#6C84C4",
    "color": "#FFFFFF",
    "alternative_color": "#151E35"
  },
  "audio": {
    "url": "https://cdn.microlink.io/data/assets/facebook.com!natgeo!videos!10156364216738951/video-mad1-1.xx.fbcdn.net!v!t42.1790-2!14848314_10154032640858951_3482997269060386816_n.mp4!_nc_cat=",
    "type": "mp4",
    "duration": 59.765351,
    "size": 367340,
    "duration_pretty": "60s",
    "size_pretty": "367 kB"
  },
  "url": "https://www.facebook.com/natgeo/videos/10156364216738951/",
  "iframe": {
    "html": "<div id=\"fb-root\"></div>\n<script async=\"1\" defer=\"1\" crossorigin=\"anonymous\" src=\"https://connect.facebook.net/es_ES/sdk.js#xfbml=1&amp;version=v5.0\"></script><div class=\"fb-post\" data-href=\"https://www.facebook.com/natgeo/videos/10156364216738951/\" data-width=\"552\"><blockquote cite=\"https://www.facebook.com/natgeo/videos/10156364216738951/\" class=\"fb-xfbml-parse-ignore\"><p>Enjoy a moment of Zen with Japanese macaques (or snow monkeys) as they soak in natural hot springs.</p>Publicada por <a href=\"https://www.facebook.com/natgeo/\">National Geographic</a> en&nbsp;<a href=\"https://www.facebook.com/natgeo/videos/10156364216738951/\">Domingo, 14 de abril de 2019</a></blockquote></div>",
    "scripts": [
      {
        "async": true,
        "defer": true,
        "crossorigin": "anonymous",
        "src": "https://connect.facebook.net/es_ES/sdk.js#xfbml=1&amp;version=v5.0"
      }
    ]
  },
  "date": "2020-01-11T10:42:47.000Z",
  "logo": {
    "url": "https://cdn.microlink.io/data/assets/facebook.com!natgeo!videos!10156364216738951/scontent-mad1-1.xx.fbcdn.net!v!t1.0-1!p200x200!46151680_10156035001403951_3944974607232008192_o.jpg!",
    "type": "jpg",
    "size": 3440,
    "height": 200,
    "width": 200,
    "size_pretty": "3.44 kB",
    "palette": [
      "#FCD404",
      "#FDE87B",
      "#746414",
      "#977F01",
      "#977F01",
      "#040404"
    ],
    "background_color": "#FDE87B",
    "color": "#7A6701",
    "alternative_color": "#736101"
  },
  "video": {
    "url": "https://cdn.microlink.io/data/assets/facebook.com!natgeo!videos!10156364216738951/video-mad1-1.xx.fbcdn.net!v!t42.1790-2!14854183_175888539534834_2965041070909423616_n.mp4!_nc_cat=10",
    "type": "mp4",
    "duration": 59.766,
    "size": 1195571,
    "height": 224,
    "width": 400,
    "duration_pretty": "60s",
    "size_pretty": "1.2 MB"
  },
  "screenshot": {
    "url": "https://cdn.microlink.io/screenshot/facebook.png"
  }
}