1.0.2 • Published 6 years ago
scrapr-api v1.0.2
Scrapr api
NodeJS SDK for Scrapr.co
Functions
scrapr.page(href, callback)
to retrieve page informationscrapr.addTags(href, ['tag1', 'tag2'], callback)
to tag a certain pagescrapr.removeTags(href, ['tag1', 'tag2'], callback)
to remove tags from a certain pagescrapr.pages(domain, options, callback)
to retrieve pages for a domainscrapr.collections(domain, callback)
to retrieve all collections for a domainscrapr.collectionsItems(domain, collectionName, callback)
to retrieve all items in a collection for a domainscrapr.editCollection(collectionId, options, callback)
to edit a collectionscrapr.createCollection(domain, collectionName, callback)
to create a collectionscrapr.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