pixiv

Node.js library for Pixiv API

Usage no npm install needed!

<script type="module">
  import pixiv from 'https://cdn.skypack.dev/pixiv';
</script>

README

node-pixiv Build Status Dependency Status

node-pixiv is Pixiv API client library written in Node.js.

Requirements

  • node.js v0.10+
  • superagent
  • bluebird
  • coffee-script
  • csv-parse
  • lodash

Getting started

Attention: Pixiv 0.1 has breaking changes. All API got to return Promise.

$ npm install pixiv --save

Search by tag

var pixiv = require('pixiv');

pixiv
  .search('SEARCH WORD')
  .then(function(data) {
    console.log(data);
  });

Ranking

pixiv
  .ranking('day')
  .then(function(data) {
    console.log(data);
  });

Paging

pixiv
  .search('SEARCH WORD', {p: 2})
  .then(function(data) {
    console.log(data);
  });

Old APIs (~> 0.0.1)

Search by tag

var pixiv = require('pixiv');
pixiv.search('SEARCH WORD', console.log);

Ranking

pixiv.ranking('day', console.log);

Paging

pixiv.search('SEARCH WORD', function(data, params) {
  pixiv.search(pixiv.next(params), console.log);
});

pixiv.next(params) returns parameters for next page.