First Call: Get Campaigns

Stay organized with collections Save and categorize content based on your preferences.

Now that your environment and config file are all set up, it's time to make your first API call:

Java

  1. In your IDE, open GetCampaigns.java and execute it.
  2. The console should print a listing of the campaigns in your account.

C#

  1. In your IDE, open GetCampaigns.cs and execute it.
  2. The console should print a listing of the campaigns in your account.

PHP

  1. Execute GetCampaigns.php.
  2. The console should print a listing of the campaigns in your account.

Python

  1. In your IDE, open get_campaigns.py and execute it.
  2. The console should print a listing of the campaigns in your account.

Ruby

  1. On the command line, execute get_campaigns.rb by typing:
    ruby get_campaigns.rb
  2. The console should print a listing of the campaigns in your account.

Perl

  1. Execute get_campaigns.pl.
  2. The console should print a listing of the campaigns in your account.

Congratulations! You've made your first Google Ads API call.

To learn more about the API, proceed to the following topics: