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.
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
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.
I had a great idea for an application, so I started checking out what the graph API had to offer. Then I've found out that it doesn't have access to large swathes of information that I can freely access on the website. I've got all the access token stuff working fine, it just appears that the Graph API doesn't have access to a lot.
On the website, there are more than 100 photos of me tagged in the last year. With the Graph API I can only get around 20. Most photos posted by my friends are missing.
So if I still really want to do this, what are my options? Guessing scraping is against the TOS?
UPDATE
This link appears to have a response to a user with the same issue. Apparently its a privacy issue...
There's an answer here (about paging limits and offsets) that might be useful if your problem is related to default paging sizes in the Graph API.
I'm attempting to issue a 301 redirect when a user requests http://www.mysite.com/Default.aspx to http://www.mysite.com/
The issue I'm having is that every property I can find within Request (Request.Url, Request.RawUrl, etc) is identical for those two requests.
Edit for further clarification:
This is on a shared web host, I can't install ISAPI extensions.
One more edit. Apparently the first tech support guy I talked to at the host didn't know what he was talking about, they have ISAPI rewrite installed.
Steve Wortham's Blog describes how he addressed the same issue.
He used Ionic's free Isapi Rewrite Filter
Just use a url rewriting ISAPI filter. It's painless. This page on Scott Gu's blog contains pretty much all the info you need.
Whilst a lot of people cite SEO as the reason for wanting to do this, I'd just like to make a minor observation:
Search for the word "Welcome" on my site
This word appears on the homepage (default.aspx), and in a blog post. At the moment I'm seeing three results for this search:
The middle one is my homepage, and you'll note that it's only listed once - yet you can easily visit, and stay on /default.aspx if you browse to it (and indeed, the navigation on the site links to /Default.aspx).
If anything it's more of an issue with reporting, as google analytics for example sees /default.aspx and /Default.aspx as different pages (but again, the search results are ignoring casing on a windows server):
So, all I'm saying is that search engines are often brighter than SEO consultants give them credit for...
A bigger problem for my site is the fact that I have three domain names pointing at it, and still haven't gotten around to putting a redirect inplace for the other ones.