hi i want to find nearby places using current location.i went through many documentation and also logged in developer.google.com/console and created new project.In services i enabled google api services,but when i try to place this below link in the browzer https://maps.googleapis.com/maps/api/place/search/json?location=12.91136601187478,77.598882598177313&radius=5000#&types=bar#&sensor=true&key=MYkey
it gives
{`"html_attributions" : [],``
"results" : [],
"status" : "REQUEST_DENIED"
}`
why this happens?? i am not able to find solution for this even though going through many documentation can anyone tel me the solution for this.
Use Google nearBySearch.
There is example:
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&radius=500&types=food&name=harbour&sensor=false&key=AddYourOwnKeyHere
On the link below you can find full spec. In your request you need to fill out all required parameters (location, radius, sensor and AppKey), otherwise you will get "REQUEST_DENIED"
https://developers.google.com/places/documentation/search
Don't forget to turn on service "Places API" under developer console.
Related
I am trying to use the Google Calendar API to enable users of my application to create events, retrieve events info, and finally delete events in their google calendar directly from my app, which is by the way built in bubble.io.
I have successfully setup the first 2 usecases, but I am having issues setting up the last one.
I have tried to follow the API documentation from google, but without any luck so far. See screenshot attached of how my call looks right now - I have tried various variations of this call, but always get an error with "code: 404, Message: not found".
I think you should add parameters like as follow :
enter image description here
You can find more info here : https://developers.google.com/calendar/v3/reference/events/delete
Let me know if it was of any help,
A proud member of Bubble community.
I'm trying out a simple code I found using www::google::customsearch. I know that google and yahoo has already change its policy in allowing these searches.
use strict;
use warnings;
use Data::Dumper;
use WWW::Google::CustomSearch;
my $api_key = 'Your_API_Key';
my $cx = 'Search_Engine_Identifier';
my $engine = WWW::Google::CustomSearch->new(api_key => $api_key, cx => $cx);
print Dumper($engine->search("Google"));
I am not sure if this module will work. I was just trying to test it. This is a sample from cpan. I tried running the code I keep getting a missing argument which is the api key.
This is so far what I have done. I have signed in google and created a custom search engine. I copied the search engine reference code. I have tried the example code in javascript. I placed it in a sample html. It works.
I have also signed in google and turned on custom search engine api, and generated an app key.
What is the correct step in getting an application key?
I tried running the code I keep getting a missing argument which is the api key.
You did not try to execute the given code as it is, did you? You are supposed to pass the actual key in below line.
my $api_key = 'Your_API_Key';
Your_API_Key should be replaced with the key you get from Google API console.
What is the correct step in getting an application key?
Quoting from the documentation on how to find it.
The JSON / Atom Custom Search API requires the use of an API key,
which you can get from the Google APIs console. The API provides 100
search queries per day for free. If you need more, you may sign up for
billing in the console.
The official Google API document can be found here. For more
information about the Google custom search, please click here.
I have just signed up to have access to espn api and I just want to access a specific teams data but an error message appears saying "timestamp" :"2014-04-06T22:36:39Z","message" :"Improper API URI","status" :"error","code" :404"". The link I'm putting in with my api key is "http://api.espn.com/v1/sports/soccer/english-premier-league/arsenal?apikey=****". I know you need an id with the team but where do I get that from and I don't think the link recognizes 'english-premier-league'.
Have you tried using the online API testing tool at http://developer.espn.com/io-docs?
Enter your API Key, and then find the endpoint to try. Note that not all endpoints are supplied via the dropdown boxes.
With a little detective work, I found what you might be looking for
http://api.espn.com/v1/sports/soccer/eng.1/teams/359?apikey=xxxxxxxxxxxxx
How can i use Google search api to get like on the google engine, title of website,a short description and URL. Is it possible?
I tried the api but it gives me only some information that doesn`t have a url or title to a website.
Using the Google shopping api, you can retrieve the title, short description and url. I've achieved this in a c# application where it returns a json file from the url below and parse over it.
You need a apiId to start with.
Using this url you can add search parameters after the q, in this example just searching for digital camera.
https://www.googleapis.com/shopping/search/v1/public/products?key=key&country=US&q=digital+camera
See http://code.google.com/apis/shopping/search/v1/getting_started.html
for more details
I'm not sure that I have enough information, but I find the Google Custom Search API reference page has the reference JSON/ATOM examples:
https://code.google.com/apis/customsearch/v1/reference.html
This query will get you started:
https://www.googleapis.com/customsearch/v1?key={YOURAPIKEY}&cx={cx?}&cref={cref?}&q=st%20olaf
Does this get you started?
Take care!
speeves
Is there a service that will give me the driving distance between two addresses? Apparently Google Maps API requires you to display a map, which I don't want to do (on that particular page), and I'd like to just snag the data and save it to my DB after a user submits a form, rather than waiting for JS to do it's thing.
If it's relevant, this is going into a Django app. I discovered that CloudMade offers a Python API, which is nice, except their latest dev release has a bug in it (can't use the API object), but more importantly, it's support for Canada is awful (couldn't find directions from any major city around here!).
MapQuest's Directions API is HTTP Querystring based (I'm not sure if it's entirely RESTful). Can get XML or JSON response. Just need to send it an HTTP GET Request.
http://developer.mapquest.com/web/products/open/directions-service
Use the "distance" response parameter.
I don't have a high enough reputation on SO to comment on an answer but I just wanted to be clear that contrary to the voted correct answer, Google Directions API has to adhere to the Google Maps API. If you scroll down the supplied link, you will see:
Note: the Directions API may only be used in conjunction with displaying results on a Google map; using Directions data without displaying a map for which directions data was requested is prohibited. Additionally, calculation of directions generates copyrights and warnings which must be displayed to the user in some fashion. For complete details on allowed usage, consult the Maps API Terms of Service License Restrictions.
Would it be possible to use Google Maps GDirections object? This can return the textual directions instead of the map overlay if called with a div object. From there you can use the getDistance (or getDuration) functions. You can always use an invisible div for the returns if you don't want anything to be displayed on the page.
Start here
http://code.google.com/apis/maps/documentation/examples/directions-advanced.html
http://code.google.com/apis/maps/documentation/reference.html#GDirections
And use this sample code
var map;
var directionsPanel;
var directions;
function initialize() {
directionsPanel = document.getElementById("route");
directions = new GDirections(null, directionsPanel);
GEvent.addListener(directions , "load", onGDirectionsLoad);
directions.load("from: 500 Memorial Drive, Cambridge, MA to: 4 Yawkey Way, Boston, MA 02215 (Fenway Park)");
}
function onGDirectionsLoad(){
alert(directions.getDistance().html);
}
Here is my solution:
Signup for Mapquest Developer network.
Get AppId
Open your command shell and run the following command(or use fiddler) But running it through curl will give you flexibility to automate your request
curl -X POST -H "Content-Type: application/json" -d '{locations: ["Salt Lake City, UT","Ogden, UT",],options: {allToAll: false}}' http://www.mapquestapi.com/directions/v2/routematrix?key=YOURKEYGOESHERE >> distance.txt
Save above command with all your destinations into batch or sh file.
Now grep and parse out your distance.txt file for what you need.
There are free services out there, but the quality of the data may be questionable/non-existent in areas. Be aware of licences on the data too, storing in your own DB may be a breach.
http://openrouteservice.org/
Take a look at Navteq. I used their service in developing a driving directions application about 5 years ago, and got good results. Can't speak for them lately though. I believe the best URL is Navteq Routing Service
You can use the new Google Directions API directly, without using any javascript.
http://code.google.com/apis/maps/documentation/directions/