microlink logo

Turn twitter.com into structured data

Microlink SDK

Make your content attractive

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

iframe

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

module.exports = props => {

  const { status, data } = await mql('https://twitter.com/futurism/status/882987478541533189', {
    video: true,
    audio:true,
    palette: true,
    iframe: true,
    ...props
  })
}

large

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

module.exports = props => {

  const { status, data } = await mql('https://twitter.com/futurism/status/882987478541533189', {
    video: true,
    audio:true,
    palette: true,
    iframe: true,
    ...props
  })
}

normal

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

module.exports = props => {

  const { status, data } = await mql('https://twitter.com/futurism/status/882987478541533189', {
    video: true,
    audio:true,
    palette: true,
    iframe: true,
    ...props
  })
}

small

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

module.exports = props => {

  const { status, data } = await mql('https://twitter.com/futurism/status/882987478541533189', {
    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://twitter.com/futurism/status/882987478541533189', {
    video: true,
    audio:true,
    palette: true,
    iframe: true,
    ...props
  })
}

Using Microlink CLI (docs)

$ microlink-api https://twitter.com/futurism/status/882987478541533189
{
  "title": "Futurism on Twitter",
  "description": "“These tires can even climb stairs https://t.co/ymr4KK15oI”",
  "lang": "en",
  "author": "futurism",
  "publisher": "Twitter",
  "image": {
    "url": "https://cdn.microlink.io/data/assets/twitter.com!futurism!status!882987478541533189/pbs.twimg.com!amplify_video_thumb!882986340605939712!img!k-NlEfo7z0Xvo9ab.jpg.jpg",
    "type": "jpg",
    "size": 65630,
    "height": 720,
    "width": 720,
    "size_pretty": "65.6 kB",
    "palette": [
      "#4CACFC",
      "#44ACFA",
      "#040D14",
      "#6E91B8",
      "#BFC2C6",
      "#3D3D48"
    ],
    "background_color": "#040D14",
    "color": "#44ACFA",
    "alternative_color": "#4CACFC"
  },
  "audio": null,
  "url": "https://twitter.com/futurism/status/882987478541533189",
  "iframe": {
    "html": "<blockquote class=\"twitter-tweet\"><p lang=\"en\" dir=\"ltr\">These tires can even climb stairs <a href=\"https://t.co/ymr4KK15oI\">pic.twitter.com/ymr4KK15oI</a></p>&mdash; Futurism (@futurism) <a href=\"https://twitter.com/futurism/status/882987478541533189?ref_src=twsrc%5Etfw\">July 6, 2017</a></blockquote>\n<script async src=\"https://platform.twitter.com/widgets.js\" charset=\"utf-8\"></script>\n",
    "scripts": [
      {
        "async": true,
        "src": "https://platform.twitter.com/widgets.js",
        "charset": "utf-8"
      }
    ]
  },
  "date": "2020-01-11T10:44:53.000Z",
  "logo": {
    "url": "https://cdn.microlink.io/data/assets/twitter.com!futurism!status!882987478541533189/logo.clearbit.com!twitter.com.png",
    "type": "png",
    "size": 2089,
    "height": 128,
    "width": 128,
    "size_pretty": "2.09 kB",
    "palette": [
      "#1CA4F4",
      "#8CD4FC",
      "#06517E",
      "#075E91",
      "#036195",
      "#075E91"
    ],
    "background_color": "#1CA4F4",
    "color": "#02324D",
    "alternative_color": "#04334E"
  },
  "video": {
    "url": "https://cdn.microlink.io/data/assets/twitter.com!futurism!status!882987478541533189/video.twimg.com!amplify_video!882986340605939712!vid!720x720!1Vn9i-z2JFABEmiN.mp4.mp4",
    "type": "mp4",
    "duration": 83.264,
    "size": 13319166,
    "height": 720,
    "width": 720,
    "duration_pretty": "1m",
    "size_pretty": "13.3 MB"
  },
  "screenshot": {
    "url": "https://cdn.microlink.io/screenshot/twitter.png"
  }
}