Giới thiệu
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
API Google Ads được dùng để quản lý các tài khoản và chiến dịch lớn hoặc phức tạp trên Google Ads. Bạn có thể tạo phần mềm quản lý tài khoản từ cấp khách hàng xuống cấp từ khoá. Sau đây là một số trường hợp sử dụng thường gặp:
- Quản lý tài khoản tự động
- Báo cáo tuỳ chỉnh
- Quản lý quảng cáo dựa trên khoảng không quảng cáo
- Quản lý chiến lược đặt giá thầu thông minh
Google Ads API có phải là sản phẩm phù hợp với tôi không?
Google cung cấp nhiều sản phẩm để giúp tự động hoá tài khoản Google Ads. Sau đây là một số trường hợp phổ biến và danh sách các sản phẩm của Google có thể phù hợp nhất với nhu cầu của bạn.
Trường hợp |
Nội dung đề xuất |
Tôi là nhà phát triển muốn tạo sản phẩm phần mềm của riêng mình hoặc tích hợp với Google Ads API. Tôi có thể viết mã, quản lý cơ sở hạ tầng phần mềm, bao gồm cả máy chủ và cơ sở dữ liệu. |
Sử dụng API Google Ads. |
Tôi là một nhà phát triển có thể viết mã, nhưng không muốn quản lý cơ sở hạ tầng phần mềm của riêng mình. |
Sử dụng tập lệnh Google Ads. |
Tôi không phải là nhà phát triển, nhưng sẵn sàng dành thời gian học lập trình để tự động hoá Google Ads. |
Sử dụng tập lệnh Google Ads. |
Tôi là một nhà phân tích dữ liệu (hoặc có vai trò tương tự) muốn tải báo cáo Google Ads xuống để phân tích thêm. |
Sử dụng
Dịch vụ chuyển dữ liệu của BigQuery. Chúng tôi hỗ trợ
việc chuyển Google Ads. |
Tôi muốn quản lý hàng loạt Google Ads nhưng không muốn viết mã. |
Sử dụng quy tắc tự động, tải lên hàng loạt hoặc Google Ads Editor.
|
Điều kiện tiên quyết
Để thực hiện một lệnh gọi API Google Ads, bạn cần có những thông tin sau. Phần còn lại của hướng dẫn này sẽ hướng dẫn bạn cách lấy từng mục này.
- Tài khoản người quản lý Google Ads: Bạn cần có tài khoản người quản lý Google Ads để đăng ký API Google Ads.
Mã thông báo của nhà phát triển: Mã thông báo này cho phép ứng dụng của bạn kết nối với API Google Ads. Mỗi mã thông báo của nhà phát triển được chỉ định một cấp độ truy cập API. Cấp độ này kiểm soát số lượng lệnh gọi API mà bạn có thể thực hiện mỗi ngày cũng như môi trường mà bạn có thể thực hiện lệnh gọi.
Dự án Google API Console: Dự án Google API Console được dùng để tạo thông tin đăng nhập OAuth 2.0 cho ứng dụng của bạn. Sau đó, ứng dụng sẽ dùng thông tin đăng nhập này để xác thực người dùng và nhận được sự uỷ quyền của người dùng để quản lý tài khoản Google Ads của họ. Sau này, ứng dụng của bạn sẽ dùng uỷ quyền này để thực hiện các lệnh gọi API đến tài khoản Google Ads. Dự án này cũng cho phép API chấp nhận các lệnh gọi.
Tài khoản khách hàng Google Ads: Đây là tài khoản mà bạn đang thực hiện các lệnh gọi API. Bạn cần có các quyền cần thiết để thao tác trên tài khoản này, chẳng hạn như tìm nạp báo cáo hoặc thực hiện các thay đổi đối với chiến dịch.
Bạn cũng cần có số tài khoản gồm 10 chữ số của tài khoản mà bạn đang thực hiện các lệnh gọi API. Thông tin này xuất hiện trong giao diện web của Google Ads dưới dạng 123-456-7890
. Số tài khoản này được truyền dưới dạng một tham số đến lệnh gọi API Google Ads mà không có dấu gạch ngang: 1234567890
.
Công cụ hỗ trợ và thư viện ứng dụng: Nhóm công cụ này có thể giúp bạn tích hợp với API nhanh hơn.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-08-31 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-08-31 UTC."],[[["\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."]]