REST Queries Returning Empty Results

I'm using YQL for several sites to pull in data from their calendar page within our CMS. When I run the query in the console, everything works fine. But using the REST Query, I get an empty result set.


Is anyone else having this issue?

34 Replies
  • Can you enable network debugging and see if the data is being returned from the downstream service?

  • Same here, this is working from my home IP in the UK


    But for the past 24 hours my US servers return this -


    Notably it also works as expected in the YQL Console

    select * from xml where url in(

    Giving me the diagnostics -

    <url execution-time="327" proxy="DEFAULT"><![CDATA[http://api.flickr.com/services/feeds/photos_public.gne?id=53845817@N07&lang=en-us&format=atom]]></url>
    <url execution-time="332" proxy="DEFAULT"><![CDATA[http://twitter.com/statuses/user_timeline/27432137.atom]]></url>
    <url execution-time="705" proxy="DEFAULT"><![CDATA[http://www.facebook.com/feeds/page.php?format=atom10&id=115675898492090]]></url>
  • The guys at webfaction have just pointed out to me that the headers being returned from the request failing from their servers (that has been working for months) are -

    HTTP/1.1 400 Bad Request
    Access-Control-Allow-Origin: *
    Content-Type: application/json;charset=utf-8
    Date: Fri, 28 Jan 2011 10:45:26 GMT
    Server: YTS/1.19.5
    Expires: Fri, 28 Jan 2011 10:50:27 GMT
    Age: 8
    Content-Length: 204
    Connection: keep-alive

    {"error":{"lang":"en-US","description":"Syntax error(s) [line 2:4 no viable alternative at character ':',line 3:4 no viable alternative at character ':',line 4:4 no viable alternative at character ':']"}}

    That is when the following URL is called, which was formed by the YQL console itself last year.

  • 0
  • My application also recently stopped receiving results. We've been using the following query for a while (replacing the url parameter).


    From my dev host I receive results, the query above returns:

    <?xml version="1.0" encoding="UTF-8"?>
    <query xmlns:yahoo="http://www.yahooapis.com/v1/base.rng" [^] yahoo:count="5" yahoo:created="2011-01-27T15:58:16Z" yahoo:lang="en-US"><results><item>
    <title>An Interview with Sebastian Toutant</title>
    <description><a href="http://www.5min.com/Video/An-Interview-with-Sebastian-Toutant-516934102"><img [^] height='100px' width = '150px' alt='' src="http://pThumbnai [^]
    In this video, WatchMojo speaks to pro snowboarder, Sebastien Toutant, about his snowboarding goals and what it's
    like to return to RIDE Shakedown.

    <link>http://www.5min.com/Video/An-Interview-with-Sebastian-Toutant-516934102</link> [^]
    <enclosure duration="172" type="application/x-shockwave-flash" url="http://embed.5min.com/516934102/"/> [^]
    <media:content xmlns:media="http://search.yahoo.com/mrss/" [^] bitrate="600" duration="172" expression="sample" fileSize="0" lang="eng" type="video/x-flv" url="http://lvide [^]

    When the same is run from my production host (this is located at a different datacenter w/ a different IP) I get the following:
    <?xml version="1.0" encoding="UTF-8"?>
    <query xmlns:yahoo="http://www.yahooapis.com/v1/base.rng" [^] yahoo:count="0" yahoo:created="2011-01-27T15:56:53Z" yahoo:lang="en-US"><results/></query><!-- total: 55 -->
    <!-- engine1.yql.mud.yahoo.com -->

    I've been able to reproduce this all day yesterday and this morning. I checked the rate limiting and if I were exceeding limits the documentation indicates that I should receive an error indicating that. I assume since others are having similar issues that something else must be occurring.
  • Any update, Yahoo?
  • I'm also seeing this problem geographically scattered in my app. In my browser here in northeast US it's fine. In other regions, including out west and on an iphone it's failing.
  • I think it's fixed. Thanks, YQL team. But next time if you could give us some updates or an ETA that would be awesome.
  • QUOTE (Marcus E @ Jan 28 2011, 12:41 PM) <{POST_SNAPBACK}>
    I think it's fixed. Thanks, YQL team. But next time if you could give us some updates or an ETA that would be awesome.

    I can confirm, it does seem to be working again.
    Thanks YQL peeps.
  • Working great now thanks YDN techs. I'd better start to look at backing up results locally just in case from now on :)
  • Still getting this when trying to get Wiki titles (10 pages) through XPath, works in console, occasionally will return 1 or 2 results in the REST query but mostly nulls. My other queries using Yahoo services work fine, just when scraping content the feed goes mental. Any ideas when this will be dealt with?
  • Looks like this exact same problem is happening again. YQL guys?
  • I'm getting this as well. I get results intermittently. I'm just in testing stages right now, but I'll get maybe one or two requests that will return results, and then nothing for a long time(hours).
  • Hello,<br><br>I just try the same since yesterday and randomly getting empty results like this:<br><br><span style="color:#8b8b8b;">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</span><br><span style="color:#8b8b8b;">&lt;query xmlns:yahoo=&quot;http://www.yahooapis.com/v1/base.rng&quot; yahoo:count=&quot;0&quot; yahoo:created=&quot;2011-10-19T20:52:34Z&quot; yahoo:lang=&quot;en-US&quot;&gt;&lt;results/&gt;&lt;/query&gt;&lt;!-- total: 5757 --&gt;</span><br><span style="color:#8b8b8b;">&lt;!-- engine2.yql.ch1.yahoo.com --&gt;</span><br><br>But after requesting it a few times it works and I get my expected results.<br>When I try the same request in the console it works all the time, so no issues here, only in the REST queries.<br><br>Query is: SELECT * from rss WHERE url=&quot;http://news.google.com/news?ned=us&q=lemurs&output=rss&quot;<br><br>I try this from a Javascript in Chrome Browser.
  • this issue is stillpresent
  • I'm getting this issue. In my case I'm getting empty result sets most of the time. Results only sporadically. My location is Brazil
  • I'm seeing this same issue.  My example YQL query is

    select * from html where url="http://groups.google.com/group/sfrandon/msg/3e480d804c7069ee" and xpath='//div[@id="inbdy"]'

    This works fine from the YQL console, but not when I ping the resulting REST url, where I'm getting an error:


    <query xmlns:yahoo="http://www.yahooapis.com/v1/base.rng" yahoo:count="0" yahoo:created="2012-09-25T18:57:29Z" yahoo:lang="en-US">
    <cache execution-start-time="1" execution-stop-time="3" execution-time="2" method="GET" type="MEMCACHED">
    <![CDATA[ http://groups.google.com/robots.txt ]]>
    <url error="Redirected to a robots.txt restricted URL: http://groups.google.com/group/sfrandon/msg/3e480d804c7069ee" execution-start-time="0" execution-stop-time="3"execution-time="3" http-status-code="403" http-status-message="Forbidden" proxy="DEFAULT">
    <!-- total: 3 -->
    <!-- engine1.yql.sp2.yahoo.com -->
    Any ideas?

  • Should also note I've been using the above YQL query for the past few years and it's previously been working fine.  
  • Same Problem, some time from some PC, it's working fine, some time from some system it's not working at all.

    QUOTE(Jim G @ 25 Sep 2012 11:59 AM)
    Should also note I've been using the above YQL query for the past few years and it's previously been working fine.  
  • Come on YQL guys, Its time to be as consistent as Google.
  • Same problem here. Could this please be solved?
    <?xml version="1.0" encoding="UTF-8"?>
    <query xmlns:yahoo="http://www.yahooapis.com/v1/base.rng"
      yahoo:count="0" yahoo:created="2012-11-03T17:23:30Z" yahoo:lang="en-US">
        <cache execution-start-time="1" execution-stop-time="1"
          execution-time="0" method="GET" type="MEMCACHED"><![CDATA[http://www.bhphotovideo.com/robots.txt]]></cache>
        <url error="Connect Failure" execution-start-time="2"
          execution-stop-time="9" execution-time="7" proxy="DEFAULT"><![CDATA[http://www.bhphotovideo.com/robots.txt]]></url>
        <forbidden>An error caused the engine to disallow robots for this domain</forbidden>
          error="Redirected to a robots.txt restricted URL: http://www.bhphotovideo.com/c/product/870175-REG/Canon_EOS_Rebel_T4i_Digital.html"
          execution-start-time="1" execution-stop-time="9"
          execution-time="8" http-status-code="403"
          http-status-message="Forbidden" proxy="DEFAULT"><![CDATA[http://www.bhphotovideo.com/c/product/870175-REG/Canon_EOS_Rebel_T4i_Digital.html]]></url>
  • Dizzy,

    That link works now. It could be that bhphoto was down for whatever reason or their robots.txt wasn't available and the result was cached.

    Should be working now.

    Thanks -Paul
    YQL Team
  • The Query doesn't seem to be working, again...


  • I'm seeing the same issue

  • Now I know I am not going crazy as I see others have my problems. I scraped html content from a site with our church calendar using yql. However, all I am getting is nothing, null content with no errors. I tried the REST query in a web browser and still nothing. Please see my approach below:

    YQL console entry: select * from html where url="http://www.rccgna.org/RCCGEvents/Calendar.aspx" and xpath='//*[@id="gListEvents"]'

    The xpath was copied using firebug and pasted into the console. This is the code snippet I put in my mobile app (Titanium web view ):

    <title>RCCG NA Events</title>

    What am I doing wrong? Please help, I have tried without luck to solve this on my own for 2 months now. I also tried scraping from CNN just in case the issue if what my website and still no content returned.

  • Sorry my code didn't show in my previous post for some odd reason. Here is the rest of it:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>RCCG NA Events</title>
    <div id="gListEvents"> </div>
        function rccgnaCal(data){
            var cal = document.getElementById('gListEvents');
            cal.innerHTML = data.results[0];
    <script src = "http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20where%20url%3D'http%3A%2F%2Fwww.rccgna.org%2FRCCGEvents%2FCalendar.aspx'%20and%20xpath%3D'%2F%2F*%5B%40id%3D%22gListEvents%22%5D'&diagnostics=true&format=xml&callback=rccgnaCal">
  • Bisi,

    The YQL html page can't read HTML that is dynamically rendered by Javascript. It's just parsing the HTML it gets from the server.

    Thanks -Paul YQL Team

  • Thx Paul for your response. However, I am not clear which part of my code above constitutes dynamic html rendering. All I am doing is following the YQL Reuse of HTML content example given at this URL: http://coding.smashingmagazine.com/2010/12/21/yql-using-web-content-for-non-programmers/

    If there's another way to reuse my calendar content at the url given (copied within xpath). Please help me discover such. I am not trying to create another webpage in my mobile app but use the calendar content.

    Sincerely and humbly hungry for a solution.

  • This issue is present for me as well. No result from the REST query (copied directly from the console) but the console returns results.


    (This request has wrong password, but should return a response that indicates the password is wrong)

    Ironically using "desc market_combined" does seem to return results, and other YQL REST queries do work.

    All of these queries have worked for months, but today I suddenly notice that its not working...... whats up?

  • Hi Bisi,

    As Paul mentioned, the entire calendar on the page you're trying to scrape from is being generated by Javascript; it cannot be scraped unless the Javascript is executed. If you disable Javascript on the browser you use, you'll find that the calendar does not appear at all. Ideally the calendar should be created server-side if you want to scrape it.

  • Adding YQL-rest-call-returning-Access-Forbidden to the party.

    Is there any way we can help to narrow down the cause?

  • Same problem happening to me

  • I have the same problem also :( I'm using Yahoo SDK from here https://github.com/yahoo/yos-social-php. My application worked well before but it doesn't work anymore at the moment.

    $session = YahooSession::requireSession(OAUTH_CONSUMER_KEY, OAUTH_CONSUMER_SECRET, OAUTH_APP_ID); $user = $session->getSessionedUser();

    var_dump($session->query('select * from social.connections where owner_guid=me'));

    The result is NULL :(


Recent Posts

in YQL