简介
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
Google Ads API 用于管理大型或复杂的 Google Ads 账号和广告系列。您可以构建软件,全方位管理从客户一级到关键字一级的账号。一些典型用例包括:
- 自动账号管理
- 自定义报告
- 基于产品目录的广告管理
- 管理智能出价策略
Google Ads API 是否适合我?
Google 提供了多种产品来帮助您自动管理 Google Ads 账号。下面列出了一些常见场景,以及可能最符合您需求的 Google 产品。
前提条件
如需进行 Google Ads API 调用,您应具备以下详细信息。本教程的其余部分将介绍如何获取上述各项。
- Google Ads 经理账号:您需要拥有 Google Ads 经理账号才能申请 Google Ads API。
开发者令牌:此令牌可让您的应用连接到 Google Ads API。每个开发者令牌都分配有一个 API 访问权限级别,该级别控制着您每天可以进行的 API 调用次数以及可以进行调用的环境。
Google API 控制台项目:Google API 控制台项目用于为您的应用生成 OAuth 2.0 凭据。然后,应用将使用这些凭据对用户进行身份验证,并获得用户授权来管理其 Google Ads 账号。此授权稍后将由您的应用用于向 Google Ads 账号发出 API 调用。项目还启用 API 以接受调用。
Google Ads 客户账号:这是您要向其发出 API 调用的账号。您需要获得对相应账号的操作权限,
例如提取报告或更改广告系列的权限。
您还需要您要向其发出 API 调用的账号的 10 位数账号。在 Google Ads 网页界面中,此值以 123-456-7890
的形式显示。此账号会作为参数传递给 Google Ads API 调用,但不含连字符:1234567890
。
支持工具和客户端库:这组工具可帮助您更快地与 API 集成。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-31。
[null,null,["最后更新时间 (UTC):2025-08-31。"],[[["\u003cp\u003eThe Google Ads API is designed for managing large or complex Google Ads accounts programmatically, enabling tasks like automated account management, custom reporting, and inventory-based ad management.\u003c/p\u003e\n"],["\u003cp\u003eGoogle offers alternative solutions like Google Ads scripts, BigQuery Data Transfer service, automated rules, bulk uploads, and Google Ads Editor depending on user technical expertise and needs.\u003c/p\u003e\n"],["\u003cp\u003eTo use the Google Ads API, you'll need a Google Ads manager account, a developer token, a Google API Console project, and access to a Google Ads client account with necessary permissions.\u003c/p\u003e\n"],["\u003cp\u003eBefore making API calls, ensure you have the required details, including the 10-digit Google Ads client account number (without hyphens) and support tools or client libraries.\u003c/p\u003e\n"]]],[],null,["# Introduction\n\nThe Google Ads API is used for managing large or complex Google Ads accounts and\ncampaigns. You can build software that manages accounts from the customer level\ndown to the keyword level. Some typical use cases include:\n\n- Automated account management\n- Custom reporting\n- Ad management based on inventory\n- Manage smart bidding strategies\n\nIs the Google Ads API the right product for me?\n-----------------------------------------------\n\nGoogle provides multiple products to help automate Google Ads accounts. Here are\nsome common scenarios and the list of Google products that might best\nfit your needs.\n\n| Scenario | Recommendation |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| I am a developer who wishes to build my own software product, or integrate with Google Ads API. I am comfortable writing code, managing software infrastructure including servers and database. | Use the Google Ads API. |\n| I am a developer who is comfortable writing code, but prefer not to manage my own software infrastructure. | Use [Google Ads scripts](/google-ads/scripts). |\n| I am not a developer, but am willing to invest some time learning programming to automate Google Ads. | Use [Google Ads scripts](/google-ads/scripts). |\n| I am a data analyst (or similar role) who wants to download Google Ads reports for further analysis. | Use [BigQuery Data Transfer service](//cloud.google.com/bigquery/docs/dts-introduction). Support is available for [Google Ads transfers](//cloud.google.com/bigquery/docs/google-ads-transfer). |\n| I want to manage Google Ads in bulk, but don't want to write any code. | Use [automated rules](//support.google.com/google-ads/answer/2472779), [bulk uploads](//support.google.com/google-ads/answer/10702932), or [Google Ads Editor](//support.google.com/google-ads/editor/answer/2484521). |\n\nPrerequisites\n-------------\n\nTo make a Google Ads API call, you should have the following details. The rest of this\ntutorial teaches you how to obtain each of these items.\n\n- [**Google Ads manager account**](//support.google.com/google-ads/answer/7459399): You need a Google Ads manager account to apply for the Google Ads API.\n- [**Developer token**](/google-ads/api/docs/get-started/dev-token): This token lets your app connect to the\n Google Ads API. Each developer token is assigned an API access level which\n controls the number of API calls you can make per day with as well as the\n environment to which you can make calls.\n\n- [**Google API Console project**](/google-ads/api/docs/get-started/oauth-cloud-project): The Google API Console project is used\n for generating OAuth 2.0 credentials for your app. The app will then use\n these credentials to authenticate the user and obtain user authorization to\n manage their Google Ads accounts. This authorization is later used by your app\n to make API calls to the Google Ads account. The project also enables the API\n to accept calls.\n\n- [**Google Ads client account**](/google-ads/api/docs/get-started/select-account): This is the account you're making API\n calls against. You need necessary permissions to operate on this account,\n such as fetching reports or making changes to campaigns.\n\n You also need the 10-digit account number of the account you're making API\n calls to. This is displayed in the Google Ads web interface in the form\n `123-456-7890`. This account number is passed as a parameter to the Google Ads API\n call without the hyphens: `1234567890`.\n- [**Support tools and client libraries**](/google-ads/api/docs/get-started/download-tools-libraries): This set of tools can help\n you integrate with the API more quickly."]]