I'm developing an application in which user can search for a specific book and read it and purchase it. I want to use GData book search API for that. Can anyone tell me in which format I will get response as well as how to send request for book search? I have seen GData documentation, but not getting much ideas. Please help me.
You are going to have to send an HTTP GET request as seen here. That will return some xml that you will have to parse. Each book is an <entry> with lots of items and <link>s to things such as a thumbnail of the book's cover, like this:
All the information that you really care about though, will be sent after that, and will be in an item that has a dc prefix on it, such as <dc:title>Pride and Prejudice</dc:title>
You really should just be reading the documentation though, because it will be more thorough than anyone on here will care to be.
You have to use feed parser for this . Hit this URL in your IE and see the response. It will return feed. You just need feed parser to parse this and show in your application.
Google Books Feeds
If you are using Java than you should use official Google APIs Client Library for Java.
Here are detailed docs hot to use it with Google Books.
NOTE 1: Google Books API provides book search, but does not provide access to content. For this you must use Embedded Viewer API. This is a Javascript only API so it must be used inside a browser. If you plan to use it with Android you will most probably need to use the embedded WebView which can show HTML and Javascript.
NOTE 2: Commercial books can be searched with Google Books, but they must be purchased before they are available in users library. AFAIK there is no API to purchase books.
Related
#LinkedIn
Greeting to all,
I have a question regarding Social Actions API, Basically I wanted to know that there is an particular API for getting all number of Posts along with data like (comments or like) on are linkedin Page? (Please Share an Proper Example [this is demo API which we are using https://api.linkedin.com/v2/socialActions/urn:li:ugcPost:xxxxxxxx/])
Basically, our target is that to getting all numbers of posts which are present on my linked page plus we wanted to check also that if we received a comment on my any post so how we can reply on against him using an linkedin API's
It sounds like you're looking for some of the Marketing APIs. There is a Posts API that would allow you to search for posts by author. There is also a Social Actions API to get numbers of comments and likes. Note that you need to be approved to use these APIs.
I am trying to use Java to search for a String on Google. I heard about a Google API but I wasn't able to find anything useful. It should look something like this:
I have a text file. Every Line is a String which should be googled. If the first search result is from a spezific site (for example: stackoverflow.com/**), The full link will be written in a new textfile. Any ideas how to realize that?
Thanks.
You can search on Google with its Custom Search API. There's a Java Client Library for CustomSearch API available to simplify the work. Warning : "Usage is free for all users, up to 100 queries per day."
Goolge offers a RESTful service to do custom queries programmatically called the Google Custom Search API.
It is not free though: you can submit up to 100 queries per day.
does any one has idea how to get google page index in Java?
I was googleing since last 2-3 days but helpless, can any one refer me API for that or give some suggestion for how to do that
Lots of thanks in advance
For example if we search for facebook in google, we get around 22,980,000,000 results. So I want to fetch this number using JAVA
make a corresponding HTTP request from Java to Google, then parse the replied HTML code. There is a div with the ID resultStats. This div contains the number of results.
Not sure what your real requirement is, what kind of index do you want? Google export fairly a bit amount of APIs via RESTful service, some of them are packaged with JavaScript lib like Google MAP API. There are also Java client library for OAUTH authentication
The custom search API information could be found at http://code.google.com/apis/customsearch/v1/overview.html. A comprehensive list of google APIs could be accessed at https://code.google.com/apis/console
Does google provide a Java server side api **(NOT java script).**I dont want the ajax api which works at clint side.
What i want is that the result returned for a keyword should return me search result in some specific data structure.Like List or set data structure.Then i want to manipulate the result according to my need in java code.
I had used such a java server site api for youtube.
They used to but is discontinued. Most likely because you can remove their ads ;-)
From Google's terms of service
You may not send automated queries of any sort to Google's system
without express permission in advance from Google.
So, no - use their AJAX API. The SAOP API is discoutinued, but I think you should be able to use it, unless it requires a key, in which case you are tied to the AJAX API
Technically, the statement quoted above doesn't mean you can't use some sort of server-side API - there are examples of that if you google around. It means you shouldn't do it, because sooner or later you will be blacklisted (banned), as violating the terms.
What you would be looking for now is the CustomSearch API:
They used to have a different API developers could use but it has been depreciated (Nov. 2009 I think) so this is a for cost service now. I am not aware how long it might have been a free service. The new API allows 100 free searches a day, but you have to be signed up for billing else anything above 100 searches will fail, here are the details:
http://code.google.com/apis/customsearch/v1/overview.html
And sorry yes, this would still be using Java Script but you could use this:
http://www.json.org/java/
There is at least a SOAP API that I'm aware of: Google SOAP Search API
I don't think Google wants 3rd parties to use their search engine for their own services/applications. You would get "we think you are a robot" error page as a result if Google thinks you are not a real person.
You can however try Google Custom Search
I'm trying to write a simple Java desktop app to query Google and get the results. I've read so many articles in the past few days. I know that I have to do it through the GWT (Google Web Toolkit), the API that Google offers to programmatically query its search engine. My problem is that the GWT seems to be useful only to construct AJAX applications. I just want to write a simple desktop app. I am not interested in Javascript, XML or any server side application. Isn't there a way to do it?
Sure, take a look at this approach.
The general idea is that you make an HTTP fetch (using vanilla java.net.HttpUrlConnection or Apache HTTP Client). The magic is in the forming of the URL with the search term, and in the processing of what you get back from Google.
For the exact details on how to do this, see Google's REST search API documentation, including this section.
You can always get a license for the webservice and get the results returned through SOAP, however you did say that you were uninterested in XML. Shame, thats the quickest way. There is always doing a direct request to google through the query URL, since it uses HTTP get.