microlink logo

Turn spotify.com into structured data

Microlink SDK

Make your content attractive

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

iframe

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

module.exports = props => {

  const { status, data } = await mql('https://open.spotify.com/track/1W2919zs8SBCLTrOB1ftQT', {
    video: true,
    audio:true,
    palette: true,
    iframe: true,
    ...props
  })
}

large

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

module.exports = props => {

  const { status, data } = await mql('https://open.spotify.com/track/1W2919zs8SBCLTrOB1ftQT', {
    video: true,
    audio:true,
    palette: true,
    iframe: true,
    ...props
  })
}

normal

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

module.exports = props => {

  const { status, data } = await mql('https://open.spotify.com/track/1W2919zs8SBCLTrOB1ftQT', {
    video: true,
    audio:true,
    palette: true,
    iframe: true,
    ...props
  })
}

small

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

module.exports = props => {

  const { status, data } = await mql('https://open.spotify.com/track/1W2919zs8SBCLTrOB1ftQT', {
    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://open.spotify.com/track/1W2919zs8SBCLTrOB1ftQT', {
    video: true,
    audio:true,
    palette: true,
    iframe: true,
    ...props
  })
}

Using Microlink CLI (docs)

$ microlink-api https://open.spotify.com/track/1W2919zs8SBCLTrOB1ftQT
{
  "title": "Format",
  "description": "Format, a song by _91nova on Spotify",
  "lang": "en",
  "author": "_91nova",
  "publisher": "Spotify",
  "image": {
    "url": "https://cdn.microlink.io/data/assets/open.spotify.com!track!1W2919zs8SBCLTrOB1ftQT/i.scdn.co!image!ab67616d0000b27351b9595d03c3a8fb3ffe9f1a.jpg",
    "type": "jpg",
    "size": 88064,
    "height": 640,
    "width": 640,
    "size_pretty": "88.1 kB",
    "palette": [
      "#BB437F",
      "#DB9DBC",
      "#642444",
      "#816694",
      "#B8B6B8",
      "#4C2F2C"
    ],
    "background_color": "#BB437F",
    "color": "#FFFFFF",
    "alternative_color": "#060204"
  },
  "audio": {
    "url": "https://cdn.microlink.io/data/assets/open.spotify.com!track!1W2919zs8SBCLTrOB1ftQT/p.scdn.co!mp3-preview!f36438afe87418f2dc0b7497eb5e7e5fa89e6bf8!cid=6313d40896f64a2ead4f67035049a647.",
    "type": "mp3",
    "duration": 30.040816,
    "size": 362861,
    "duration_pretty": "30s",
    "size_pretty": "363 kB"
  },
  "url": "https://open.spotify.com/track/1W2919zs8SBCLTrOB1ftQT",
  "iframe": {
    "html": "<iframe width=\"300\" height=\"380\" allowtransparency=\"true\" frameborder=\"0\" allow=\"encrypted-media\" title=\"Spotify Embed: Format\" src=\"https://open.spotify.com/embed/track/1W2919zs8SBCLTrOB1ftQT?si=4PcqgjH5RlWCvB5q4ukdnw\"></iframe>",
    "scripts": []
  },
  "date": "2020-01-11T10:43:49.000Z",
  "logo": {
    "url": "https://cdn.microlink.io/data/assets/open.spotify.com!track!1W2919zs8SBCLTrOB1ftQT/logo.clearbit.com!spotify.com.png",
    "type": "png",
    "size": 12871,
    "height": 128,
    "width": 128,
    "size_pretty": "12.9 kB",
    "palette": [
      "#1CD464",
      "#8CECAC",
      "#0F7537",
      "#11873F",
      "#F9FCFA",
      "#11873F"
    ],
    "background_color": "#8CECAC",
    "color": "#0E6C33",
    "alternative_color": "#0D6830"
  },
  "video": null,
  "screenshot": {
    "url": "https://cdn.microlink.io/screenshot/spotify.png"
  }
}