How to get resource id from resource_name?

42 views
Skip to first unread message

yogitr...@gmail.com

unread,
Jan 17, 2022, 4:56:29 AM1/17/22
to Google Ads API and AdWords API Forum
I'm working on migrating our code which is using Adwords CLICK_PERFORMANCE_REPORT to use Google Ads API click_view. 

Some attributes such as ad group ad, keyword and user_list are being returned as RESOURCE_NAME. What's the correct way to extract the resource id out of the  RESOURCE_NAME?

Google Ads API Forum Advisor

unread,
Jan 17, 2022, 4:13:40 PM1/17/22
to yogitr...@gmail.com, adwor...@googlegroups.com
Hi,

Ad resource names have the form: /customers/{customer_id}/ads/{ad_id}. Ad group criterion resource names (including keywords) have the form: /customers/{customer_id}/adGroupCriteria/{ad_group_id}~{criterion_id}. A user_list resource name is  customers/{customer_id}/userLists/{user_list_id}.

Regards,

Google Logo
Aryeh Baker
Google Ads API Team
 


ref:_00D1U1174p._5004Q2VMZOX:ref
Reply all
Reply to author
Forward
0 new messages