مقدمه
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
Google Ads API برای مدیریت حسابها و کمپینهای تبلیغاتی بزرگ یا پیچیده Google Ads استفاده میشود. شما می توانید نرم افزاری بسازید که حساب ها را از سطح مشتری تا سطح کلمه کلیدی مدیریت کند. برخی از موارد استفاده معمولی عبارتند از:
- مدیریت خودکار حساب
- گزارش سفارشی
- مدیریت تبلیغات بر اساس موجودی
- استراتژی های پیشنهاد قیمت هوشمند را مدیریت کنید
آیا Google Ads API محصول مناسبی برای من است؟
Google چندین محصول را برای کمک به خودکارسازی حسابهای Google Ads ارائه میکند. در اینجا چند سناریو متداول و لیستی از محصولات Google آورده شده است که ممکن است به بهترین وجه با نیازهای شما مطابقت داشته باشد.
سناریو | توصیه |
---|
من توسعه دهنده ای هستم که می خواهم محصول نرم افزاری خود را بسازم یا با Google Ads API ادغام کنم. من با نوشتن کد، مدیریت زیرساخت نرم افزار از جمله سرورها و پایگاه داده راحت هستم. | از Google Ads API استفاده کنید. |
من یک توسعه دهنده هستم که به راحتی کد می نویسم، اما ترجیح می دهم زیرساخت نرم افزار خود را مدیریت نکنم. | از اسکریپت های Google Ads استفاده کنید. |
من یک توسعه دهنده نیستم، اما مایلم برای یادگیری برنامه نویسی برای خودکارسازی تبلیغات گوگل، زمان صرف کنم. | از اسکریپت های Google Ads استفاده کنید. |
من یک تحلیلگر داده (یا نقشی مشابه) هستم که میخواهم گزارشهای Google Ads را برای تجزیه و تحلیل بیشتر دانلود کند. | از سرویس انتقال داده BigQuery استفاده کنید. پشتیبانی برای انتقال Google Ads در دسترس است. |
من می خواهم تبلیغات گوگل را به صورت انبوه مدیریت کنم، اما نمی خواهم هیچ کدی بنویسم. | از قوانین خودکار ، آپلودهای انبوه یا Google Ads Editor استفاده کنید. |
پیش نیازها
برای برقراری تماس Google Ads API، باید جزئیات زیر را داشته باشید. بقیه این آموزش به شما یاد می دهد که چگونه هر یک از این موارد را بدست آورید.
- حساب مدیر Google Ads : برای درخواست API Google Ads به یک حساب مدیر Google Ads نیاز دارید.
توکن برنامهنویس : این نشانه به برنامه شما امکان میدهد به API Google Ads متصل شود. به هر توکن توسعهدهنده سطح دسترسی API اختصاص داده میشود که تعداد تماسهای API را که میتوانید در روز با آنها برقرار کنید و همچنین محیطی که میتوانید با آن تماس برقرار کنید، کنترل میکند.
پروژه Google API Console : پروژه Google API Console برای ایجاد اعتبارنامه OAuth 2.0 برای برنامه شما استفاده می شود. سپس برنامه از این اعتبارنامهها برای احراز هویت کاربر و دریافت مجوز کاربر برای مدیریت حسابهای تبلیغاتی Google خود استفاده میکند. این مجوز بعداً توسط برنامه شما برای برقراری تماسهای API با حساب Google Ads استفاده میشود. این پروژه همچنین API را قادر می سازد تا تماس ها را بپذیرد.
حساب مشتری Google Ads : این حسابی است که با آن تماس API برقرار می کنید. برای فعالیت در این حساب به مجوزهای لازم مانند واکشی گزارش ها یا ایجاد تغییرات در کمپین ها نیاز دارید.
همچنین به شماره حساب 10 رقمی حسابی که در حال برقراری تماس API با آن هستید نیاز دارید. این در رابط وب Google Ads به شکل 123-456-7890
نمایش داده می شود. این شماره حساب به عنوان یک پارامتر به تماس API Google Ads بدون خط تیره ارسال میشود: 1234567890
.
ابزارهای پشتیبانی و کتابخانه های سرویس گیرنده : این مجموعه ابزار می تواند به شما کمک کند تا سریعتر با API یکپارچه شوید.
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-08-29 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-08-29 بهوقت ساعت هماهنگ جهانی."],[[["\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."]]