0

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.

http://query.yahooapis.com/v1/public/yql?q...alendar.aspx%22

Is anyone else having this issue?

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

    http://developer.yahoo.com/yql/guide/yql-n...rk-logging.html
    0
  • Same here, this is working from my home IP in the UK

    http://query.yahooapis.com/v1/public/yql?q...amp;format=json

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

    CODE
    query":{"count":0,"created":"2011-01-28T10:49:49Z","lang":"en-US","results":null}}


    Notably it also works as expected in the YQL Console

    CODE
    select * from xml where url in(
    'http://twitter.com/statuses/user_timeline/27432137.atom',
    'http://api.flickr.com/services/feeds/photos_public.gne?id=53845817@N07&lang=en-us&format=atom',
    'http://www.facebook.com/feeds/page.php?format=atom10&id=115675898492090')


    Giving me the diagnostics -

    CODE
    <diagnostics>
    <publiclyCallable>true</publiclyCallable>
    <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>
    <user-time>709</user-time>
    <service-time>1364</service-time>
    <build-version>10970</build-version>
    </diagnostics>
    0
  • 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 -

    CODE
    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.

    CODE
    http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20xml%20where%20url%20in(%0A'http%3A%2F%2Ftwitter.com%2Fstatuses%2Fuser_timeline%2F27432137.atom'%2C%0A'http%3A%2F%2Fapi.flickr.com%2Fservices%2Ffeeds%2Fphotos_public.gne%3Fid%3D53845817%40N07%26lang%3Den-us%26format%3Datom'%2C%0A'http%3A%2F%2Fwww.facebook.com%2Ffeeds%2Fpage.php%3Fformat%3Datom10%26id%3D115675898492090')&format=json
    0
  • 0
  • My application also recently stopped receiving results. We've been using the following query for a while (replacing the url parameter).

    CODEBOX
    http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20rss%20where%20url=%22http://api.5min.com/category/37/videos.xml?num_of_videos=5%22


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

    CODEBOX
    <?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>
    <id>516934102</id>
    <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 [^]
    ls.5min.com/10338683/516934102_14.jpg"></a>
    In this video, WatchMojo speaks to pro snowboarder, Sebastien Toutant, about his snowboarding goals and what it's
    like to return to RIDE Shakedown.

    </description>
    <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/"/> [^]
    <geoRestriction>ALL</geoRestriction>
    <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 [^]
    os.5min.com/5169342/516934102.flv"/>
    ...


    When the same is run from my production host (this is located at a different datacenter w/ a different IP) I get the following:
    CODEBOX
    <?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.
    0
  • Any update, Yahoo?
    0
  • 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.
    0
  • 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.
    0
  • 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.
    0
  • Working great now thanks YDN techs. I'd better start to look at backing up results locally just in case from now on :)
    0
  • 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?
    0
  • Looks like this exact same problem is happening again. YQL guys?
    0
  • 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).
    0
  • 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.
    0
  • this issue is stillpresent
    0
  • 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
    0
  • 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:

    http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20where%20url%3D%22http%3A%2F%2Fgroups.google.com%2Fgroup%2Fsfrandon%2Fmsg%2F3e480d804c7069ee%22%20and%20xpath%3D'%2F%2Fdiv%5B%40id%3D%22inbdy%22%5D'&diagnostics=true

    <query xmlns:yahoo="http://www.yahooapis.com/v1/base.rng" yahoo:count="0" yahoo:created="2012-09-25T18:57:29Z" yahoo:lang="en-US">
    <diagnostics>
    <publiclyCallable>true</publiclyCallable>
    <cache execution-start-time="1" execution-stop-time="3" execution-time="2" method="GET" type="MEMCACHED">
    <![CDATA[ http://groups.google.com/robots.txt ]]>
    </cache>
    <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">
    <![CDATA[
    http://groups.google.com/group/sfrandon/msg/3e480d804c7069ee
    ]]>
    </url>
    <user-time>3</user-time>
    <service-time>5</service-time>
    <build-version>30549</build-version>
    </diagnostics>
    <results/>
    </query>
    <!-- total: 3 -->
    <!-- engine1.yql.sp2.yahoo.com -->
    Any ideas?

    Thanks!
    0
  • Should also note I've been using the above YQL query for the past few years and it's previously been working fine.  
    0
  • 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.  
    0
  • Come on YQL guys, Its time to be as consistent as Google.
    0
  • 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">
      <diagnostics>
        <publiclyCallable>true</publiclyCallable>
        <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>
        <url
          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>
        <user-time>9</user-time>
        <service-time>15</service-time>
        <build-version>31453</build-version>
      </diagnostics> 
      <results/>
    </query>
     
    0
  • 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
    0
  • The Query doesn't seem to be working, again...

    $url='http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20yahoo.finance.quotes%20where%20symbol%3D%22'.$SSymbol.'%22&format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys';

    0
  • I'm seeing the same issue

    0
  • 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.

    0
  • 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">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    
    
        <title>RCCG NA Events</title>
    </head>
    
    <body>
    
    <div id="gListEvents"> </div>
    <script>
        function rccgnaCal(data){
          if(data.results){
            var cal = document.getElementById('gListEvents');
            cal.innerHTML = data.results[0];
          }
        }
    </script>
    <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">
    </script>
    </body>
    </html>
    
    0
  • 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

    1
  • 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.

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

    http://query.yahooapis.com/v1/public/yql?q=use%20%22store%3A%2F%2FJ5I5lv7jQ6y8IWTnEOFtpX%22%20as%20market_combined%3B%20%0Aselect%20*%20from%20market_combined%20where%20password%3D%22wow%22%20and%20symbols%3D%22YAHOO~GOOG~PBY%22%20and%20show_raw%3D%22false%22%20and%20show_overview%3D%22false%22%20and%20show_current%3D%22false%22%20and%20show_historic%3D%22false%22%20and%20interval%3D%22d%22%20and%20start_year%3D%222011%22%20and%20start_month%3D%229%22%20and%20start_day%3D%2210%22%20and%20end_year%3D%222011%22%20and%20end_month%3D%229%22%20and%20end_day%3D%2211%22%3B

    (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?

    0
  • 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.

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

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

    0
  • Same problem happening to me

    1
  • 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 :(

    1

Recent Posts

in YQL