ewdave / mercury-parser

API Wrapper for Mercury Web Parser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

API Wrapper for Mercury Web Parser


Languages

Language:JavaScript 100.0%