Api is returning unexpected data in bestbuy - best-buy-api

I am trying to get the iphone5 search .
This is the url which I am hitting .
http://api.remix.bestbuy.com/v1/products(search=Iphone5)?apiKey=myapi&page=1
And this response is completely different to what I am expecting .I am looking for the same data as what I got after searching the Iphone at bestbuy.com user interface .
My response contains some headphone details which is not Iphone .
May I know Y it is so .What other parameters I need to pass to get the correct data .
Please help me out .
UPdate :
It shows only accessories data instead of Iphone5 product details .

The API's search currently uses a different relevancy model than bestbuy.com's search. If you're specifically looking for iPhones, then you'd probably want to filter based on category as well. You might also want to change your query to search by 'name' for even more specificity.
A URL that worked for me:
http://api.remix.bestbuy.com/v1/products(name="iPhone*"&categoryPath.id=pcmcat209400050001)?format=json&apiKey=YourAPIKey
If you wanted to limit your results to the iPhone 5, 5c, or 5s, a better query would be:
http://api.remix.bestbuy.com/v1/products(name="iPhone 5*"&categoryPath.id=pcmcat209400050001)?format=json&apiKey=YourAPIKey
We have more extensive documentation on our different search options on our new developer site at https://developer.bestbuy.com/documentation. Make sure to check there if there's anything fancier you need to do!

Related

How to use exactTerms and excludeTerms with Google Custom Search JSON API

I've been working with Google Custom Search API and faced some inconveniences I hope you can help me with.
Google Custom Search API offers as a parameter in its call the possibility to search by an exact text as well as exclude it from results: exactTerms and excludeTerms. However, the q parameter is mandatory and cannot be ignored, so if I want to search only by an specific text I just can't.
So how can I do a query using JSON API that contains specifically the text I want? Does the q parameter work as the search form in Google?
If I want results including 'foo', should I do this:
service.cse().list(cx=const.SEARCH_ENGINE_KEY, q='"foo"').execute()
or this?:
service.cse().list(cx=const.SEARCH_ENGINE_KEY, q=None, exactTerms='foo').execute()
Thank you in advance for your time.
Due to the success on the answers (hehe) I'm posting my own conclusions. Please, if you've any facts regarding the original question, please post it.
I've been testing with some calls to Google CSE API and looks like you can pass to q parameter the same query you'd do in Google's main page textfield. So (at least for my needs), you don't need exactTerms and excludeTerms to get what I was trying to achieve.
Anyway, as I said before, if you know how to work with these parameters I'm sure everybody will thank you.

Is it possible to use the Canonical Landscape API to get script output?

The documentation I can find for the Canonical Landscape API lets you do lots of things with scripts, but I can't find anything suggesting that you can get output. However, if you use the Canonical web interface, script output is available, so it's presumably exposed somehow...?
I just had this issue as well and since you're the first hit right now on google, I wanted to share the answer for everyone - if you run ExecuteScript on a landscape client and get back an ID of 123, and let's assume the job finished already - you want to then use that ID to ask the GetActivities API, with an input argument of "query" with value "parent-id:123". If there is a result there, you will find the script output you are looking for under the result_text field of the response. Good luck!!! It worked over here very well.

Customize Google Custom Search

Does anyone know how to span the search result set over all of the links provided in google custom search . For Example, if I have provided sites like site 1,site 2....site n to search from ,then I want say top five results from all of these individual websites as JSON. Is there a way to achieve this.
I know this may be a little late but might be able to help someone out .
This will return 2 results via the REST API for GCSE.
https://www.googleapis.com/customsearch/v1?key=YOUR-KEY_HERE&cx=CX_HERE&fields=kind,items&filter=1&num=2&prettyPrint=true&q=querystring
its the num=2 part your looking for...

Flickr API - Photos Search, excluding tags: Am I doing this wrong?

So, I'm trying to pull all photos of a specific user's account via the flickr.photos.search method, but I want to exclude photos with a particular tag. The related documentation page states that "You can exclude results that match a term by prepending it with a - character." ... Well, I tried implementing that option but what get in return is only one photo (even though there are several photos with the tag in question) and that result remains the same whether that specific photo has the tag in question or not AND whether or not I use the "-" option to exclude that tag rather than include it. I also tried the text method with the same exact result. Here's my REST call:
http://api.flickr.com/services/rest/?&method=flickr.photos.search&api_key='.$api_key.'&user_id='.$user_id.'&tag_mode=any&tags=-blog&extras=url_o,url_t&format=json
And here is the page where I'm trying to get this all working:
http://corazonbrew.com/temp/
Anyone know what is going on here?
It seems the answer in the Flickr discussion board I linked to earlier is proving true. In order to use the exclusion option, there has to also be at least one other, non-excluded tag. Well, that is just not good enough for me.
A couple of friends tell me this is a longstanding bug that will not be fixed anytime soon, if ever. But those friends also kindly reminded me of my n00bishness- this whole time I thought I needed to affect the feed to get the desired output. I totally was not realizing I could just use some good ol' PHP if statements to weed out what I don't want.

Normal Google Custom Search

I'm writing an application that analyses search engine results.
With the Google Search API now being depreciated and limited to 1000 queries/day they are forcing developers to move to the AJAX APIs and to use the Custom Search API to do a Google search.
The thing is I don't need a Custom Search, I need a general search not one that is filtered by site; OK maybe filtered by USA/UK (Google.com/Google.co.uk).
Does anyone know how to just do a regular Google search using the AJAX APIs? Is the Custom Search the right thing to be using?
I don't want to hit the 1000/day limit using the old service but this is exactly what I need.
I did find: How do I create a CSE that searches the entire web?
http://www.google.com/support/customsearch/bin/answer.py?hl=en&answer=1210656
But by the sounds of it this will distort the search results.
Thank you.
OK. Here's how I think it is done.
Create a Custom Search Engine.
Add a site such as *.com When this is created go to the Advanced tab
and download the context xml.
Remove the Background Label associated with the site.
Upload the XML to replace the previous context.
This seems to work just fine and is returning the same values as far as I can see.
Yes, you are right *in theory, and this should let you get 100 results a day on the fly. Just this Saturday though, Google confirmed how here -
(* so far though, we can't get it working...)