1.0.2 • Published 6 years ago

scrapr-api v1.0.2

Weekly downloads
5
License
ISC
Repository
github
Last release
6 years ago

Scrapr api

NodeJS SDK for Scrapr.co

Functions

  • scrapr.page(href, callback) to retrieve page information
  • scrapr.addTags(href, ['tag1', 'tag2'], callback) to tag a certain page
  • scrapr.removeTags(href, ['tag1', 'tag2'], callback) to remove tags from a certain page
  • scrapr.pages(domain, options, callback) to retrieve pages for a domain
  • scrapr.collections(domain, callback) to retrieve all collections for a domain
  • scrapr.collectionsItems(domain, collectionName, callback) to retrieve all items in a collection for a domain
  • scrapr.editCollection(collectionId, options, callback) to edit a collection
  • scrapr.createCollection(domain, collectionName, callback) to create a collection
  • scrapr.deleteCollection(collectionId, callback) to delete a collection

Examples

Simple example use

const scrapr = require('scrapr-api')(SECRET);

const href = 'http://vivaldisinterim.be/nl/onze-kantoren/vivaldis-interimkantoor-aalst';

scrapr.page(href, function(err, data){
  if(err) console.log(err);
  console.log(data);
})

Scrapr.pages

options

  • q => search for pages with a certain query in it's path.
  • page => Every page contains 25 pages, default 0
  • isScraped => Only return pages which we've scraped

Notice

Scrapr is in very private beta and will be launched soon. If you have any questions, feel free to reach us at timothy@taglayer.com

Author

Timothy Verhaeghe

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago