所以我有点卡住了。我想使用R从Adwords API中提取关键字列表的平均CPC和最高CPC出价。如果很难,python也可以正常工作:)。
我尝试使用RAdwords,但是在adwords https://developers.google.com/adwords/api/docs/appendix/reports
的列表中找不到正确的报告类型。答案 0 :(得分:0)
使用 RAdwords 包,您可以查询Adwords / Google Ads API并下载所有关键字统计信息。相应的报告类型为KEYWORDS_PERFORMANCE_REPORT
。请注意,在Adwords API文档中,criteria
与该报告类型内的关键字文本相关。
# Authentication
library(RAdwords)
google_auth <- doAuth()
# Create the statement
body <- statement(select = c('Criteria', 'AverageCpc', 'CpcBid'),
report = "KEYWORDS_PERFORMANCE_REPORT",
start = "2018-01-01",
end = "2018-01-10")
# Query the Google Ads API
# Make sure to use the Adwords Account Id (MCC Id will not work)
data <- getData(clientCustomerId = 'xxx-xxx-xxxx',
google_auth = google_auth,
statement = body)