5

I was hoping to create OpenTable definitions for Stack services to use YQL, Yahoo's SQL to the web thing. It would have been interesting for experimenting, but also for mashups.

Unfortunately, it seems that somewhere between Yahoo and StackExchange things go wrong.

Specifically, even for the simplest call (Stats) Yahoo is complaining: Unable to parse data using default charset utf-8 My query is at http://y.ahoo.it/BcE/b1r0 and produces this:

<?xml version="1.0" encoding="UTF-8"?>
<query xmlns:yahoo="http://www.yahooapis.com/v1/base.rng"
    yahoo:count="0" yahoo:created="2010-08-13T02:15:07Z" yahoo:lang="en-US">
    <diagnostics>
        <publiclyCallable>true</publiclyCallable>
        <url execution-time="1387" proxy="DEFAULT"><![CDATA[http://www.outerthoughts.com/files/opentables/se-stats.xml]]></url>
        <url error="Unable to parse data using default charset utf-8"
            execution-time="201" proxy="DEFAULT"><![CDATA[http://api.stackoverflow.com/1.0/stats?type=jsontext]]></url>
        <user-time>1609</user-time>
        <service-time>1588</service-time>
        <build-version>8771</build-version>
    </diagnostics> 
    <results/>
</query>

But here is the thing, if I copy the output from that same API url above and put it on my own server (and change my table definition to use it), things work just fine. I tried both with and without API key without any difference.

I can think of three options:

1) Something in Yahoo headers calling something in SO's engine to throw a dummy. I can't confirm it since it does not go via me (and I don't know of any Wireshark SAAS)

2) SO is explicitly blocking Yahoo/YQL services out of principle or due to quote overrun

3) Wasn't there some bad blood with Yahoo Pipes (from old Stack Overflow podcast)? Maybe that's related.

If anybody can shed any light on this or share past experience, it would be appreciated. I think the full mapping of API would not be that big a task and would open interesting opportunities, but not if it is impossible to get past this first step.

2 Answers 2

2

Could it maybe be that YQL doesn't support Gzip'd data? The API only provides Gzip'd data. This has caused a number of hard-to-spot problems in the past.

3
  • Usually the client (Yahoo) would need to specify Accept-Encoding header to support gzip format. I don't think the server would send compressed content otherwise. At least that's the theory. Can't see the headers, can't confirm. Commented Aug 13, 2010 at 4:59
  • 2
    @Alex - the API will send you gzipped content, even if you don't request it. Commented Aug 13, 2010 at 5:18
  • Ok, I guess HTTP spec does not forbid you doing that, though this is asking for trouble. I posted to YQL forum asking about gzip aspect of interaction. We shall see if anybody has further insights: developer.yahoo.net/forum/index.php?showtopic=6627 Commented Aug 13, 2010 at 16:49
2

It looks like Yahoo Pipes got blocked some time back for not obeying robots.txt and YQL is a part of that. I'm guessing the block was never lifted.

1
  • 1
    That's what I am afraid about. But if that's the case, it would be nice to have an official "don't bother" part of FAQ for it. Commented Aug 13, 2010 at 5:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .