yandex-search

1.0.0 • Public • Published

node-yandex-search

Simple interface for Yandex XML search.

Installation##

$ npm install yandex-search

Usage##

yandex(options, function)

Example##

var yandex = require('yandex');
var myXmlUrl = 'http://xmlsearch.yandex.com/xmlsearch?user=YOU&key=YOURKEY';
yandex({url: myXmlUrl, query: 'Node.js'}, function(err, xmlResults) {
  // do cool stuff
})

Options###

Options and defaults mostly follow the format specified here.

{
  url: '',           // required. get this from yandex.
  query: '',         // required. will be xml encoded for you.
  sortby: 'rlv',     // [rlv, tm]
  maxpassages: 4,    // [1..5]
  page: 0,           // Int
  groupby: {
    mode: 'deep'     // [deep, flat], attr is set for you.
    groupsOnPage: 10 // [1..100]
    docsInGroup: 1   // [1..3]
  }
  proxy: {}          // object is passed directly to the request module to control proxy behaviour.
}

Dependents (0)

Package Sidebar

Install

npm i yandex-search

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • tomsteele