structuredPostalAddress - not giving structured addresses?

127 views
Skip to first unread message

Donovan Walker

unread,
Jun 18, 2009, 9:16:18 PM6/18/09
to Google Contacts API
I'm connecting and getting contacts in 3.0 format and that's great
BUT....

My client stores postal addresses in a structured way, and I'm only
getting 'formattedAddress' in the 'structuredPostalAddress' field when
I ask for a contact list. Is there something special I need to do?
Something in the query string perhaps?

A sample of what I'm getting
[gd$structuredPostalAddress] => Array
(
[0] => Array
(
[rel] =>
http://schemas.google.com/g/2005#home
[gd$formattedAddress] =>
Array
(
[$t] => 4616 W.
Laurel Lane
Glendale, AZ 85304
)

)

)

Donovan Walker

unread,
Jun 19, 2009, 6:23:36 PM6/19/09
to Google Contacts API
I've checked the raw - json result and don't see any structured data
in it. I've retrieved XML. Same result.

Help!

Julian (Google)

unread,
Jun 21, 2009, 7:54:06 AM6/21/09
to Google Contacts API
Hi,

Thank you for the feed back, as I mentioned in other posts, there has
been a lot of work upgrading and improving the unstructured data
parsing, Address parsing is in our top priorities but it will take few
more weeks, we will keep you posted here in the group.

Cheers,
Julian

Donovan Walker

unread,
Jun 21, 2009, 11:59:18 PM6/21/09
to Google Contacts API
Fantastic. Keep us posted.

As you improve parsing ability, it would be wonderful to have a parse
address call. I'm considering moving my application to u structured
But it's a bit of. One way leap at this point.

Wishing yoy well

Devang Parekh

unread,
Jun 22, 2009, 12:28:25 AM6/22/09
to google-co...@googlegroups.com
Hello, I would like to join this thread. I also update my client as googleVersion3. I notice one issue in version3 other then structuredAddress. In documentation, googleVersion3 gives new nameProperty like familyName, givenName etc. But i can't retrieve it. There are no such tags in raw XML of googleResponse. This may in under development but i just want to notify you about this.

Regards,
Devang

LC

unread,
Jul 19, 2009, 10:47:07 PM7/19/09
to Google Contacts API
Hi, i am using Google Contacts APIv3 in protocol way.
I found there is a problem about update the contacts information in
v3.
when I add a strucutredAddress ex:
<gd:structuredPostalAddress>
<gd:formattedAddress>1600 Amphitheatre Pkwy Mountain View</
gd:formattedAddress>
<gd:street>1600 Amphitheatre Pkwy</gd:street>
<gd:postcode>94043</gd:postcode>
<gd:city>Mountain View</gd:city>
<gd:region>CA</gd:region>
<gd:country>United States</gd:country>
</gd:structuredPostalAddress>

adding by protolcol API is working...
after adding this, I get it by protocol API is still working.

But if I modify it in my Web Gmail page,
Then I try to get it again by protocol API.
it will response with only
<gd:structuredPostalAddress>
<gd:formattedAddress>1600 Amphitheatre Pkwy Mountain Vie
</gd:formattedAddress>
</gd:structuredPostalAddress>
like this.
Then I update it again with the responsed XML by protocol API without
modifying it
the information is not workable(not visiable) in gmail contacts.

Tks


On Jun 22, 12:28 pm, Devang Parekh <devangsofte...@gmail.com> wrote:
> Hello, I would like to join this thread. I also update my client as
> googleVersion3. I notice one issue in version3 other then structuredAddress.
> In documentation, googleVersion3 gives new nameProperty like familyName,
> givenName etc. But i can't retrieve it. There are no such tags in raw XML of
> googleResponse. This may in under development but i just want to notify you
> about this.
> Regards,
> Devang
>

Donovan Walker

unread,
Jul 20, 2009, 3:54:43 PM7/20/09
to Google Contacts API
Let me see if I understand (I don't have a solution, but your language
is a little confusing)..
The process is as follows
* add a structured address via the api
* ask for the address via the api -> you get a structured address back
* update the same address in gmail's contact interface
* ask for the address via the api -> you get a formatted address back,
but not a structured one

Is this correct?

Charlie Wood

unread,
Jul 21, 2009, 8:48:35 AM7/21/09
to Google Contacts API
Yes, that's the behavior we're seeing.

Thanks,
Charlie

Donovan Walker

unread,
Jul 22, 2009, 11:43:34 AM7/22/09
to Google Contacts API
So, it looks like google doesn't have a address parsing implemented.
About 1 month ago Julian said they were working on it. I think it's
time to start asking.

As an interim solution, I'd suggest moving to a single string address
solution, or looking into the USPS api. They have address validation.
I haven't used it, but I would be willing to bet you can get a
structured address from them. (I wonder why google hasn't talked with
them about getting their algorithm)

Charlie Wood

unread,
Jul 22, 2009, 12:31:09 PM7/22/09
to Google Contacts API
We use the structured data if it's there, and parse the formatted data
if it's not. (Interestingly, Google Sync for iPhone, which uses the
Exchange ActiveSync protocol, uses the structured fields, which is
nice.)

Postal address parsing is an ugly business. Hopefully the Contacts
team will address this soon. And maybe they can throw structured
contact names in there too. :-)

Regards,
Charlie

Donovan Walker

unread,
Jul 23, 2009, 9:25:32 AM7/23/09
to Google Contacts API
It sure is a tough one. There's an entire county in Wisconsin who's
street names are distances on a grid system... so you might have "3
1/4 St".

Might I ask what library you're using to parse? I've heard others who
need structure use the google maps geocoder.

Charlie Wood

unread,
Jul 29, 2009, 9:15:19 AM7/29/09
to Google Contacts API
We use our own algorithm to parse addresses. It works pretty well in
the US and Canada, but fails quickly and badly for addresses in other
countries. We recommend to our users that they edit names and
addresses in Mac OS X's Address Book and sync (so the data ends up in
Google's structured fields) instead of editing in Google Contacts.

Regards,
Charlie
Reply all
Reply to author
Forward
0 new messages