I have a requirement to show airports close to a particular lat/long with a specific radius. For that, I used google search nearby APIs below.
My problem is that I want to get only airport info but the problem is the API is fetching helipad too. How I can be more specific? Query URL :
https://maps.googleapis.com/maps/api/place/nearbysearch/json?key=keyVal&location=lat,long&radius=10000&type=airport
Is there any way to filter the results to get airports only from the above ?
I believe that's how this endpoint works. But there is always a way to filter results as per your requirement. I can help more if you provide the how the response JSON looks like.
Related
I want to get place_ids of hierarchical result, following the answer in Hierarchical & translated results of a placeId using Google Places
Everything goes fine at first, but in this request:
https://maps.googleapis.com/maps/api/geocode/json?latlng=-34.63289,116.12236&key=MY_KEY&language=en&result_type=country|administrative_area_level_1|administrative_area_level_2|locality
country component is missing.
How can I fix this?
I am trying to filter data from YouTube data API (using commentThreads).
Goal here is to get all the comments published for the channel after 2018-03-25. I have tried different date formats and it looks like the filter is not working as I get all the results back.
Any ideas?
https://www.googleapis.com/youtube/v3/commentThreads?part=snippet&allThreadsRelatedToChannelId=UCU34OIeAyiD4BaDwihx5QpQ&key=xxxx&maxResults=100&publishedAfter=2018-03-25T13:15:30Z
I've never used the Youtube google api, but assuming that this is the API reference: https://developers.google.com/youtube/v3/docs/commentThreads/list
It doesn't mention the publishedAfter-option, which leads me to believe that it doesn't exist?
This probably means that you'll need to use the order option along with maxResults to achieve your goal.
I am trying to figure out if anyone has a better way to load facebook adgroups with the creative information. So far the only way I have been able to find is, load all the adgroups using the api point here: /act_{account_id}/adgroups
I pass the fields 'creative' to get the id, then I have to load all the creatives and pull the data i want.
I can not seem to find a way to filter the creatives to only return the ones I want. Returns all the creatives that ever existed in the account. Seeing that some accounts have 25k+ creatives this is an issue.
The creative endpoint is: '/act_{account_id}/adcreatives/'
https://developers.facebook.com/docs/marketing-api/adcreative/v2.3
Ideally, it would be amazing if there was a way to just load the creative information directly from the adgroup listing.
I am just looking for a few fields in the adcreative url_tags and object_story_spec
You can use nested request for that. In your case the URL would look like this
/v2.3/<adgroup_id>?fields=creative{url_tags,object_story_spec}
The documentation says how I can limit searches to a country by using componentRestrictions. However, the documentation apparently only relates
to JavaScript.
I'm doing a regular request from a PHP application, and need to limit a place
search to a country. However, I can't see how I can limit search results to a country using a regular GET request.
I believe you can just add components=country:XX to your request URL :)
I'm using Google Places API to get nearby places, but I've noticed that while I get the place names and addresses, the results don't include the Country.
Is there a way to get the country included in the results?
This is the call I'm using:
https://maps.googleapis.com/maps/api/place/nearbysearch/xml?location=<lat,lng>&radius=100&sensor=true&key=<api_key>
Thanks!
The Geocoding API is what you want.
Try
http://maps.googleapis.com/maps/api/geocode/json?address=Calgary,%20Alberta&sensor=false
it'll return fully formatted address info in several ways (split by administrative level, formatted as an address,etc.)
also the place Types blog in google api will help..link is here