My application is in testing at the moment, so I am occasionally running the same query a few times over. Sometimes with really strange results. For example, accessing this URL:
http://api.bing.net/json.aspx?AppId=[removed]&Version=2.2&Market=en-GB&Query=vapir%20vaporizers&Sources=web&Web.Count=32&JsonType=raw
Usually returns JSON that contains:
"Query":{"SearchTerms":"vapir vaporizers"},"Web":{"Total":45200,"Offset":0,"Results":....
(45200 ish results)
However for some reasonably large percentage of queries (if I refresh that URL a couple of times) I get this back:
{"SearchResponse":{"Version":"2.2","Query":{"SearchTerms":"vapir vaporizers"},"Web":{"Total":6,"Offset":0,"Results":
6 results! Somehow I don't quite believe that. The actual results (even for this ridiculous query) seem quite irrelevant too. They certainly aren't the top six results from the 45,200 query.
Does anyone have any suggestions - is this some sort of traffic control that's getting triggered by me refreshing the page a couple of times - which seems unlikely - or a bug at Bing? It almost feels like one of the search servers is returning bogus data and occasionally queries get sent there. Perhaps it's only happening with the market set to en-GB? I haven't yet tested without.
Thanks.
Further to the previous message:
It happens with XML too at least, and on seemingly any query, e.g.:
<Query><SearchTerms>1</SearchTerms></Query><web:Web><web:Total>53</web:Total><web:Offset>0</web:Offset><web:Results>...
I suspect there are more than 53 web results out there for the query "1".
My previous guess still stands :-)
You should never rely on the value of the total for anything. It is an estimate, and its accuracy varies greatly depending on the frequency of the query and the path it takes across the machines in the datacenter.
HTH
--Alessandro
Hi Alessandro,
Thanks for the reply - I probably wasn't clear enough though: the result count is just a symptom of a problem, not the main issue. Though it is a useful way for me to discard the result and try again if it happens.
When I see the low result count, I noticed it because the search results I was getting were significantly different to those returned by a normal Bing or API search. They were very poor results too.
This is easily reproducible for any search query I have tried so far, all I have to do is refresh the page a few times and I will get the 'bogus' data. For example, one out of ten queries I tried for this URL:
http://api.bing.net/xml.aspx?AppId=[removed]&Market=en-GB&Query=tennis&Sources=web&Web.Count=30
Returned the following XML response:
<SearchResponse Version="2.2"><Query><SearchTerms>tennis</SearchTerms></Query><web:Web><web:Total>43</web:Total><web:Offset>0</web:Offset><web:Results><web:WebResult><web:Title>Tennis Australia - News - Articles - Pollard wins presidential ...</web:Title><web:Description>Geoff Pollard was re-elected as President of Tennis Australia for a further 12 months at the Annual General Meeting held in Melbourne this morning.</web:Description><web:Url>http://www.tennis.com.au/pages/News.aspx?id=4&pageId=11478&HandlerId=2&archive=false&newsid=6347</web:Url><web:CacheUrl>http://cc.bingj.com/cache.aspx?q=tennis&d=167045301648&mkt=en-GB&w=26a58c4e,ae5c4b3</web:CacheUrl><web:DisplayUrl>www.tennis.com.au/pages/News.aspx?id=4&pageId=11478&HandlerId=2&archive=false&newsid=6347</web:DisplayUrl><web:DateTime>2009-11-01T21:05:11Z</web:DateTime></web:WebResult><web:WebResult><web:Title>Tennis Australia - News - Articles - Tomic to play World Tennis ...</web:Title><web:Description>Rising tennis teen Bernard Tomic will finetune for the Australian Open by playing at the World Tennis Challenge. Tomic, 17, has agreed to play in the novel World Tennis Challenge ...</web:Description><web:Url>http://www.tennis.com.au/pages/News.aspx?id=4&pageId=11478&HandlerId=2&archive=false&newsid=6352</web:Url>
(I cut it off there).
Note that the market is set to "en-GB" yet the first few results are all Australia.
This does not match a normal Bing search in the en-GB market, nor does it match in any way the results normally obtained by performing that API query. I understand there will be some variance in the search results returned but I believe these are incorrect and a bug.
A normal query for 'tennis' returns a result count of ~117000000 instead of the 43 given above. If the second figure is an estimate it is so far off I'd consider that a bug in itself.
Hi,
I've been seeing the same bug in the last few days. I just caught one. Here are the "bad" (47 results) and "good" (67900 results) json responses for the query "oneriot api". The big problem with the bad response is that it does not contain the correct result (the link to oneriot):
(Apologies for the formatting).
Dave
Bad Response:{"Offset":0,"Results":[{"Description":"OneRiot, a realtime search engine, helps users find the news, blogs and videos that ... Collecta Releases Its Real-Time Search API; OneRiot Responds With...","Url":"http://www.crunchbase.com/company/oneriot","DateTime":"2009-11-04T10:17:23Z","DisplayUrl":"www.crunchbase.com/company/oneriot","CacheUrl":"http://cc.bingj.com/cache.aspx?q=oneriot+api&d=167589058887&mkt=en-us&w=36a02c68,fb149220","Title":"OneRiot Company Profile"},{"Description":"OneRiot API // Data Visualization Challenge. As of Thursday morning, OneRiot will be playing host to a new challenge - one that will answer a question we�\u20ac�ve been itching to address ...","Url":"http://blog.oneriot.com/content/2009/10/philly-phanaticism/","DateTime":"2009-11-05T06:27:08Z","DisplayUrl":"blog.oneriot.com/content/2009/10/philly-phanaticism","CacheUrl":"http://cc.bingj.com/cache.aspx?q=oneriot+api&d=167999179906&mkt=en-us&w=a246db71,43f564ab","Title":"Philly Phanaticism | Blog.OneRiot.com - Blogging the Pulse of the Web"},{"Description":"OneRiot API // Data Visualization Challenge. As of Thursday morning, OneRiot will be playing host to a new challenge - one that will answer a question we�\u20ac�ve been itching to address ...","Url":"http://blog.oneriot.com/content/2009/10/fare-thee-well-geocities/","DateTime":"2009-11-04T03:50:50Z","DisplayUrl":"blog.oneriot.com/content/2009/10/fare-thee-well-geocities","CacheUrl":"http://cc.bingj.com/cache.aspx?q=oneriot+api&d=167515328309&mkt=en-us&w=313fc5ed,7821ed5e","Title":"Fare Thee Well Geocities | Blog.OneRiot.com - Blogging the Pulse of ..."},{"Description":"Welcome to OneRiot, the realtime search engine! Search with OneRiot to find the news ... API | Make OneRiot your default search engine...","Url":"http://topics.oneriot.com/yemen-seizes-irani-boat","DateTime":"2009-11-03T06:15:11Z","DisplayUrl":"topics.oneriot.com/yemen-seizes-irani-boat","CacheUrl":"http://cc.bingj.com/cache.aspx?q=oneriot+api&d=167329140294&mkt=en-us&w=edc7ae7f,2292b01a","Title":"OneRiot.com - Yemen Seizes Irani Boat"},{"Description":"Welcome to OneRiot, the realtime search engine! Search with OneRiot to find the news ... API | Make OneRiot your default search engine...","Url":"http://topics.oneriot.com/merkel-begins-second-term","DateTime":"2009-11-03T03:44:52Z","DisplayUrl":"topics.oneriot.com/merkel-begins-second-term","CacheUrl":"http://cc.bingj.com/cache.aspx?q=oneriot+api&d=167306922045&mkt=en-us&w=6bb8f113,dbb46c58","Title":"OneRiot.com - Merkel Begins Second Term"},{"Description":"Tag: realtime. OneRiot ... No comments on this API yet...Used it? How was it for you? You must be logged in to comment","Url":"http://www.programmableweb.com/api/pachube","DateTime":"2009-11-03T18:32:29Z","DisplayUrl":"www.programmableweb.com/api/pachube","CacheUrl":"http://cc.bingj.com/cache.aspx?q=oneriot+api&d=167443112729&mkt=en-us&w=3b7c6100,753e1e96","Title":"Pachube API Profile"},{"Description":"Besides Yahoo, about 70 partners (including Microsoft Corporation (NASDAQ: MSFT) and Reed Elsevier Plc (NYSE: RUK) use OneRiot�\u20ac�s realtime search API. PulseRank - OneRiot�\u20ac�s ...","Url":"http://www.benzinga.com/markets/company-news/35486/oneriot-building-yahoo%E2%80%99s-yhoo-real-time-search-engine","DateTime":"2009-11-05T07:02:55Z","DisplayUrl":"www.benzinga.com/markets/company-news/35486/oneriot-building-yahoo�\u20ac�s-yhoo-real-time...","CacheUrl":"http://cc.bingj.com/cache.aspx?q=oneriot+api&d=168011110895&mkt=en-us&w=8319e7a,dc667b8a","Title":"OneRiot building Yahoo�\u20ac�s (YHOO) Real Time Search Engine | Benzinga ..."},{"Description":"OneRiot, a real-time search engine that�\u20ac�s already up and running, is supposed to be its ... Real-Time Search API Mania; Hitwise Finds Bing, Yahoo To Be A Good Match; Where�\u20ac�s Bing�\u20ac�s ...","Url":"http://www.arisyulianta.com/yahoo-may-pursue-real-time-search-with-oneriot/","DateTime":"2009-11-02T20:49:41Z","DisplayUrl":"www.arisyulianta.com/yahoo-may-pursue-real-time-search-with-oneriot","CacheUrl":"http://cc.bingj.com/cache.aspx?q=oneriot+api&d=167251806787&mkt=en-us&w=e984d756,c455db03","Title":"Yahoo May Pursue Real-Time Search With OneRiot : How to Make Money ..."},{"Description":"Red Canoe at Pump Slough : Red Canoe at Pump Slough ... (via @OneRiot) http://ow.ly/wWDG ... About | FAQ | Support | Privacy | Terms of Service | API | Blog","Url":"http://figstreetstudio.jaiku.com/presence/e57ed966212b4da0a14f0b4774c1b721","DateTime":"2009-11-02T21:18:19Z","DisplayUrl":"figstreetstudio.jaiku.com/presence/e57ed966212b4da0a14f0b4774c1b721","CacheUrl":"http://cc.bingj.com/cache.aspx?q=oneriot+api&d=167262557173&mkt=en-us&w=4346d3b1,c621bb13","Title":"Jaiku | Red Canoe at Pump Slough : Red Canoe at Pump Slough ... (via ..."},{"Description":"Peggs称OneRiot�\u201eAPI�\u2026?许任�\u2022人把OneRiot�\u201e�?�索�\u201c果嵌�\u2026��\u2021�己�\u201e�\u2018站�\u20ac\u201a此�\u2013,�\u2013们还�\u2030�\u20ac个�?��\u2014�广�\u2018�模�\u2039�\u20ac\u201a Collecta也推�\u2021��\u2020两个API,�\u20ac个�\u201d�于 ...","Url":"http://www.yeeyan.com/articles/view/pestwave/64829","DateTime":"2009-10-23T02:39:10Z","DisplayUrl":"www.yeeyan.com/articles/view/pestwave/64829","CacheUrl":"http://cc.bingj.com/cache.aspx?q=oneriot+api&d=167403671558&mkt=en-us&w=f95f3e93,88558f41","Title":"�?��\u2014��?�索�?�\u203a�\u2026��?�对Google/Bing/Twitter�?�作消�?��\u201e�??�\u201d ..."}],"Total":47}Good Response:{"Offset":0,"Results":[{"Description":"OneRiot is a realtime search engine. Search with OneRiot to find fresh, relevant ... API | Make OneRiot your default search engine...","Url":"http://www.oneriot.com/","DateTime":"2009-11-03T14:36:16Z","DisplayUrl":"www.oneriot.com","DeepLinks":[{"Url":"http://topics.oneriot.com/topics","Title":"Hot Topics"},{"Url":"http://topics.oneriot.com/technology","Title":"Technology"},{"Url":"http://www.oneriot.com/product/addons","Title":"Apps"},{"Url":"http://www.oneriot.com/company/about","Title":"About"},{"Url":"http://topics.oneriot.com/tv","Title":"TV"},{"Url":"http://www.oneriot.com/search?q=Gameswipe","Title":"Gameswipe"},{"Url":"http://www.oneriot.com/the-daily-show","Title":"The Daily Show"},{"Url":"http://www.oneriot.com/radiohead","Title":"Radiohead"},{"Url":"http://topics.oneriot.com/ronald-reagan","Title":"Ronald Reagan"},{"Url":"http://www.oneriot.com/red-hot-chili-peppers","Title":"Red Hot Chili Peppers"},{"Url":"http://topics.oneriot.com/barack-obama","Title":"Barack Obama"},{"Url":"http://www.oneriot.com/ars-technica","Title":"Ars Technica"},{"Url":"http://www.oneriot.com/forbes","Title":"Forbes"}],"CacheUrl":"http://cc.bingj.com/cache.aspx?q=oneriot+api&d=4584645699570119&mkt=en-us&w=c104d551,749579c9","Title":"OneRiot.com â\u20ac\u201c Realtime Search for the Realtime Web"},{"Description":"OneRiot API -- see mashups, code, news, reviews and resources. Plus hundreds of APIs and mashups.","Url":"http://www.programmableweb.com/api/oneriot","DateTime":"2009-11-03T03:37:42Z","DisplayUrl":"www.programmableweb.com/api/oneriot","CacheUrl":"http://cc.bingj.com/cache.aspx?q=oneriot+api&d=4649834714367922&mkt=en-us&w=37513d7b,54771bc","Title":"OneRiot API Profile"},{"Description":"Real-time social search outfit OneRiot today announced their API and partnership program for adding real-time search capabilities to browser add-ons, desktop applications, social ...","Url":"http://www.readwriteweb.com/archives/oneriot-api.php","DateTime":"2009-11-03T07:33:56Z","DisplayUrl":"www.readwriteweb.com/archives/oneriot-api.php","CacheUrl":"http://cc.bingj.com/cache.aspx?q=oneriot+api&d=4973928649261063&mkt=en-us&w=5c2778e3,6214b500","Title":"OneRiot Announces API & Real-Time Search Partnerships"},{"Description":"Welcome to ORDN, the official support network for developers working within the OneRiot API partner program. Here youâ\u20ac™ll find everything you need to get started with the OneRiot ...","Url":"http://oneriotdevelopernetwork.com/","DateTime":"2009-11-02T20:06:44Z","DisplayUrl":"oneriotdevelopernetwork.com","CacheUrl":"http://cc.bingj.com/cache.aspx?q=oneriot+api&d=4846041703973894&mkt=en-us&w=c75b49cb,73b0057a","Title":"OneRiot Developer Network"},{"Description":"OneRiot has an API and partnership program for adding realtime search capabilities to browser add-ons, desktop applications, social websites and other services.","Url":"http://en.wikipedia.org/wiki/OneRiot","DateTime":"2009-11-03T05:25:05Z","DisplayUrl":"en.wikipedia.org/wiki/OneRiot","CacheUrl":"http://cc.bingj.com/cache.aspx?q=oneriot+api&d=4564596793147635&mkt=en-us&w=1b4f81d9,588e85a0","Title":"OneRiot - Wikipedia, the free encyclopedia"},{"Description":"As of Thursday morning, OneRiot will be playing host to a new challenge - one that will answer a question we've been itching to address: What does the","Url":"http://blog.oneriot.com/content/2009/09/oneriot-api-data-visualization-challenge/","DateTime":"2009-11-03T04:06:20Z","DisplayUrl":"blog.oneriot.com/content/2009/09/oneriot-api-data-visualization-challenge","CacheUrl":"http://cc.bingj.com/cache.aspx?q=oneriot+api&d=4733998894089580&mkt=en-us&w=63f6b417,d5c4990d","Title":"OneRiot API // Data Visualization Challenge | Blog.OneRiot.com ..."},{"Description":"Today OneRiot is announcing the General Availability of the very first realtime web search API, allowing third-party developers to introduce realtime web search","Url":"http://blog.oneriot.com/content/2009/07/first-realtime-search-api-now-available-to-all/","DateTime":"2009-11-03T16:09:19Z","DisplayUrl":"blog.oneriot.com/content/2009/07/first-realtime-search-api-now-available-to-all","CacheUrl":"http://cc.bingj.com/cache.aspx?q=oneriot+api&d=4626246753454664&mkt=en-us&w=e6204728,51410598","Title":"OneRiot Extends First Realtime Search API to All | Blog.OneRiot.com ..."},{"Description":"For some, it's useful to go to OneRiot to search for links being tweeted or dugg in real-time. But for a lot of ...","Url":"http://www.techcrunch.com/2009/07/09/oneriot-real-time-search-api-now-open-to-all/","DateTime":"2009-11-02T19:45:15Z","DisplayUrl":"www.techcrunch.com/2009/07/09/oneriot-real-time-search-api-now-open-to-all","CacheUrl":"http://cc.bingj.com/cache.aspx?q=oneriot+api&d=4742739150046678&mkt=en-us&w=8098f22a,fe90efa9","Title":"OneRiot Real-Time Search API Now Open To All"},{"Description":"It's the battle of the real-time search APIs. This morning Collecta released an API in beta for developers who want to integrate real-time ...","Url":"http://www.techcrunch.com/2009/09/10/collecta-releases-its-real-time-search-api-oneriot-responds-with-a-challenge/","DateTime":"2009-11-03T06:29:30Z","DisplayUrl":"www.techcrunch.com/2009/09/10/collecta-releases-its-real-time-search-api-oneriot-responds...","CacheUrl":"http://cc.bingj.com/cache.aspx?q=oneriot+api&d=4883446575138215&mkt=en-us&w=279b7af2,1716616","Title":"Collecta Releases Its Real-Time Search API; OneRiot Responds With A ..."},{"Description":"As of last Thursday morning, OneRiot is playing host to a new challenge â\u20ac\u201c one that will answer a question weâ\u20ac™ve been itching to address: What does the realtime web look like?","Url":"http://www.altsearchengines.com/2009/09/14/more-on-oneriots-api-data-visualization-challenge/","DateTime":"2009-11-02T07:35:07Z","DisplayUrl":"www.altsearchengines.com/2009/09/14/more-on-oneriots-api-data-visualization-challenge","CacheUrl":"http://cc.bingj.com/cache.aspx?q=oneriot+api&d=4840230611977601&mkt=en-us&w=f004e93d,cf548cae","Title":"More on OneRiotâ\u20ac™s API Data Visualization Challenge ..."}],"Total":67900}
Thanks for the detailed report. You are right - your code is correct and there is definitely something wrong on our side. We traced the problem to a configuration bug in one of the datacenters, which made the issue intermittent and slipping under the radar.
It should be OK now.
Thank you for bringing this to our attention
hi there,
I've just implemented the bing api into my code only to find out that neither of these queries would return the exact count requested:
http://api.search.live.net/xml.aspx?Appid=1489888BF3F2D3DB5BC7620E58FCB0D4401FA2DA&sources=image&query=masterpiece max&count=25
http://api.search.live.net/xml.aspx?Appid=1489888BF3F2D3DB5BC7620E58FCB0D4401FA2DA&sources=image&query=masterpiece max&Image.Count=25
the odd thing is it sometimes works and sometimes it doesn't i.e. in most cases when hit from a browser it wouldn't work, sometimes it would. it would either return 10 results (which is wrong) or the exact count requested.i've also notice the offset wouldn't work as well in those cases the count isn't work either but that is not such a problem for me.
quite frustrating really, how can such a basic thing not be working?! thanks.
I'm experiencing the same problem. I thought I was insane. Its happening regularly for me now.
It seems like it simply ignores both the Web.Count and Web.Offset parts of the URL.
Here's is my query:
http://api.search.live.net/xml.aspx?AppId=[removed]&query=Python+Hello+World+example&sources=web&web.count=40&web.offset=0
I tried to make it as simple as possible to narrow down possible causes on my end.
On the web count would it help if it was lower than 40 for results.
Hotels in UK
I still have the same problem:
E.g: for the word "iron"
api.bing.net/json.aspx[MyAppId]&Sources=web&Version=2.2&Market=fr-FR&Web.Options=DisableHostCollapsing+DisableQueryAlterations&query=iron returns only 38 results but a web research on bing gives 490 000 000 results. is it the smae bug that happening?