Skip to content

Collections

The collection methods sweep a page and return every matching resource as a deduplicated array of absolute URLs. Use selectorAll to scope the sweep to a region of the page.
Matching hrefs as absolute, deduped URLs:
const links = await microlink.links('https://example.com', {
  selectorAll: 'nav a'
})

Images

Image assets collected from the page:
const images = await microlink.images('https://example.com')

Videos

Video sources collected from the page:
const videos = await microlink.videos('https://example.com')

Audios

Audio sources collected from the page:
const audios = await microlink.audios('https://example.com')

Emails

Addresses found in mailto: links and plain text:
const emails = await microlink.emails('https://microlink.io')