On March 7, this year, Google released AdWords Command Line Interface (AWCLI) that allows you to run AdWords API queries from the command line. Today, AdWords' API team launched a new version of the AWCLI, revealed Danial Klimkin of AdWords API Team.
Here are the new features added in to the new AWCLI:
Accessing production environment
"A change is maded to reduce a risk of accidentally running the demo tool against a production environment. Since version 1.2.0, an explicit '--prod' flag is required in order to query billable services. Check out 'awcli --help' for all available command-line options."
Automatic batch mode
AWCLI can now run in interactive or batch mode and detects the required mode automatically. "In batch mode, any extra input is suppressed and the application exits after a command completes. This makes it easier to use the tool in shell scripts. You can also specify a command and its parameters as extra arguments to the tool itself," explains Klimkin.
In interactive mode, you will get a prompt to type your commands:
Browsing Ad Parameters
A new CriterionLocation allows you to browse Criteria. This enables you to list and view AdParams associated with your criteria. And even edit them: 'edit #1' will spawn your configured editor. The changes will be automatically applied when you save and exit.
bash $ ./awcli.sh [options] ls <campaign_id>/<adgroup_id>/<criterion_id> #1 $100  #2 50  bash $
You can combine AWCLI output with other command-line tools to retrieve parts of the information you need. For example, you can use Unix filters to obtain ad group stats.
bash $ ./awcli.sh --prod cat <campaign_id>/<adgroup_id> | grep -E "clicks|impressions" clicks = 12, impressions = 160, bash $
AWCLI is available from the Google Code page and is part of the AdWords Java API client libraries project. You can find installation and running instructions as well as usage examples on the wiki page.