تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
توضّح هذه الصفحة الحدود والقيود المختلفة في نصوص "إعلانات Google" البرمجية التي يجب أن تكون على دراية بها. يمكن أن تتغير هذه الحدود في أي وقت بدون تحذير، لذا احرص على أن تكون النصوص البرمجية مرنة وتتضمّن معالجة الأخطاء.
الحدود الزمنية للتنفيذ
نصوص "إعلانات Google" البرمجية
يمكن أن يتم تنفيذ نصوص "إعلانات Google" البرمجية لحسابات المعلِنين لمدة 30 دقيقة بحد أقصى، وبعد ذلك سيتم إلغاؤها. سيتم تطبيق جميع التغييرات التي تم إجراؤها قبل إلغاء النص البرمجي.
نصوص "مدير إعلانات Google" البرمجية
يمكن أن يتم تنفيذ نصوص Ads Manager البرمجية لمدة 30 دقيقة كحدّ أقصى، وبعد ذلك سيتم إلغاؤها. ومع ذلك، إذا كان نص برمجي في "مدير إعلانات Google" يستخدم طريقة
executeInParallel
لمعالجة الحسابات بالتوازي، ويحدّد طريقة ردّ الاتصال، يمكنه التنفيذ لمدة 60 دقيقة كحدّ أقصى قبل إلغائه. يتم توضيح ذلك في الشكل التالي، حيث تمثّل processAccount الدالة المتوازية، وتمثّل allFinished طريقة رد الاتصال عند استدعاء executeInParallel.
سيتم تطبيق جميع التغييرات التي تم إجراؤها قبل إلغاء البرنامج النصي.
حدود العناصر
برامج نصية لحسابات "إعلانات Google"
سيتم تلقائيًا عرض 50,000 نتيجة كحد أقصى عند استخدام مكرّر واحد. يمكنك تعديل ذلك من خلال استدعاء withLimit() على أداة الاختيار.
يمكن لأداة اختيار واحدة معالجة 10,000 رقم تعريف كحدّ أقصى في selector.withIds().
إذا تم تحديد 10,000 معرّف أو أكثر، ستعرض selector.get() خطأ وقت التشغيل. وبالمثل، تحديد شرط Id IN [LIST] مع قائمة بأرقام التعريف
سيؤدي الرقم 10,000 إلى حدوث خطأ في وقت التشغيل.
سيتم اقتطاع مخرجات التسجيل عند 100 كيلوبايت. سيتم تسجيل تحذير في حال حدوث ذلك.
برامج نصية للحسابات الإدارية
يحصل كل حساب تتم معالجته بواسطة نص برمجي في "مدير إعلانات Google" على حصته الخاصة كما هو موضّح أعلاه.
عند استخدام طريقة executeInParallel، يمكن لنص برمجي معالجة ما يصل إلى 50 حسابًا.
يمكن أن تعرض الطريقة processAccount من executeInParallel ما يصل إلى
10 ميغابايت من البيانات.
حدود التحميل المجمّع
يقتصر حجم ملف التحميل على 50 ميغابايت ومليون صف، وسيتم رفضه عند إرساله إذا تجاوز هذه الحدود.
تنتهي مهلة مهمة التحميل بعد ساعتين، وستتوقف المهمة عن معالجة أي بيانات متبقية من الملف الذي تم تحميله.
حصص خدمات Google
تفرض خدمات Google Apps Script الأساسية حصصًا يومية وحدودًا قصوى
على بعض الميزات. يمكنك الاطّلاع على قائمة بهذه الحصص ورسائل الاستثناء المصاحبة.
النصوص البرمجية المصرَّح بها
يتم استخدام OAuth2 للسماح بتنفيذ النصوص البرمجية. يبلغ الحدّ الأقصى لعدد البرامج النصية المصرّح بها لكل حساب 250. بعد هذا الحد، سيتم إلغاء تفويض أحد البرامج النصية التي تم تفويضها سابقًا. هذا الإجراء مؤقت فقط، ويمكن إعادة منح الإذن للنص البرمجي في المرة التالية التي يتم فيها فتحه.
إذا كنت تواجه هذا الحدّ بشكل متكرّر، ننصحك باستخدام حسابات مستخدمين متعدّدة لتفويض مجموعات مختلفة من النصوص البرمجية.
حملات الفيديو وحملات التسوّق
سيؤدي اختيار "الحملة العادية" (AdsApp.campaigns().get()) إلى فلترة نتائج البحث واستبعاد حملات الفيديو وحملات Shopping. استخدِم أدوات اختيار الحملات المخصّصة بدلاً من ذلك:
تاريخ التعديل الأخير: 2025-08-27 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-08-27 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eGoogle Ads scripts have an execution time limit of 30 minutes, while Ads Manager scripts can run for up to 60 minutes when using \u003ccode\u003eexecuteInParallel\u003c/code\u003e with a callback method.\u003c/p\u003e\n"],["\u003cp\u003eScripts for advertiser accounts have entity limits, including a 50,000 result limit per iterator, a 10,000 ID limit per selector, and a 100Kb logging output limit.\u003c/p\u003e\n"],["\u003cp\u003eAds Manager scripts have additional limits for processing accounts in parallel, with a maximum of 50 accounts and a 10MB data return limit for the \u003ccode\u003eprocessAccount\u003c/code\u003e method.\u003c/p\u003e\n"],["\u003cp\u003eBulk uploads are restricted to files under 50MB and one million rows, with a two-hour timeout for processing.\u003c/p\u003e\n"],["\u003cp\u003eEach Google Ads account can authorize up to 250 scripts, and exceeding this limit will temporarily deauthorize older scripts.\u003c/p\u003e\n"]]],[],null,["# Limits\n\nThis page outlines various limits and limitations in Google Ads scripts that you\nshould be aware of. These limits can change at any time without warning, so\nensure that your scripts are flexible and contain error handling.\n\nExecution time limits\n---------------------\n\n### Google Ads scripts\n\nGoogle Ads scripts for advertiser accounts can execute for a **maximum of 30\nminutes**, after which they will be cancelled. All of the changes made\nbefore the script was cancelled will be applied.\n\n### Ads Manager scripts\n\nAds Manager scripts can normally execute for a **maximum of 30 minutes** after\nwhich they will be cancelled. However, if an Ads Manager script uses the\n[`executeInParallel`](/google-ads/scripts/docs/reference/adsmanagerapp/adsmanagerapp_managedaccountselector#executeInParallel_2)\nmethod to process accounts in parallel, and specifies a callback method, then it\ncan execute up to a **maximum of 60 minutes** before being cancelled. This is\nillustrated in the following figure, where `processAccount` is the parallel\nfunction, and `allFinished` is the callback method when calling\n[`executeInParallel`](/google-ads/scripts/docs/reference/adsmanagerapp/adsmanagerapp_managedaccountselector#executeInParallel_2).\n\nAll of the changes made before the script was cancelled will be applied.\n\nEntity limits\n-------------\n\n| **Note:** [Reports](/google-ads/scripts/docs/features/reports) are not subject to any entity limits.\n\n### Scripts of Google Ads accounts\n\n- A single **iterator** will default to at most 50,000 results returned. You\n can modify this by calling `withLimit()` on the selector.\n\n- A single **selector** can handle at most 10,000 IDs in `selector.withIds()`.\n If 10,000 or more IDs are specified, `selector.get()` will throw a runtime\n error. Similarly, specifying an `Id IN [LIST]` condition with a list of IDs\n\n \u003e 10,000 will result in a runtime error.\n- Logging output will be truncated at 100Kb. A warning will be logged if that\n happens.\n\n### Scripts of manager accounts\n\n- Each account processed by an Ads Manager script gets its own quota as [listed\n above](#scripts_of_google_ads_accounts).\n\n- When using the `executeInParallel` method, a script can process up to **50**\n accounts.\n\n- The `processAccount` method from `executeInParallel` can return up to\n **10MB** of data.\n\nBulk upload limits\n------------------\n\n- The upload file is limited to 50MB and one million rows, and will be rejected\n upon submission if it exceeds these limits.\n\n- An upload job times out after two hours and the job will stop processing any\n remaining data from the uploaded file.\n\nQuotas for Google services\n--------------------------\n\nThe underlying Google Apps Script services impose daily quotas and hard limits\non some features. See a list of these\n[quotas and accompanying exception messages](/apps-script/guides/services/quotas).\n| **Key Point:** To get around the \"Exceeded maximum execution time\" error, you can reschedule your script under multiple user accounts to extend the script's quota.\n\nAuthorized scripts\n------------------\n\nOAuth2 is used to authorize scripts. Each account has a limit of **250**\nauthorized scripts. Beyond that limit, one of the previously authorized\nscripts will be deauthorized. This is only temporary, and the script can be\nreauthorized the next time it is opened.\n\nIf you are frequently running into this limit, you should consider using\nmultiple user accounts to authorize different sets of scripts.\n\nVideo and shopping campaigns\n----------------------------\n\nThe standard campaign selector (`AdsApp.campaigns().get()`) will filter\nout [video](//support.google.com/google-ads/answer/2375497) and\n[shopping](//support.google.com/google-ads/answer/3455481) campaigns\nfrom the results. Use the dedicated campaign selectors instead:\n\n- [`videoCampaignSelector.get()`](/google-ads/scripts/docs/reference/adsapp/adsapp_videocampaignselector)\n- [`shoppingCampaignSelector.get()`](/google-ads/scripts/docs/reference/adsapp/adsapp_shoppingcampaignselector)"]]