Is there a way of requesting Related Images like the Amazon website shows of certain products? I wanted to get the images so that I can mirror the functionality in my own retail client. The Images response group doesn't seem to help.
like this one
http://www.amazon.co.uk/gp/product/B004SGLDM6/ref=s9_simh_gw_p21_d0_g21_i1?pf_rd_m=A3P5ROKL5A1OLE&pf_rd_s=center-2&pf_rd_r=179Q3KXHNZGJQSHFBGZ3&pf_rd_t=101&pf_rd_p=467128533&pf_rd_i=468294
First of all, I assume you are using the Product Advertising API. If so, then you would need to ask for the Images Response Group
An example request would be:
http://ecs.amazonaws.com/onca/xml?AWSAccessKeyId=AWSKEY&AssociateTag=ASSOCIATETAG&ItemId=B004SGLDM6&Operation=ItemLookup&ResponseGroup=Images&Service=AWSECommerceService&Timestamp=2012-04-27T17%3A52%3A13Z&Version=2009-03-31&Signature=SIGNITURE
You would obviously need to put your key, tag, and signature in that last URL.
Related
Is there a way to programatically upload an image file to search in Google, and then downloading the first one (the one with best resolution)?
EDIT: The Google Search API would not work for me, as I would have much more than 100 requests per day, and I am not willing to pay, since I am not a company
Yes, there is. The Google Custom Search API allows you to submit queries (including images) and retrieve results programmatically. There are even client libraries available for multiple languages.
EDIT: After OP changed his question, basically saying that he doesn't want to use the Google API, I can only refer to this(a bit outdated) question and quote the Google Terms of Service:
1.4 Appropriate Conduct. You shall not, and shall not allow any third party to: ... (i) directly or indirectly generate queries, or
impressions of or clicks on Results, through any automated, deceptive,
fraudulent or other invalid means (including, but not limited to,
click spam, robots, macro programs, and Internet agents);
So to recap, it is possible, but it is only legal via the API I linked above.
My application needs to show the user all Page categories available so he can choose which pages to follow and / or Like. Is there any way using the api in c# to get all the categories?
I also need to get all areas available in Facebook used as location and/or Home town etc.
After a bit of research, it doesn't seem possible. The Facebook FQL requires a where clause to search pages. This means you need to provide one of the following: a keyword, a page_id, a name, or a username. Since you don't seem to have any of these fields, or more specifically you want everything, so these fields are unimportant to you. To sum up: select categories from pages is not valid FQL, it have a where clause. Example:
select categories from pages where page_id = x
select categories from pages where keyword = x
select categories from pages where name = x
select categories from pages where username = x
This seems odd to me, since if one navigates to https://www.facebook.com/pages the site is certainly capable of enumerating the pages available. If you had simply an enumeration of all pages on the site, you could build your own list of categories based on a massive recursive search. This would need to be done infrequently and stored locally to your application.
To answer the second part of your question FQL allows to search for posts that have been tagged with location data (https://developers.facebook.com/docs/reference/fql/location_post) however this will only return results based on the following 4 rules:
you were tagged in the Post
a friend was tagged in the Post
you authored the Post
a friend authored the Post
The "you" they are referring to here is the owner of the OAuth token used to execute the query. Again, I do not believe this would result in you being able to retrieve a list of locations due to the same where clause limitation as seen above.
This ends the section of official Facebook API. You can certainly fall back on basic web page scraping, similar to the answer provided by Silamril. However I'm not sure if this will work for locations since that search box seems to be a live search autocomplete box. This means you have to put something in to get something out. I suggest you look at a geoapi provider or even simply scrape a wikipage like http://en.wikipedia.org/wiki/List_of_lists_of_settlements_in_the_United_States. There are providers of mapping information out there like OpenStreetMap that will be able to provide you with the same information in an API format. See the OSM wiki (http://wiki.openstreetmap.org/wiki/Key:place).
You can acquire all page categories with a script like on https://gist.github.com/bloudermilk/2173940
How can I get Picture Previews to work with IE 8 and up?
Can I get binary image data from an input type "file", with JavaScript/jQuery?
If I can just get the data (in the right format) back to the server, I should be able to work with it there, and then return it with AJAX (although, I am absolutely no AJAX expert).
There is, according to the research that I have done, NO WAY to get picture previews in all IE versions using only javascript (this is because getting the full file path is seen, by them, as a potential security risk). I could ask my users to add the site to the trusted sites, but you don't usually ask users to tamper with those kinds of low-level settings (not to mention the quickest way to make your site seem suspicious to users is to ask them to directly add your site to the trusted sites list. That's like sending an email and asking for a password. "Just trust me! I'm soooo safe!" :)
I have picture previews working in everything except IE and have no problem using conditional comments to separate an IE specific way of doing this from the way I am doing it with other browsers. In other words, the answer doesn't even have to be cross-browser, just cross-IE (8 and 9). I know I have seen IE sites use picture previews before (somehow), so I know there must be at least ONE way to do this...
So if you need to support IE lower than 10 you could upload the file to the server using some of the existing AJAX upload components (Uploadify, Plupload, Valums AJAX Upload, Bleuimp, ...), generate and store a thumbnail on the server and send the url to the saved image to the client using JSON so that it could display it using an tag. Actually since IE supports Data URI Scheme you don't need to store the uploaded file to the server in order to generate the preview. You could directly return the resulting thumbnail image from your Preview controller action formatted as Data URI Scheme so that you could show it on the client.
Another solution if you don't have the time and resources to implement this functionality is to simply tell your users that if they want to get a realtime preview of the image that they should consider using a different web browser because your site doesn't support IE for this.
I need to scrape/parse some search engines related data for a given domain name(site).
I need
Google Page Rank (only for the domain name, not each pages).
Number of indexed results/pages (google, bing).
Number of Backlinks (google, bing, yahoo).
Traffic Rank (alexa).
Site thumbnail.
Could you provide me some pointers on where can I start? I tried to look around, but I was able to find only Google Ajax API which provides me number of indexed results only. That too expects valid headers which would mean, I have to be on that site, in order to make that work. So, I can't get data for any given domain.
Thanks
Their search API's are intentionally very limited so you will probably need to scrape this data directly from each website.
Does anyone know how to retrieve the product description from the Amazon API? I have asked their forum with no success. I can access the detailed page URL from an ItemLookUp but then I have to screenscrape which is not ideal.
Hey, I know this is a bit old, but I've found the EditorialReview part of the response contains the product description. I guess the cravet that Tom talks about still applies, but at least its a way to get to the description without reverting to screen scraping (which is never a good thing!) :)
See this page of the Amazon product API: http://docs.amazonwebservices.com/AWSECommerceService/latest/DG/
EditorialReview Response Group
For each item in the response, the
EditorialReview response group returns
Amazon's review of the item, which, on
the Detail page, is labeled the
Product Description.
No nasty screen scraping required! :)
Andy.
You can retrieve it like this apparently (wont work, wrong key):
http://ecs.amazonaws.de/onca/xml?Service=AWSECommerceService&AWSAccessKeyId=1EYQH7NQ7HMKEGDPVZ82&Operation=ItemLookup&ItemId=3492233198&ResponseGroup=Large,ItemAttributes,Images,Offers,EditorialReview,Subjects,Reviews
Taken from Amazon Developer Forum:
Similar issue was discussed at
http://developer.amazonwebservices.com/connect/thread.jspa?threadID=16331&tstart=0.
Amazon does not own all the content
that appears on the retail site and
some of it is licensed from third
parties who limit the ways in which
their intellectual property is allowed
to be reproduced. As a result, we
need to filter out some editorial
reviews / contents from public
responses when querying via ECS.
So be careful screenscraping, it might be breaking copyright. Also check that the data you are attempting to retrive is allowed.