0
votes

Is there any chance to change the Geocode API Response for below postal code 63126, as it is resulting in the same response for both short_name and long_name for locality political.

Please check the expected data for both long_name and short_name

{
               "long_name" : "St. Louis",
               "short_name" : "St. Louis",
               "types" : [ "locality", "political" ]
},

https://maps.googleapis.com/maps/api/geocode/json?address=63126&key=(useyourkey)

{
   "results" : [
      {
         "address_components" : [
            {
               "long_name" : "63126",
               "short_name" : "63126",
               "types" : [ "postal_code" ]
            },
            {
               "long_name" : "St. Louis",
               "short_name" : "St. Louis",
               "types" : [ "locality", "political" ]
            },
            {
               "long_name" : "St. Louis County",
               "short_name" : "St Louis County",
               "types" : [ "administrative_area_level_2", "political" ]
            },
            {
               "long_name" : "Missouri",
               "short_name" : "MO",
               "types" : [ "administrative_area_level_1", "political" ]
            },
            {
               "long_name" : "United States",
               "short_name" : "US",
               "types" : [ "country", "political" ]
            }
1

1 Answers

1
votes

There is no way to change the API response, but you can report a bug or a feature request in https://developers.google.com/issue-tracker/

Although I do not see anything wrong with the response. short_name and long_name are the same for locality political because there is no shorter nor longer way for St. Louis.