Note that there are some explanatory texts on larger screens.

plurals
  1. POInvalid Flickr API response
    primarykey
    data
    text
    <p>I've come across a very puzzling issue with the Flickr API. Basically, there's certain queries I (and some developer friends) can run which result in broken resultsets.</p> <p>Basically, what you request, isn't always returned...</p> <p>Here's a few examples:</p> <p><strong>Request:</strong></p> <p><a href="http://api.flickr.com/services/rest/?method=flickr.photos.search&amp;safe_search=1&amp;media=photos&amp;extras=o_dims&amp;per_page=30&amp;page=1&amp;format=json&amp;nojsoncallback=1&amp;api_key=XXXXXXX" rel="nofollow">http://api.flickr.com/services/rest/?method=flickr.photos.search&amp;safe_search=1&amp;media=photos&amp;extras=o_dims&amp;per_page=30&amp;page=1&amp;format=json&amp;nojsoncallback=1&amp;api_key=XXXXXXX</a></p> <p><strong>Response:</strong> </p> <pre><code>HTTP/1.1 200 OK Content-Length: 793 Date: Thu, 05 Jan 2012 23:30:56 GMT P3P: policyref="http://p3p.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE GOV" Access-Control-Allow-Origin: * Cache-Control: private X-Served-By: www71.flickr.mud.yahoo.com Vary: Accept-Encoding Connection: close Content-Type: text/plain; charset=utf-8 {"photos":{"page":1, "pages":19886, "perpage":30, "total":"596560", "photo":[{"id":"6643915631", "owner":"74181952@N00", "secret":"8bc611c556", "server":"7023", "farm":8, "title":"IMG_5642", "ispublic":1, "isfriend":0, "isfamily":0}, {"id":"6643911681", "owner":"7240073@N04", "secret":"34837024f0", "server":"7004", "farm":8, "title":"26 weeks!!", "ispublic":1, "isfriend":0, "isfamily":0, "o_width":"768", "o_height":"1024"}, {"id":"6643919177", "owner":"54899865@N02", "secret":"170d3a336f", "server":"7153", "farm":8, "title":"IMGA0072", "ispublic":1, "isfriend":0, "isfamily":0}, {"id":"6643916265", "owner":"51191328@N06", "secret":"05905197ce", "server":"7034", "farm":8, "title":"IMG_1781", "ispublic":1, "isfriend":0, "isfamily":0, "o_width":"2736", "o_height":"3648"}]}, "stat":"ok"} </code></pre> <p>Notice there's only 4 images returned, when we asked for 30? (and there's 596560 pics matching)</p> <p>If I change the perpage count to something different it may work, like right now, if I change it to 3, it'll return 3, but yesterday when I was testing, it only returned 2! and when I changed it to 10 it returned none!?</p> <p>We've come across another example, this time with image size data:</p> <p><strong>Request</strong></p> <pre><code>http://api.flickr.com/services/rest/?method=flickr.interestingness.getList&amp;extras=o_dims&amp;per_page=3&amp;page=1&amp;format=rest&amp;api_key=XXXXXXXXXX </code></pre> <p><strong>Response</strong></p> <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt; &lt;rsp stat="ok"&gt; &lt;photos page="1" pages="167" perpage="3" total="500"&gt; &lt;photo id="6743082503" owner="29789996@N00" secret="7d6a1ab340" server="7165" farm="8" title="Glittering Marina [2]" ispublic="1" isfriend="0" isfamily="0" /&gt; &lt;photo id="6741988715" owner="44789014@N04" secret="ab1528fa9f" server="7009" farm="8" title="Heavy metal warrior" ispublic="1" isfriend="0" isfamily="0" o_width="1200" o_height="1202" /&gt; &lt;photo id="6741320397" owner="54880604@N06" secret="7b3bd8530f" server="7030" farm="8" title="Greetings from below, Village near Can Tho" ispublic="1" isfriend="0" isfamily="0" /&gt; &lt;/photos&gt; &lt;/rsp&gt; </code></pre> <p>Note only one of the images has image size data.</p> <p>It's a very difficult issue to reproduce as it only happens every now and then, but once you've found a page/pagecount combo that causes an issue, you'll consistently get the incorrect response (I assume it's due to some form of caching).</p> <p>Has anyone else come across this? As you can see in my resultset above, there's no error, no warning, just an incorrect response.</p> <p>Thanks in advance. Aaron</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload