Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A YQL (Yahoo Query Language) module for NodeJS
JavaScript
branch: master
Failed to load latest commit information.
examples Major refactoring.
tests Fixed path
.gitignore Major refactoring.
.travis.yml Added CI
LICENSE Renamed LICENSE
README.md Update README.md
package.json Version bump to v1.0.2
yql.js Correctly handle configs passed to static exec method
yuidoc.json Major refactoring.

README.md

Build Status

node-yql

node-yql is a YQL client for node.js

What is YQL?

Yahoo! Query Language is an expressive SQL-like language that lets you query, filter, and join data across Web services. With YQL, apps run faster with fewer lines of code and a smaller network footprint.

Yahoo! and other websites across the Internet make much of their structured data available to developers, primarily through Web services. To access and query these services, developers traditionally endure the pain of locating the right URLs and documentation to access and query each Web service.

With YQL, developers can access and shape data across the Internet through one simple language, eliminating the need to learn how to call different APIs.

Example YQL Queries

  • SELECT title,abstract FROM search.web WHERE query="pizza";
  • SELECT * FROM weather.forecast WHERE location = 90066;
  • SELECT * FROM twitter.user.timeline WHERE id = 'yql';
  • SELECT * FROM flickr.photos.interestingness(20);

You may find more examples at the YQL console

Installing node-yql

$ npm install yql

Example

var YQL = require('yql');
var query = new YQL('SHOW TABLES');
query.exec(function (error, response) {
    // Do something with results (response.query.results)
});

You can also chain the methods:

YQL('SELECT * FROM weather.forecast WHERE (location = @zip)').setParam('zip', 94089).setConfig('ssl', true).exec(fn)

Documentation

Full documentation can be found at derek.github.com/node-yql

function YQL (string query [, object options])

  • query - A YQL query
  • options
    • ssl: A boolean true/false flag to enable HTTPS (default: false)
    • headers: Object of valid HTTP headers (default {})
    • env: Environment files (default: http://datatables.org/alltables.env)

Additional YQL Resources

Something went wrong with that request. Please try again.