Hello Anirudh,
In order to get the data and metrics
<https://developers.google.com/google-ads/api/docs/concepts/api-structure#get_objects_and_performance_stats>
from
your account you can use the GoogleAdsService with the help of Google Ads
Query Language guide
<https://developers.google.com/google-ads/api/docs/query/overview>. The URL
for all search requests will be same as mentioned in below example. In the
below sample query I am getting campaign details for 1 month. please give
it a try and let me know if you have any further questions. Also, this
Interactive
Google Ads Query Builder
<https://developers.google.com/google-ads/api/docs/query/interactive-gaql-builder>
will
help you in building the search queries.
Sample CURL operation below:
curl -H "Authorization: Bearer *ACCESS_TOKEN_HERE*"
-H "developer-token: *DEVELOPER_TOKEN_HERE*"
-H "login-customer-id: *LOG_IN_CUSTOMER_ID*"
-H "Content-Type: application/json"
https://googleads.googleapis.com/v1/customers/*CLIENT_CUSTOMER_ID_HERE*/googleAds:search
--data '{query: "SELECT campaign.id, campaign.name, metrics.clicks,
metrics.impressions, metrics.conversions, metrics.cost_micros FROM campaign
WHERE segments.date DURING LAST_30_DAYS ORDER BY campaign.id"}'
Regards,
Sai Teja, Google Ads API Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
https://ads-developers.googleblog.com/search/label/google_ads_api
https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
On 05/06/19 06:18:07 [email protected] wrote:
I'm confused with the documentation. Could someone guide me on how to make
requests via REST API.
Here is what I have tried.
var options = {
url: 'https://googleads.googleapis.com/v1/customers/
'+accountid+'/adGroups',
headers: {
'Authorization': bearerToken,
'Accept': 'application/json',
'Content-Type': 'application/json',
'login-customer-id': '123456789',
'developer-token': 'ABCDEFGH'
}
};
request.post(options, function(err, response) {
console.log(response);
)};
I keep getting 404 error. I need to fetch different kinds of data based on
a date range.
Example: List of Campaigns, Total Clicks, Total Impressions, Average CPC,
Regionwise Performance.
How should the URL be formed, where can I find a proper guide? Their
official documentation is very confusing for me.
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/56828f9c-b61d-43ae-88c5-52aeeeb82b49%40googlegroups.com
<https://groups.google.com/d/msgid/adwords-api/56828f9c-b61d-43ae-88c5-52aeeeb82b49%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/1a0khig0000000000kl6f60009ji82x6gmjccpg64o30c1g68r32c9h%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.