Hi,
Thank you for reaching out to Google Ads API Forum.
1) I need to get campaigns clicks, cost etc. for today(or a particular date) on hourly basis something like the below image performancegraph.png, I have attached.
>> You may try segmenting your query by segments.hour together with adding filter segments.date in the Campaign report.
Sample query:
SELECT
metrics.clicks,
metrics.cost_micros,
segments.hour
FROM campaign
WHERE
segments.date = {specific date}'
2) How I can I get total cost, total clicks of a campaign between two dates?
>> You may try adding the two dates in your segments.date filter and use the BETWEEN operator.
SELECT
metrics.cost_micros,
metrics.clicks
FROM campaign
WHERE
segments.date BETWEEN '{date1}' AND '{date2}'
You may also refer to the Google Ads Query Language Grammar guide for more information on the Google Ads Query Language grammar reference.
Let us know how it goes. If you encounter issues after trying the suggested solution, then you may provide to us the complete API logs (request and response with request-id and request header) generated on our end so we can investigate further. You can provide it via the Reply privately to author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.
Links included in this email:
![]() |
Google Ads API Team |