Google Ads API calls with Bubble.io

645 views
Skip to first unread message

No Code

unread,
Jan 17, 2024, 1:18:35 AM1/17/24
to Google Ads API and AdWords API Forum
Hello, 

 You can help me by sharing the HTTP request to configure the following calls in Bubble.io: 

 -To obtain a list of campaigns per account. 
-To get the accounts associated with a manager account and then view the campaigns for each associated account. 
-To obtain a list of campaigns by date range. 
-To obtain the search terms of a campaign. 

 The only HTTP request that has worked for me is: https://googleads.googleapis.com/v15/customers:listAccessibleCustomers


Google Ads API Forum Advisor

unread,
Jan 17, 2024, 6:52:43 AM1/17/24
to noc...@ads4startups.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

Please find the answers for your questions below:
  1. You can use this endpoint Method: customers.googleAds.searchStream to retrieve data about campaigns via the Google Ads API. 
  • Here's an example query to retrieve all campaign IDs and names for a specific customer:
    SELECT campaign.id, campaign.name
    FROM campaign
    WHERE customer.id = 'YOUR_CUSTOMER_ID'
    
  • You can specify the customer ID to target specific accounts and select the desired campaign fields you want to retrieve (e.g., campaign ID, name, status, budget). Also, you can use our Google Ads Query Builder for a campaign resource that helps build your query to retrieve the specific information you need.
      2. First, use the  List Accessible Customers method to get the list of accounts associated with a manager account. You may also            check this API documentation for more information.       3. You can obtain a list of campaigns by date range using the below sample query: 
SELECT campaign.id, campaign.name, campaign.status
FROM campaign
WHERE segments.date DURING LAST_30_DAYS
     Check this Date Ranges documentation to know about how to specify the date range. Then use the search method endpoint to           retrieve the data.
 
    4. You can use this search_term_view resource to build the query then use this endpoint Method: customers.googleAds.searchStream to retrieve the search term of a campaign.

Additionally, I would suggest you to refer to this Query Cookbook, this guide provides a set of Google Ads Query Language queries that demonstrate how to return the same data as screens in the Google Ads UI

If you still have any queries/concerns related to this, you can get back to us.

 
This message is in relation to case "ref:!00D1U01174p.!5004Q02rX2AQ:ref"

Thanks,
 
Google Logo Google Ads API Team
 
 


No Code

unread,
Jan 25, 2024, 1:11:20 AM1/25/24
to Google Ads API and AdWords API Forum
Thank you very much, I'm reviewing it and setting up calls in Bubble.io. 

I will let you know any new questions related to the topic.

No Code

unread,
Feb 1, 2024, 11:29:29 PM2/1/24
to Google Ads API and AdWords API Forum
Hello, can you share with me the method to make the call from the user's account list? 



 But I don't know if there can be another method to list the accounts.

Google Ads API Forum Advisor

unread,
Feb 2, 2024, 2:47:14 AM2/2/24
to noc...@ads4startups.com, adwor...@googlegroups.com
Hi,

Thank you for getting back to us.

You can use CustomerService.ListAccessibleCustomers method to get the list of accounts associated with a manager account. The list_accessible_customers will return only the accounts that can be directly accessible via the credentials that are used in the API call. Your credentials might be having access to only top level manager account, hence it is resulting that account only.

In order to get the hierarchy of the accounts you have to use Customer_client resource and have to perform search query.

Search Query:"SELECT customer_client.id, customer.id,customer_client.status,customer.status FROM customer_client WHERE customer_client.id='{customer_client.id}'"

You can try making a request using the Method: customers.googleAds.search .

Also, you can use Query Builder to create your query and Query Validator to validate your query.

No Code

unread,
Feb 4, 2024, 8:17:29 PM2/4/24
to Google Ads API and AdWords API Forum
Perfect, thank you very much. 

 I'll be checking it out.

No Code

unread,
Feb 4, 2024, 9:30:20 PM2/4/24
to Google Ads API and AdWords API Forum
Hello, where can I see the data type for each field selected in a SELECT query of a certain call? 

I want to correctly set the data type in the API call for each field selected in the query.

Google Ads API Forum Advisor

unread,
Feb 5, 2024, 2:18:21 AM2/5/24
to noc...@ads4startups.com, adwor...@googlegroups.com
Hi,

Thank you for getting back to us.

To know the data type of each field of CustomerClient resource you can check this API guide, in the same way you can check data type for each field under respective resources. Hope this helps.

No Code

unread,
Feb 5, 2024, 3:14:40 AM2/5/24
to Google Ads API and AdWords API Forum
Hello, good team. 

Can you also help me with the method or what I should do so that in the account listing call I can also get the account name and not just the ID.
Llamada lista de cuentas.pngAccount list.PNG

Google Ads API Forum Advisor

unread,
Feb 5, 2024, 7:43:23 AM2/5/24
to noc...@ads4startups.com, adwor...@googlegroups.com
Hi,

Thank you for getting back to us.

You can use the ListAccessibleCustomers method. As per this document, the expected response for this call is the resource name of customers directly accessible by the user authenticating the call. Kindly note to include the customer_client.descriptive_name for you to get the names of the accounts.

Search Query: "SELECT customer_client.descriptive_name, customer_client.client_customer, customer_client.level, customer_client.manager, customer_client.currency_code, customer_client.time_zone, customer_client.id FROM customer_client"

No Code

unread,
Feb 5, 2024, 11:41:49 PM2/5/24
to Google Ads API and AdWords API Forum
Currently the endpoint or method to obtain the list of accounts is: 

GET lista de cuentas.PNG

But how now I want to get more details like account name, what should be the endpoint? 

I know that you just shared the query and information with me, but I can't configure the call correctly. 

I assume it would be a POST method, what would be the endpoint or URL?

How to obtain the currency per account was also a query that I was going to ask, but I see that you already include it in the query.

Google Ads API Forum Advisor

unread,
Feb 6, 2024, 3:07:32 AM2/6/24
to noc...@ads4startups.com, adwor...@googlegroups.com
Hi,

Thank you for getting back to us.

You can list customers accessible to you with the ListAccessibleCustomers method with only customerResourceName. You may check this guide for more information.

It is not possible to obtain a list of customers names with customer Id, you need to query for each customer Id(CID) to retrieve data from the API. You can use 'Try this method' by providing all required fields with the query provided in the previous mail to obtain data(customer name) from the API. You can find a post HTTP request here. Hope this helps.

No Code

unread,
Feb 7, 2024, 3:26:51 AM2/7/24
to Google Ads API and AdWords API Forum
Can you help me with the HTTP request and everything necessary to be able to make a call where I can get the products with all the information included in the image.
Lista de productos.PNG

Google Ads API Forum Advisor

unread,
Feb 7, 2024, 5:14:10 AM2/7/24
to noc...@ads4startups.com, adwor...@googlegroups.com
Hi,

Thank you for getting back to us.

I would suggest you to check this introduction documentation to know more about the details that you should have to make a Google Ads API call. You may check these guides on Obtain a developer token and Make an API call for more information regarding the developer token, access token and a refresh token. For information regarding client ID and client secret, you can refer to this guide.

Also, refer to the below sample query to retrieve the fields given in the provided screenshot using the shopping_performance_view report:
SELECT segments.product_item_id, metrics.clicks, metrics.impressions, metrics.ctr, metrics.average_cpc, metrics.cost_micros, metrics.conversions, metrics.cost_per_conversion, metrics.conversions_from_interactions_rate FROM shopping_performance_view
You can use Query Builder to create your query and Query Validator to validate your query. Also, you can use search or searchStream endpoint which will return all the rows that match the query. 

No Code

unread,
Feb 13, 2024, 3:33:03 AM2/13/24
to Google Ads API and AdWords API Forum
Hello, to be able to obtain the results of the last 90, 60 or 90 days. What condition should be added in the WHERE?

Does WHERE segments.date DURING LAST_30_DAYS work?

Google Ads API Forum Advisor

unread,
Feb 13, 2024, 7:05:57 AM2/13/24
to noc...@ads4startups.com, adwor...@googlegroups.com
Hi,

Thank you for getting back to us. 

Please find the answers for your questions below:

1. Hello, to be able to obtain the results of the last 90, 60 or 90 days. What condition should be added in the WHERE?
  • To retrieve the data for the last 60 or 90 days you need to include the 'BETWEEN" operator. I would recommend you to kindly refer to the "Google Ads Query Language Grammar" documentation for the valid grammar which needs to be used while implementing the GAQL query. Also, I would suggest you to refer to the "Predefined date range" guide for more information.
  • Kindly find the sample query for the 60 days and similarly you can obtain the results for 90 days as well by modifying the dates. 
  • SELECT segments.product_item_id, metrics.clicks, metrics.impressions, metrics.ctr, 
    metrics.average_cpc, metrics.cost_micros, metrics.conversions, metrics.cost_per_conversion, 
    metrics.conversions_from_interactions_rate FROM shopping_performance_view WHERE 
    segments.date BETWEEN '2023-12-01' AND '2024-01-31'
2. Does WHERE segments.date DURING LAST_30_DAYS work?
  • Yes, it works and you can find the sample query as per your requirement. 
  • SELECT segments.product_item_id, metrics.clicks, metrics.impressions, metrics.ctr, 
    metrics.average_cpc, metrics.cost_micros, metrics.conversions, metrics.cost_per_conversion, 
    metrics.conversions_from_interactions_rate FROM shopping_performance_view WHERE 
    segments.date DURING LAST_30_DAYS

No Code

unread,
Feb 19, 2024, 3:50:59 AM2/19/24
to Google Ads API and AdWords API Forum
Hello, I want to add the conversion value and the product title to the shopping query.

Valor de conversión.png

Título de producto.png
Can you tell me the correct names of the fields, please?

Stay tuned to reply.

No Code

unread,
Mar 8, 2024, 5:18:00 AM3/8/24
to Google Ads API and AdWords API Forum
How can I get the MCC administrator accounts? 

What HTTP request and query should I add in the API call? 

What I want to achieve is that when the user authenticates, it shows the MCC administrator accounts and then when they click on an administrator account, all the accounts associated with that MCC account are listed. 

Should I make two different API calls? 

What would be the HTTP request and query for each call?

Currently what I have is the so-called list of customers that you can access with the ListAccessibleCustomers method

Google Ads API Forum Advisor

unread,
Mar 8, 2024, 11:16:47 AM3/8/24
to noc...@ads4startups.com, adwor...@googlegroups.com
Hi,

Thank you for getting back to us.

By reviewing your query, I understand that you want to list MCC administrator accounts and their associated accounts via the API. I would like to inform you that the method ListAccessibleCustomers which you are using is correct. This method retrieves all accounts a user has access to, including MCCs (Manager accounts). Kindly refer to the document List Accessible Accounts and the sample example List Accessible Customers to get more information.

Also, please be informed that you cannot add conversion value and the product title to the shopping queries via the Google Ads API. Shopping queries are based on the product data feed uploaded to your Merchant Center, which defines product attributes like title.

I hope this helps. Kindly get back to us if the issue still persists.

No Code

unread,
Mar 8, 2024, 5:15:32 PM3/8/24
to Google Ads API and AdWords API Forum

Hello Support Team, thanks for the previous response.

 

Now could you help me by confirming if I can use a permission other than https://www.googleapis.com/auth/adwords to make calls to the Google Ads API and use a read permission for the OAuth consent screen?

 

The notice of being able to create, edit, delete generates fear, many users are afraid that they may see their data.

 

Imagine creating or deleting advertising accounts, they are as if they were bank accounts, they are linked to the card and if someone external can start making you spend more or delete your account, with the history it generates fear.


Permiso API Google Ads.PNGPantalla de consentimiento Bubble.io.PNG

No Code

unread,
Mar 11, 2024, 2:51:12 AM3/11/24
to Google Ads API and AdWords API Forum
Hello, support team. 

Could you help me with the answer to the previous question, please.

Google Ads API Forum Advisor

unread,
Mar 11, 2024, 5:07:35 AM3/11/24
to noc...@ads4startups.com, adwor...@googlegroups.com
Hi,

Thank you for getting back to us.

To make a call to the Google Ads API, you need to use the specific scope 'https://www.googleapis.com/auth/adwords'. Kindly refer to the "Scope " guide for more details. You may check the document on how Make an API call. Also, you can restrict the other user from creating, deleting and editing the accounts, by providing the 'read-only' access permission level. This will limit the access to retrieving the data without the ability to modify or delete it. For more information you check the article on About access levels in your Google Ads Account. Also, you may refer to the article on how Manage access to your Google Ads account to grant or remove access to your Google Ads Account.

No Code

unread,
Mar 12, 2024, 3:52:55 AM3/12/24
to Google Ads API and AdWords API Forum
Hello, support team. 

I couldn't quite understand your answer. 

Could you please tell me what I should do or configure so that when a user authenticates with the application they have read-only access and that the screenshot message that I shared is not shown so that they do not feel afraid. I understand that I should always use the scope of https://www.googleapis.com/auth/adwords.

Google Ads API Forum Advisor

unread,
Mar 12, 2024, 8:36:49 AM3/12/24
to noc...@ads4startups.com, adwor...@googlegroups.com
Hi,

Thank you for getting back to us.

I would suggest you refer to the help center article Manage access to your Google Ads account to provide the user with 'read-only' access permission level. With the 'read-only' access you can restrict the other user from creating, deleting, and editing the accounts. 
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02rX2AQ:ref" (ADR-00219461)


Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages