0
votes

Can some please tell me why this call to Google geocoding API returns no results. https://maps.googleapis.com/maps/api/geocode/json?address=1226%20Freeport%20Road+Defuniak%20Springs+FL+32433

1
Because that address isn't in geocoder's database. Why do you think it should be in the geocoder's database?geocodezip
it should be because it's a valid address like any. It's one of the event sites for a project I am working on and I cannot geocode it though it shows up fine when searched on google maps. Thanks!NShaik
@geocodezip Well it also makes me ask...since I can geocode my home address...why IS IT IN the geocoder's database?NShaik
The only locations that list that address in the places database (so I assume on google maps) are stores at a shopping mall. You might need to use the "send feedback:report a data problem" link on google maps to get it in the geocoding database.geocodezip

1 Answers

1
votes

You can find this address using the Places API request:

https://maps.googleapis.com/maps/api/place/textsearch/json?query=1226%20Freeport%20Road%20Defuniak%20Springs%20FL%2032433&key=YOUR_API_KEY

Why you cannot find it with Geocoding API? If you check the response from Places API you will see the following:

"results":[
{
  "formatted_address":"1226 Freeport Road, Defuniak Springs, FL 32433, United States",
  "geometry":{
    "location":{
      "lat":30.7045583,"lng":-86.1251103
    }
  },
  "icon":"https://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png",
  "id":"bcb674fa738a9af907230e17fb25014a498d7987",
  "name":"Subway",
  "opening_hours":{
    "open_now":true,
    "weekday_text":[

    ]
  },
  "place_id":"ChIJn1aPjK3Rk4gRL0ZTnQtbwS0",
  "price_level":1,
  "reference":"CmRRAAAAvNQhXr-Zgrhc2HdI8hECvgzuLZQfTgP1MdA0oH-db5-8SPiXOLIsKYYMYUCTEQreUdP4JwV-EBZJhttf52dUFCOBzAHF7iOrgvtEnDpe_EcoBqg6z_bPo14X9_CW9ZafEhApON7yxIXlHbhjqdz7qe37GhTWK5ifCApitBrSehqI8bIG03Z2IQ",
  "types":[
    "restaurant","food","point_of_interest","establishment"
  ]
},....

Please note that this place has types "restaurant","food", ... So it represents a business. Geocoding API filters all businesses out and works only with features that have type street address.

You can create a street address yourself using Map Maker:

https://mapmaker.google.com/mapmaker

Hope it helps!