I'm trying to work with google ads API I got all the authentication in place on yaml file. and I'm ready to start requesting info from the Google API

I downloaded the generate_keyword_ideas.py file from google GitHub this is the file here: https://github.com/googleads/google-ads-python/blob/ee2c059498d5679a0d1d9011f3795324439fad7c/examples/planning/generate_keyword_ideas.py

in short the file function takes all these inputs

def main(client, customer_id, location_ids, language_id, keyword_texts, page_url

)

when i run the main file i get this error message:

usage: main.py [-h] -c CUSTOMER_ID [-k KEYWORD_TEXTS [KEYWORD_TEXTS ...]]            [-l LOCATION_IDS [LOCATION_IDS ...]] [-i LANGUAGE_ID]            [-p PAGE_URL] main.py: error: the following arguments are required: -c/--customer_id 

I don't know what kind of input customer_id takes, coz I got my 10 digits id from google ads and I thought that's what it is but its not, and also what is -c? and how can I fill both of them?, iv been trying for a long time and nothing is working .. please help thanks

Tag:google-ads-api, python

Only one comment.

  1. Dave Davis

    -c is the command line flag to indicate that what's coming next is the customer ID.

    The customer ID for authentication is confusing. I had a hard time with it too. Try using the MCC/Manager account ID (another 10 digit number) without any dashes.

    I would also consider starting with something a little more simple. In the example, try the list accessible customers one and go from there. You'll get a feel for what's what.

Add a new comment.