Google Ads API is returning to beta status. Please read our blog post for more details.

First Call: Get Campaigns

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.

.NET

  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.

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

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

傳送您對下列選項的寶貴意見...

這個網頁
Google Ads API Beta
Google Ads API Beta
需要協助嗎?請前往我們的支援網頁