Is there a way to obtain the ISO 3166-2 code for a specific location received from the Geo Performance Report coming from the Google AdWords API?
I need to show a map chart representing countries and those javascript libraries work with ISO Codes.
For example:
API response:
{"Country\/Territory":"2724","Region":"2724","Impressions":"7","Campaign_ID":"1234","Campaign":"video-campaign-test-5c4c476815a9c","Avg_Cost":"12344444","Avg_CPC":"0","Avg_CPM":"12344444","Avg_CPV":"12344444","Clicks":"0","Cost":"94550032","CTR":"0.00%","View_rate":"14.29%","Views":"1"}
So, I can get from the Region code, 2724 that it refers to the ISO code "ES".
There's an official CSV file that provides additional information about Adwords' Geolocations. Among other fields, you'll find the ISO-3166-1 alpha-2 country code for each location ID.
The file can be found here: https://developers.google.com/adwords/api/docs/appendix/geo/geotargets-2019-02-11.csv
Note that it is updated from time to time.