Hello,
Using this simple string we can pull info about an adress. Im importing addresses from Airtable and I’m wondering if it is possible to automatically paste the addresses in the green area. Then I want to take out the lat long from the result I get and paste it into two other fields (see below).
Is this possible? Can someone help me?
Geocoder request code:
https://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&key=YOUR_API_KEY
Here is the result from the code above, I want to extract the green strings (the lat and long) and paste them into two separate fields to another form:
{ "results" : l { "address_components" : n { "long_name" : "Google Building 40", "short_name" : "Google Building 40", "types" : p "premise" ] }, { "long_name" : "1600", "short_name" : "1600", "types" : p "street_number" ] }, { "long_name" : "Amphitheatre Parkway", "short_name" : "Amphitheatre Pkwy", "types" : p "route" ] }, { "long_name" : "Mountain View", "short_name" : "Mountain View", "types" : p "locality", "political" ] }, { "long_name" : "Santa Clara County", "short_name" : "Santa Clara County", "types" : p "administrative_area_level_2", "political" ] }, { "long_name" : "California", "short_name" : "CA", "types" : p "administrative_area_level_1", "political" ] }, { "long_name" : "United States", "short_name" : "US", "types" : p "country", "political" ] }, { "long_name" : "94043", "short_name" : "94043", "types" : p "postal_code" ] } ], "formatted_address" : "Google Building 40, 1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA", "geometry" : { "bounds" : { "northeast" : { "lat" : 37.4226618, "lng" : -122.0829302 }, "southwest" : { "lat" : 37.4220699, "lng" : -122.084958 } }, "location" : { "lat" : 37.4223878, "lng" : -122.0841877 }, "location_type" : "ROOFTOP", "viewport" : { "northeast" : { "lat" : 37.42372298029149, "lng" : -122.0825951197085 }, "southwest" : { "lat" : 37.4210250197085, "lng" : -122.0852930802915 } } }, "place_id" : "ChIJj38IfwK6j4ARNcyPDnEGa9g", "types" : p "premise" ] } ], "status" : "OK"}