Skip to content


Subversion checkout URL

You can clone with
Download ZIP
A YQL (Yahoo Query Language) module for NodeJS
Branch: master

Build Status


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';

You may find more examples at the YQL console

Installing node-yql

$ npm install yql


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)


Full documentation can be found at

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:

Additional YQL Resources

Something went wrong with that request. Please try again.