Hi,
Thank you for reaching out to the Google Ads API support team.
In order to get the data of two weeks ago, I would suggest using the
LAST_14_DAYS in the
segments.date or you can use the
custom_date_range. Please refer to the sample query below:
{
"query": "SELECT metrics.cost_micros, segments.week, campaign.name FROM campaign WHERE metrics.cost_micros > 0 AND segments.date during LAST_14_DAYS"
}
You can try making a request using the
Search or
SearchStream. Also, you can use
Query Builder to create your query and
Query Validator to validate your query. For more information, I would suggest that you refer to the
Date Ranges.
This message is in relation to case "ref:!00D1U01174p.!5004Q02tJaOZ:ref" (ADR-00245103)
Thanks,
![Google Logo](https://ci5.googleusercontent.com/proxy/9ju5nEgrbHdGK5lig8X4MQGTM97n8nSbSJ60DOc1vPdXe8gGNPklA-zA7hXOkDgnMgO9hHT2x1N3rPhJg-wqpPZKMcC8T4A2ylAWasD7e8BJotDEo7M=s0-d-e1-ft#https://www.gstatic.com/images/branding/product/1x/googleg_64dp.png) |
Google Ads API Team |
Register for the upcoming workshop: Performance Max and the Google Ads API!
This message is in relation to case "ref:!00D1U01174p.!5004Q02tJaOZ:ref" (ADR-00245103)
Thanks,
![Google Logo](https://ci5.googleusercontent.com/proxy/9ju5nEgrbHdGK5lig8X4MQGTM97n8nSbSJ60DOc1vPdXe8gGNPklA-zA7hXOkDgnMgO9hHT2x1N3rPhJg-wqpPZKMcC8T4A2ylAWasD7e8BJotDEo7M=s0-d-e1-ft#https://www.gstatic.com/images/branding/product/1x/googleg_64dp.png) |
Google Ads API Team |
Register for the upcoming workshop: Performance Max and the Google Ads API!
![](https://ci4.googleusercontent.com/proxy/5TVPiqOgydWx-cJU9UbEuA_vjNbHS09E5Wg_KnDnqYi6UPYOOqH1QJ8cOG8RWXgQTfKQmTN-pxQ2Jxm5CM6fNStwv2J8dHkFBlJ3t0ItxntJ3rtCQWIaScJx-wkdSPMz4xbI1Y3yHfcduQegvcdzuAbwxVhXyqnbC-QGowsc9zHcATqFPSf4r-I3ixOcano=s0-d-e1-ft#https://google-dev-relations.my.salesforce.com/servlet/servlet.ImageServer?oid=00D1U000001174p&esid=0184Q00001PXu9A&from=ext)