Using google maps api, how to find all ZIP codes within a radius? - location

I need to find all zipcodes within a given radius. I've googled a page that does exactly that: https://www.freemaptools.com/find-zip-codes-inside-radius.htm but its author doesnt respond. Any ideas how he did that?

Here's a product ZipCodeAPI that does that.
Use this API to find all US zip codes within a given radius of a zip code. Send a GET request to https://www.zipcodeapi.com/rest/<api_key>/radius./<zip_code>//.
There is a free subscription and a paid subscription available.

Related

Google Place API for airports

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.

How to get all images for a given hotel, using Self-Service Amadeus API?

We tried in many ways without success.
Can only get one main picture.
(There was a question posted before on this topic Amadeus Hotel API Images, however the answer doesn't work.)
You can get more images using the second endpoint of the Hotel Search API and adding the parameter &view=FULL_ALL_IMAGES
For example:
https://test.api.amadeus.com/v2/shopping/hotel-offers/by-hotel?hotelId=BGMILBGB&adults=2&roomQuantity=1&paymentPolicy=NONE&view=FULL_ALL_IMAGES

Load the creative information with the adgroup not just the creative id

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}

How can I get ESPN Developer to return more golfers?

I just created an account with ESPN Developer, and I'm trying to get a list of all the Professional Golfers. I made the following request:
http://api.espn.com/v1/sports/golf/athletes?&apikey=[mykey]
Unfortunately, the browser only shows a handful of names (which are in alphabetical order). How can I get the API request to return all the golfers?
According to my research, you should be seeing all of the Golfers that they have.
If you use http://api.espn.com/v1/sports/golf?apikey=KEY, you will get a list of "all organizing bodies" in the sport. You can (if you have the patience) go through that list, and check to see if they are listed in the data returned from your (correct) API URI, along with the members of each section.
You can also use http://api.espn.com/v1/sports/golf/pga/athletes?apikey=KEY to get a list of athletes in that organization. Be sure to replace "pga" if you are looking for something else.
I just now created a Developer account there and requested a key to assist you with your question, so I could be wrong. If I am I will certainly come back to better answer your question.
I am reading this post http://www.javacodegeeks.com/2013/06/parsing-espn-api-using-java-and-google-gson.html
The NBA request http://api.espn.com/v1//sports/basketball/nba/athletes?apikey=KEY returns only 50 athletes, you have to use the offset parameter to get more
http://api.espn.com/v1//sports/basketball/nba/athletes?apikey=KEY&offset=51
So in your case
http://api.espn.com/v1/sports/golf/athletes?&apikey=KEY&offset=51
I am still reading the post but now I see I can return more players and the first request only got to players last name ending with B so geeze to get all athletes the JSON response would be huge!
I can't find this on the ESPN docs, so I don't know how developers are supposed to know this, there may be a better way but at least now I know how to get all the players.

How to get Country for Google Places API nearby search

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

Resources