I am doing some web mining tasks using Google.
Though using the ordinary Google search engine might help, I still need to analyse the web pages.
I want to ask:
Does Google provide query results in JSON form?
PS:
I know one place,Google Custom Search, but the query amount for free user is limited, which can not satisfy my need.
So, anyone know other solutions?
Google does not provide search results in JSON format unless you use the custom search API.
A 'Bing search engine' query can be run through a Yahoo Pipe and posted out as JSON.
Related
I'm using Google Cloud Functions and requests contain a query string https://europe-west1-foobar.cloudfunctions.net/foobar?bar=baq
Is it possible for me to retrieve bar=baq from the Google Cloud logs? If so, how?
For the moment there's no such feature - just as guillaume blaquiere wrote.
However you can file a feature request on IssueTracker. Provide as much detailes on how you'd like this feature to work, maybe some examples - that will improve the chance of it being implemented.
I am using Google Places API to get grocery stores list.
Query:
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=32.715738,%20-117.161084&radius=12218&type=grocery_or_supermarket&key="GoogleAPIKey"
It is giving me some different data.
But I want list data like google provides in google map search as showing in attached screenshot: -
Is there any other way to get this list in json/xml format?
Please help. Thanks in advance.
You use type for searching with the API, but when you are on the maps webpage you use plain text.
If you use this link you get almost the same results as on the webpage except for Food 4 Less
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=32.715738, -117.161084&radius=2000&keyword=Grocery store&key=
Using the API you posted i was able to get a result that looks like what google explained in the documentation https://developers.google.com/places/web-service/search, if you can update your question by adding the response you are getting, maybe it will be easy to help you
Thanks for the suggestion guys.
I have resolved my query by using textsearch google api as mentioned below: -
https://maps.googleapis.com/maps/api/place/textsearch/json?location=""&radius=12218&type=grocery&key="GoogleAPIKey"
Thanks.
When I search something using the standard Drive interface, the resulting page have an url which encodes the search terms, for example (basic search):
https://drive.google.com/a/mydomain.com/?tab=mo#search/toner
or, as an alternative:
https://drive.google.com/a/mydomain.com/?tab=mo#advanced-search?q=fogna&view=2&visibility=2
Where can I find a reference on how this url is built (query parameter syntax)?
I understood the following empyrical;
"?tab=mo" seems somehow required
"visibility=2 searches all the documents in my domain (for Business Apps)
"advanced-search?q=" is alternative to basic search
"view=2" or "view=1" seem the same thing
I haven't experimented different combinations until now.
I am trying to integrate a custom search box in one of our Sites, in order to provide the user with results from the Drive contents (this is not possible using the standard search function in sites).
Unfortunately I can't answer your question but I can share that I'm looking for exactly the same thing. Since Google retired iGoogle the built in Google Docs/Drive search gadget within Google sites no longer returns a result. Creating a dialogue box that returns a custom URL for search would be the most straight forward method to perform a basic search.
It seems that as a minimum the base URL for a search is ...
https://drive.google.com/a/mydomain.com/#search/
Appending the search term requires %20 to replace spaces
e.g.
https://drive.google.com/a/mydomain.com/#search/my%20document will return a search for 'my document'
Good luck Massimo, hopefully some can assist
I have some dynamic data. I want to call this data dynamically in google maps location positions. When user clicks the location, user should be able to see details and photo of particular location. User should be able to filter the data as per his requirement and view filtered location.
Kindly let me know what type of API i should go for. I have searched alot and i came across Google maps api, google geo, google places api, fusiontables, spreadsheets, xml, kml, javascript, webservice and much more techniques and services.
I am working on asp.net site and sql database, is there any way to work with the same platform. Else please give me proper and easy dynamic way to use the service.
I want the exact maps features used in following site : http://inspire.makemytrip.com/inspire/
Thank You
P.S. : Whoever doing Downvote for this post should first Note that Google maps API 3 official group has themselves mailed me to add Question here so if you dont wish to answer atleast dont downvote.
I would suggest using Google Maps API V3 with PHP/MySQL as there are numerable tutorials available.
If you insist on using ASP here is a start.
I have seen the two forms of reference to the Google Places Library/Service, using JavaScript vs calling the API directly, a number of times, but I don't understand the difference. The Google Docs don't describe anything about two methods of accessing the API.
For example, this question talks about 2 ways of accessing the API: OVER_QUERY_LIMIT in a loop
And it appears that there is some type of direct web access taking place in this question: Querying Google Places API using jQuery
Is this something where there was an old way that involved formatting URL parameters and the new way is by utilizing the JavaScript library calls?
FINAL SUMMARY EDIT: There are two distinct ways of requesting data from Google, as described in #Dan Nissenbaum's answer below. And since my original question, the QUERY_LIMIT question referenced above has been edited to also include more information about the two options.
Perhaps you are referring to the distinction between the Google Places API that is intended for use on the SERVER (i.e., utilizing PHP to call the Google Places API directly), and using the completely different approach of the Google Places Javascript Library in which the BROWSER executes Javascript using the Javascript library provided by Google (that internally wraps calls to the Google Places API, so that you, as a Javascript programmer, only need to understand the Javascript library provided by Google, and use that)?
Here are the two scenarios.
Scenario #1: Use the API directly. For this method, you must refer to Google's API documentation for the Google Places API: https://developers.google.com/maps/documentation/places/.
Using this API works as follows (giving a simple example only). Say you want to retrieve places within 1000 meters of latitude=-27.2531166, longitude=138.8655664. You need to hit a URL as described by the API documentation: https://developers.google.com/maps/documentation/places/#PlaceSearchRequests.
In this example, the URL looks like this (it's long):
https://maps.googleapis.com/maps/api/place/search/json?location=-27.2531166,138.8655664&radius=1000&sensor=false&key=AddYourOwnKeyHere
You need a key for your personal use, which I assume you have. There are other options you can specify, such as limiting the results to restaurants, etc.
When you hit this URL, the data will be returned in either JSON, or XML format, as specified by the text json in the URL above (use the text xml for xml). This data is returned exactly like data is returned from any URL call when you hit a URL in your browser.
You can test this by simply typing the URL directly in your browser, and see the results.
To use the API directly from code, you will need to use code that hits the external URL above within code and retrieves the results within code (for example, using the PHP CURL library, or using AJAX in Javascript).
Scenario #2: You use the Javascript library that Google provides that wraps the API, so you don't need to deal with it. I'll update the answer with more details about this, if you don't know what this is.
The docs do discuss the two different approaches. The Places Library utilizes the Google Places services from within the JavaScript Google Maps API. If you are using the Google Maps API in a browser, this is probably the approach for you:
https://developers.google.com/maps/documentation/javascript/places
There is also a web service, which allows you to query directly from your application. You query it using direct http calls to Google services. If you need access to the data on your server or a mobile device, this is the approach you want to take:
https://developers.google.com/maps/documentation/places