microlink logo

Turn reddit.com into structured data

Microlink SDK

Make your content attractive

Microlink SDK converts reddit.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.reddit.com/r/news/comments/8vebjp/lebron_james_takes_154_million_4year_deal_with/', {
    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.reddit.com/r/news/comments/8vebjp/lebron_james_takes_154_million_4year_deal_with/', {
    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.reddit.com/r/news/comments/8vebjp/lebron_james_takes_154_million_4year_deal_with/', {
    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.reddit.com/r/news/comments/8vebjp/lebron_james_takes_154_million_4year_deal_with/', {
    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.reddit.com/r/news/comments/8vebjp/lebron_james_takes_154_million_4year_deal_with/', {
    video: true,
    audio:true,
    palette: true,
    iframe: true,
    ...props
  })
}

Using Microlink CLI (docs)

$ microlink-api https://www.reddit.com/r/news/comments/8vebjp/lebron_james_takes_154_million_4year_deal_with/
{
  "title": "r/news - Lebron James takes $154 million, 4-year deal with the Lakers.",
  "description": "31,942 votes and 2,919 comments so far on Reddit",
  "lang": "en",
  "author": "GenericExcuseActivat",
  "publisher": "reddit",
  "image": {
    "url": "https://cdn.microlink.io/data/assets/reddit.com!r!news!comments!8vebjp!lebron_james_takes_154_million_4year_deal_with/external-preview.redd.it!a58Gnm70LVaSdOJ1ioZ5gVw7LkHLYEYwgH69LnvPsUA.jpg!auto=webp&s=4d35dbe9999fb3f",
    "type": "jpg",
    "size": 158057,
    "height": 729,
    "width": 1296,
    "size_pretty": "158 kB",
    "palette": [
      "#D02E21",
      "#ECBC74",
      "#6B0C08",
      "#93725B",
      "#D7C3AD",
      "#56352E"
    ],
    "background_color": "#D02E21",
    "color": "#FBF1E1",
    "alternative_color": "#060100"
  },
  "audio": null,
  "url": "https://www.reddit.com/r/news/comments/8vebjp/lebron_james_takes_154_million_4year_deal_with/",
  "iframe": {
    "html": "\n    <blockquote class=\"reddit-card\" >\n      <a href=\"https://www.reddit.com/r/news/comments/8vebjp/lebron_james_takes_154_million_4year_deal_with/?ref_source=embed&amp;ref=share\">Lebron James takes $154 million, 4-year deal with the Lakers.</a> from\n      <a href=\"https://www.reddit.com/r/news/\">news</a>\n    </blockquote>\n    <script async src=\"https://embed.redditmedia.com/widgets/platform.js\" charset=\"UTF-8\"></script>\n",
    "scripts": [
      {
        "async": true,
        "src": "https://embed.redditmedia.com/widgets/platform.js",
        "charset": "UTF-8"
      }
    ]
  },
  "date": "2020-01-11T10:43:42.000Z",
  "logo": {
    "url": "https://cdn.microlink.io/data/assets/reddit.com!r!news!comments!8vebjp!lebron_james_takes_154_million_4year_deal_with/logo.clearbit.com!reddit.com.png",
    "type": "png",
    "size": 8225,
    "height": 128,
    "width": 128,
    "size_pretty": "8.22 kB",
    "palette": [
      "#FC4404",
      "#FC9C7C",
      "#832201",
      "#972801",
      "#952703",
      "#972801"
    ],
    "background_color": "#FC4404",
    "color": "#411100",
    "alternative_color": "#421101"
  },
  "video": {
    "url": "https://cdn.microlink.io/data/assets/reddit.com!r!news!comments!8vebjp!lebron_james_takes_154_million_4year_deal_with/media.video-origin.espn.com!espnvideo!2018!0701!dm_180701_nba_mcmenamin_on_lebron_deal!dm_180701_nba",
    "type": "mp4",
    "duration": 127.552,
    "size": 162819545,
    "height": 720,
    "width": 1280,
    "duration_pretty": "2m",
    "size_pretty": "163 MB"
  },
  "screenshot": {
    "url": "https://cdn.microlink.io/screenshot/reddit.png"
  }
}