Back

Google Ad Manager API Essential Guide

Aug 3, 20246 minute read

What type of API does Google Ad Manager provide?

Google Ad Manager primarily uses a SOAP API. The key points are:

  1. The Ad Manager API uses SOAP (Simple Object Access Protocol).

  2. Google offers client libraries for Java, .NET, Python, PHP, and Ruby to help developers work with the SOAP-based Ad Manager API.

  3. The SOAP API requires authentication using OAuth 2.0.

  4. Google has also introduced a REST API for Ad Manager, which is currently in Beta. This REST API allows developers to read Ad Manager data and run reports.

  5. The REST API is available alongside the existing SOAP API, giving developers options depending on their needs and preferences.

Does the Google Ad Manager API have webhooks?

Based on the search results provided, it does not appear that the official Google Ad Manager API offers webhooks or event subscriptions. The search results do not contain any specific information about webhooks or events for the Google Ad Manager API.

The key points to consider are:

  1. The search results primarily focus on getting started with the Google Ad Manager API, including setting up credentials, configuring the API access, and using client libraries.

  2. There is information about webhooks and event subscriptions for other Google services like the Webhook connector for Google Cloud Integration, but this is not specific to the Ad Manager API.

  3. The search results mention some event-related functionality for the Google Mobile Ads SDK, but this is for mobile app ad integration rather than the Ad Manager API itself.

  4. There is no mention of specific events or webhooks that can be subscribed to for the Ad Manager API.

Given the lack of information about webhooks or event subscriptions in the official documentation provided in the search results, it appears that the Google Ad Manager API does not offer native webhook functionality or event subscriptions.

If you need real-time updates or notifications from Ad Manager, you may need to consider alternative approaches such as:

  1. Polling the API at regular intervals to check for changes.
  2. Implementing your own webhook system that triggers API calls based on certain events in your application.
  3. Exploring third-party integration platforms that might offer webhook functionality for Google Ad Manager.

It's important to note that API capabilities can change over time, so it's always a good idea to check the most up-to-date official documentation or contact Google support for the most accurate information about current API features.

Rate Limits and other limitations

Here are the key API rate limits for the Google Ad Manager API:

Network-level quota

  • Ad Manager 360 accounts: 8 requests per second
  • Ad Manager accounts: 2 requests per second

Exceeding this limit results in a QuotaError.EXCEEDED_QUOTA error [1].

System-specific quotas

There are additional quotas for resource-intensive systems like reporting and forecasting, which can result in errors like:

  • QuotaError.REPORT_JOB_LIMIT
  • ForecastError.EXCEEDED_QUOTA [1]

Best practices to stay under limits

  • Reuse service clients/stubs during execution
  • Use paging when fetching objects
  • Batch update requests
  • Store the Ad Manager API client object when appropriate
  • Use bind parameters in PQL
  • Grant user privileges sparingly [1]

Other key points

  • There are no exact figures provided for QPS (queries per second) limits, as they can vary based on overall server load [3].

  • The API enforces daily operation limits based on the access level of the developer token. Basic access allows 15,000 API operations per day [2].

  • Requests that are rejected with a GoogleAdsFailure still count against the daily operation quota [2].

  • There are limits on things like number of active ad units (100,000), active placements (60,000), key-value pairs (2,500,000), etc. [5]

  • For Dynamic Ad Insertion, there are soft limits like 25,000 manifest requests per second that can be adjusted by contacting your account team [5].

The key is to follow best practices, implement proper error handling and retries, and contact the Google Ads API team if you need higher limits for your use case. Monitoring your usage and staying well under the limits is recommended.

Latest API Version

Based on the search results provided, here is the most up-to-date information about the Google Ad Manager API version:

The most recent version of the Google Ad Manager API is v202402.

Key points to consider:

  1. This version was announced in February 2024 [4].

  2. The upgrade from version 202311 to 202402 was implemented in April 2024 [5].

  3. As part of the upgrade to v202402, new columns were added, including:

    • ad_server_cpm_and_cpc_revenue_gross
    • ad_server_all_revenue_gross [5]
  4. Google regularly releases new versions of the Ad Manager API, typically following a pattern of YYYYMM (year and month) for version numbering.

  5. It's important for developers using the Google Ad Manager API to stay updated with the latest versions, as they often include new features, deprecations, and changes to existing functionality.

Best practices:

  1. Regularly check the Google Ad Manager API documentation and release notes for updates.

  2. Plan for upgrades to newer API versions to take advantage of new features and ensure compatibility.

  3. Be aware of any deprecations or changes that might affect your existing implementations when upgrading to a new version.

  4. Test your integrations thoroughly when upgrading to a new API version to ensure everything works as expected.

How to get a Google Ad Manager developer account and API Keys?

Here are the key steps to get a developer account for Google Ad Manager to create an API integration:

  1. Sign up for a Google Ad Manager account if you don't already have one.

  2. Make note of your network code, which you can find in the URL when signed into your Ad Manager account.

  3. Enable API access for your Ad Manager network:

    • Go to General settings > API access
    • Click the slider to set it to "Enabled"
  4. Create authentication credentials:

    • Go to the Google API Console
    • Create a new project
    • Go to the Credentials page
    • Select "Create credentials" and choose "Service account key"
    • Select "New service account" and choose JSON as the key type
  5. Set up OAuth 2.0 authentication:

    • Create an OAuth 2.0 client ID and client secret in the Google API Console
    • Configure the OAuth consent screen
    • Save the credentials to use in your API requests
  6. Apply for a developer token:

    • This is a unique identifier for your Google Ads API activity
    • You'll need to apply for this through Google
  7. Configure your authentication settings in your code/application:

    • Use the network code, OAuth credentials, and developer token to authenticate API requests
  8. Review the API documentation and start making requests:

    • Refer to the Google Ad Manager API documentation for details on available endpoints and methods

What can you do with the Google Ad Manager API?

Based on the search results provided, here is a list of data models you can interact with using the Google Ad Manager API, along with what is possible for each:

Network

  • Get the current network information (display name, network code) [1]

Campaign

  • Create, modify, and retrieve campaigns [2]
  • Set campaign-wide budgets and dates [2]
  • Attach campaign-level criteria and extensions [2]

Ad Group

  • Create, modify, and retrieve ad groups [2]
  • Group ads into logical collections [2]
  • Attach ad group-level criteria and extensions [2]
  • Create, modify, and retrieve ads (ad group ads) [2]
  • Specify ad content and settings [2]

Criterion

  • Create and modify campaign criteria and ad group criteria [2]
  • Set targeting options like keywords, age ranges, locations, etc. [2]

Extension

  • Attach extensions at the account, campaign, or ad group level [2]
  • Add extra information to ads like phone numbers, addresses, promotions [2]

Budget

  • Create and modify budgets [2]
  • Associate budgets with campaigns [2]

Feed

  • Create and manage feeds [2]
  • Define feed attributes [2]

Feed Item

  • Create and manage feed items [2]

Feed Mapping

  • Create and manage feed mappings [2]

Label

  • Create and manage labels [2]

User List

  • Create and manage user lists (audience lists) [2]

General capabilities:

  • Retrieve performance statistics and reports using GoogleAdsService [2]
  • Perform bulk mutate operations to modify multiple entities at once [2]
  • Retrieve metadata about resources using GoogleAdsFieldService [2]

It's important to note that the Google Ad Manager API provides a comprehensive set of services to interact with these data models, allowing you to perform operations like creating, modifying, retrieving, and deleting entities, as well as pulling reports and performance data.