how to get campaign meta period

36 views
Skip to first unread message

sangkil an

unread,
Dec 16, 2019, 4:10:46 AM12/16/19
to AdWords API and Google Ads API Forum
hi, 

i give get to by period campaign meta data. 

how to campaign, adgroup, ad  by period  meta data.

my query 
--------------------------------------------------
String sqlQuery = String.format(
"SELECT\n"
+ " customer.id\n"
+ " ,ad_group.id\n"
+ " ,campaign.id\n"
+ " ,ad_group_ad.ad.id\n"
+ " ,ad_group_ad.ad.name\n"
+ " ,ad_group_ad.ad.app_ad.images\n"
+ " ,ad_group_ad.ad.type\n"
+ " ,ad_group_ad.ad.resource_name\n"
+ " ,ad_group_ad.status\n"
+ " ,campaign.start_date\n"
+ " ,campaign.end_date\n"
//+ " ,segments.ad_network_type\n"
//+ " ,segments.date\n"
+ "FROM\n"
+ " ad_group_ad\n"
+ "WHERE\n"
//+ "segments.date DURING LAST_30_DAYS' \n"
//+ "segments.date >= '" + startDate.toString() + "' AND segments.date <= '" + endDate.toString() + "' \n"
//+ "campaign.start_date >= '" + startDate.toString() + "' AND campaign.start_date <= '" + endDate.toString() + "' \n"
+ "AND customer.id = %s\n"
, accountId
);

--------------------------------------------------

thank tou


Google Ads API Forum Advisor Prod

unread,
Dec 16, 2019, 12:16:58 PM12/16/19
to an.sa...@gmail.com, adwor...@googlegroups.com

Hello,

Thank you for reaching the support. Could you please confirm if my understanding is correct and you are looking to retrieve the campaigns, ad groups and ads details via Google Ads API during specific time period? If yes, please refer to this guide for specifying the custom and predefined date range in your Google Ads query. Please find below the sample report query and this code sample for reference. You could also use Interactive Query Builder to build query and specify the customer id in the request header to access API. If this doesn't clarify your concerns, could you please elaborate more on your requirements for me to assist you better?

SELECT campaign.id, campaign.name, ad_group.id, ad_group.name, ad_group_ad.ad.id, ad_group_ad.ad.name FROM ad_group_ad WHERE segments.date BETWEEN '2019-11-01' AND '2019-11-30'

P.S. Please use Reply privately to author option while sharing the sensitive details for investigation.

Regards,
Nikisha Patel, Google Ads API Team



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