1.0.0 • Published 7 years ago

mercury-parser v1.0.0

Weekly downloads
743
License
MIT
Repository
github
Last release
7 years ago

Mercury Parser

A Simple NodeJS Wrapper for the Mercury Web Parser API

Installation

npm install mercury-parser

If using yarn

yarn add mercury-parser

Usage

// Require the library, passing your API key generated on [Mercury Web Parser API](https://mercury.postlight.com/web-parser/)  dashboard
const mercury = require('mercury-parser')(API_KEY);

Examples

mercury.parse('https://some-url').then(response =>
  console.log(response)
  }).catch(err => {
    console.log('Error: ', err);
})
// Available attributes 

response.title
response.author
response.date_published
response.dek
response.lead_image_url
response.content
response.next_page_url
response.url
response.domain
response.excerpt
response.word_count
response.direction
response.total_pages
response.rendered_pages