What type of API does Google Ads provide?
Google Ads API supports two types of APIs:
- gRPC API (Preferred)
- REST API (Optional)
The gRPC API is the primary and recommended method for interacting with the Google Ads API. The REST API is provided as an alternative option but is not the main focus.
Google strongly recommends using their official client libraries, which are implemented using gRPC (except for the Perl library which uses REST).
Does the Google Ads API have webhooks?
Based on the search results, here are the key points regarding webhooks and event subscriptions for the Google Ads API:
Does the official Google Ads API have webhooks?
No, the official Google Ads API does not appear to have built-in webhook functionality.
Alternative options for event-based notifications
While the Google Ads API itself doesn't offer webhooks, there are some alternative approaches that can be used:
-
Conversion Upload Service: The Google Ads API provides a ConversionUploadService that allows recording "offline" conversions from server to server. This can be used to report conversions that happen on the server-side.
-
Google Cloud Application Integration: Google Cloud offers a Webhook trigger feature that can be used to invoke integrations based on events. While not specific to Google Ads, this could potentially be used to build custom integrations involving Google Ads data.
-
Manual polling: In the absence of webhooks, you may need to implement a polling mechanism to periodically check for changes or events in your Google Ads account.
Key considerations
-
For server-side conversion tracking, you need to store the click ID (gclid, wbraid, or gbraid) from the original ad click and send that with your conversion data.
-
If not using the API, conversions can also be uploaded via the Google Ads web UI.
-
For custom integrations, Google Cloud's Webhook trigger supports various authentication methods and allows configuring event subscription details.
In summary, while the Google Ads API doesn't natively support webhooks, there are alternative approaches available for handling server-side events and conversions. The most direct method for conversion tracking is using the ConversionUploadService provided by the API.
Rate Limits and other limitations
Here are the key API rate limits for the Google Ads API:
Daily API Operation Limits
- 15,000 API operations per day for Basic Access tokens
- Higher limits available for Standard and Advanced Access levels
Request Limits
- Mutate requests: 10,000 operations per request
- Conversion Upload Service requests: 2,000 conversions per request
- Billing and Account Budget Service requests: 1 operation per mutate request
Rate Limits
- Uses a Token Bucket algorithm to determine QPS (queries per second) limits
- Exact QPS limit varies depending on overall server load
- Requests exceeding rate limits will receive a RESOURCE_TEMPORARILY_EXHAUSTED error
Other Limits
- Maximum message size of 64 MB for requests/responses
- Planning Service requests limited to 1 QPS
Best Practices
- Use batching, throttling, and queueing to manage request rates
- Limit concurrent tasks
- For Basic Access, aim for about 1 request every 6 seconds to stay under daily limit
Key Points
- Limits are enforced per developer token and per client customer ID
- No exact QPS figures are provided, as it varies based on server load
- Following best practices helps avoid hitting rate limits
- Google may monitor API activity to ensure compliance
The API uses a flexible rate limiting system rather than fixed QPS limits. Developers should implement proper throttling and follow best practices to avoid exceeding limits. Monitoring your usage and implementing backoff when errors occur is recommended.
Latest API Version
The most recent version of the Google Ads API is v17.
Key points to consider:
-
Google announced the release of v17 of the Google Ads API on June 5, 2024.
-
Prior to v17, the previous version was v16, which was announced on February 21, 2024.
-
Google frequently updates the API, with the goal of maintaining feature parity with the online Google Ads interface.
-
Each update receives a new version number.
-
Google provides release notes and migration guides to document changes between versions, especially when new versions alter or eliminate functionality from previous versions.
-
Google maintains a deprecation schedule that outlines which older versions are still supported.
Best practices:
- Stay up-to-date with the latest version to access new features and improvements.
- Review the release notes and migration guides when upgrading to a new version.
- Be aware of the deprecation schedule to ensure you're using a supported version.
- Test your integration thoroughly when upgrading to a new API version.
How to get a Google Ads developer account and API Keys?
To get a developer account for Google Ads and create an API integration, follow these steps:
-
Select or Create a Google Ads Manager Account
- Use an existing Google Ads manager account or create a new one.
- Use an email address not previously associated with a Google Ads account.
-
Apply for Access to the Google Ads API
- Sign in to your manager account and navigate to the API Center.
- Complete the API Access form and accept the Terms and Conditions.
- Ensure your company's website URL is functioning and the API contact email is monitored.
-
Obtain a Developer Token
- After applying, your developer token will appear in the API Center with a "Pending Approval" status.
- The token will initially have "Test Access" level for API calls against test accounts.
- Note the value of your developer token for making API calls.
-
Set up OAuth2
- Create an OAuth2 client ID and client secret:
- Open the Google API Console Credentials page
- Set up the OAuth consent screen
- Create credentials for a Desktop app
- Save these credentials for your Google Ads API library configuration
-
Make Your First API Call
- Follow the Google Ads API First Call tutorial to make a simple call.
Key Points:
- The developer token review process may take time to complete.
- Your developer token must be approved before use with production Google Ads accounts.
- Ensure your software adheres to the Google Ads API Terms and Conditions and Required Minimum Functionality.
What can you do with the Google Ads API?
Here are the key data models you can interact with using the Google Ads API, along with what is possible for each:
Customer
- Top-level resource representing a Google Ads account
- Contains campaigns, ad groups, ads, etc.
- Can retrieve account-level information and settings
- Can manage account-level extensions
Campaign
- Represents an advertising campaign
- Can create, read, update, delete campaigns
- Manage campaign settings like budget, targeting, bidding strategy
- View campaign performance metrics
- Attach campaign-level extensions
Ad Group
- Grouping of ads within a campaign
- Create, read, update, delete ad groups
- Manage ad group settings like CPC bids
- View ad group performance metrics
- Attach ad group-level extensions
Ad
- Individual ads within an ad group
- Create, read, update, delete ads of various types (text, responsive, etc.)
- Manage ad content, URLs, etc.
- View ad performance metrics
Criterion
- Targeting criteria for campaigns and ad groups
- Manage keywords, placements, audiences, etc.
- Set bids for criteria
- View criterion performance
Feed
- Custom data sets that can be referenced in ads
- Create and manage feeds and feed items
- Use feed data in ad customizers and extensions
Extension
- Additional information shown with ads
- Manage various extension types (sitelinks, callouts, etc.)
- Attach extensions at account, campaign, or ad group level
Asset
- Reusable components for ads and extensions
- Manage images, videos, text assets
- Use assets across multiple ads/extensions
Bidding Strategy
- Automated bid strategies
- Create and manage portfolio bid strategies
- Apply bid strategies to campaigns
Budget
- Spending limits for campaigns
- Create and manage shared budgets
- Apply budgets to campaigns
Conversion Action
- Tracks valuable actions taken by users
- Set up and manage conversion tracking
- View conversion data
Audience
- Groups of users for targeting
- Manage various audience types (remarketing lists, similar audiences, etc.)
- Apply audiences to campaigns and ad groups
The API allows you to create, read, update, and delete these entities, as well as retrieve performance data and metrics for reporting purposes. The flexible query language (GAQL) enables complex reporting across multiple entity types.