Getting country, region, and city names from geo performance report?

3,397 views
Skip to first unread message

Jason Doucette

unread,
Aug 24, 2015, 8:30:26 AM8/24/15
to AdWords API Forum
Hi, it looks like the API was corrected in 201502 so that the CountryCriteriaId etc fields would return the criteria ID instead of the names associated with them. Is there a way to pull a geo performance report with the latest API so that we can get the actual names of the country, region and city in addition to or instead of the criteria IDs?

Thanks,
Jason

Umesh Dengale

unread,
Aug 24, 2015, 5:53:12 PM8/24/15
to AdWords API Forum
Hi Jason,

In the AdWords API v201502 and v201506, the CountryCriteriaId (and other location criteriaId fields) returns the criteriaId instead of a name. The CountryCriteriaId field of the GEO_PERFORMANCE_REPORT will return the country location Id. You could use the LocationCriteriaService to get the name of the country associated with the CountryCriteriaId.

Regards,
Umesh, AdWords API Team.

Jason Doucette

unread,
Aug 25, 2015, 10:21:06 AM8/25/15
to AdWords API Forum
Thanks Umesh - is there a way to do that without issuing 15,000 API calls? (between country, region and city that's about the number of distinct ids we pulled one day this week)

Jason

Umesh Dengale

unread,
Aug 25, 2015, 4:04:01 PM8/25/15
to AdWords API Forum
Hi Jason,

You could download city (Cities-DMA Regions) and country (Geographical Targeting) codes as .csv. You could store it in your database and get the city/country names by querying your database when needed.

Thanks,
Umesh, AdWords API Team.

Tom Kendle

unread,
Sep 28, 2015, 10:45:15 AM9/28/15
to AdWords API Forum
Hi Umesh,

The lookup .csv you linked to is only for the US. What about people elsewhere? We are getting 100,000s of rows a day of UK locations so can't use the LocationCriteriaService. Can we  have an option to return either IDs or resolved names?

Thanks

Umesh Dengale

unread,
Sep 28, 2015, 3:59:03 PM9/28/15
to AdWords API Forum
Hello,

You could download country (Geographical Targeting) file which has the available geographical targets for other countries(including UK) and city (Cities-DMA Regions) file which gives US cities and DMA regions. You could store it in your database and get the city/country names by querying (the criterion id) to your database when needed.

glance...@globalanalyticscenter.com

unread,
Oct 20, 2015, 11:09:27 AM10/20/15
to AdWords API Forum
Hi Umesh,

We downloaded the CSV file from the posted link (AdWords API Location Criteria 2015-10-13.csv) and it appears that few entries that came through API as names are not listed in the CSV file under the right category (apparently).
  1. We have "Aruba" under CountryCriteriaId (from previous API) but in the CSV file Aruba (id: 2533) is under TargetType "Region". We have 22 such entries for country that appear under "Region" target type instead of Country -- Aruba,Guadeloupe,Puerto Rico,Turks and Caicos Islands,British Virgin Islands,Cayman Islands,Kosovo,Other,Timor-Leste,Martinique,Taiwan,Anguilla,Bermuda,Faroe Islands,Gibraltar,Greenland,Hong Kong,Macau,Mayotte,Netherlands Antilles,Palestine,U.S. Virgin Islands
  2. We have two entries in "RegionCriteria" British Columbia (id: 20114) and Ontario (id: 20121) that appear under "Province" target type instead of "State" (like other regions do).
I wanted to know how to map these existing country and region criteria names.

Thanks.

Nadine Sundquist (AdWords API Team)

unread,
Oct 21, 2015, 9:38:25 AM10/21/15
to AdWords API Forum
Hello,

We have "Aruba" under CountryCriteriaId (from previous API) but in the CSV file Aruba (id: 2533) is under TargetType "Region". We have 22 such entries for country that appear under "Region" target type instead of Country -- Aruba,Guadeloupe,Puerto Rico,Turks and Caicos Islands,British Virgin Islands,Cayman Islands,Kosovo,Other,Timor-Leste,Martinique,Taiwan,Anguilla,Bermuda,Faroe Islands,Gibraltar,Greenland,Hong Kong,Macau,Mayotte,Netherlands Antilles,Palestine,U.S. Virgin Islands

=> I don't know if this list has changed recently, but the ones you have listed look like regions to me. By most international standards, they don't fall under the category of Country


We have two entries in "RegionCriteria" British Columbia (id: 20114) and Ontario (id: 20121) that appear under "Province" target type instead of "State" (like other regions do).

=> Since you said 'other regions', I checked Alberta and Quebec in the list. Both of them appear as Regions in the list. Subdivisions of countries can be different depending on the country. Canada has provinces and territories. The United States has states. Switzerland has cantons, while other countries won't have that.

Best,
Nadine, AdWords API Team
Reply all
Reply to author
Forward
0 new messages