تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
بما أنّ واجهة برمجة التطبيقات Google Drive API هي خدمة مشتركة، نفرض حصصًا وقيودًا للتأكّد من أنّ جميع المستخدمين يستفيدون منها بشكل عادل ولحماية الأداء العام لنظام Google Workspace.
لا يتم احتساب الإشعارات التي يتم تسليمها إلى العنوان المحدّد عند فتح قناة إشعارات ضمن حدود الحصة. ومع ذلك، يتم احتساب طلبات البيانات من خلال الطرق changes.watch وchannels.stop وfiles.watch ضمن حصتك.
في حال تجاوزت الحصة، ستتلقّى استجابة برمز حالة HTTP 403: User rate limit
exceeded. قد تؤدي عمليات التحقّق الإضافية من الحد الأقصى لعدد الطلبات في الخلفية في Drive أيضًا إلى إنشاء الرد 429: Too many
requests. في حال حدوث ذلك، عليك استخدام خوارزمية الرقود الأسي الثنائي وإعادة المحاولة لاحقًا. طالما أنّك تلتزم بحصص الدقيقة الواحدة الموضّحة أدناه، ليس هناك حدّ لعدد الطلبات التي يمكنك إجراؤها في اليوم.
يوضّح الجدول التالي حدود طلبات البحث:
الحصص
طلبات البحث
لكل 60 ثانية
12,000
لكل 60 ثانية لكل مستخدم
12,000
حلّ أخطاء الحصة المستندة إلى الوقت
بالنسبة إلى جميع الأخطاء المستندة إلى الوقت (الحد الأقصى لعدد N من الطلبات كل X دقيقة)، ننصح بأن يرصد الرمز البرمجي الاستثناء ويستخدم تراجعًا أسيًا مقتطعًا للتأكّد من أنّ أجهزتك لا تُحمّل عبئًا مفرطًا.
التمهّل الأسي هو استراتيجية معيارية للتعامل مع الأخطاء في تطبيقات الشبكة. تعيد خوارزمية الرقود الأسي الثنائي محاولة إرسال الطلبات باستخدام فترات انتظار متزايدة بشكل أسي بين الطلبات، وذلك حتى بلوغ الحد الأقصى لوقت الرقود الأسي الثنائي. إذا استمر تعذُّر تنفيذ الطلبات، من المهم زيادة حالات التأخير بين الطلبات بمرور الوقت إلى أن يتم تنفيذ الطلب بنجاح.
مثال على الخوارزمية
تعيد خوارزمية الرقود الأسي الثنائي محاولة إرسال الطلبات بشكل أسي، ما يؤدي إلى زيادة وقت الانتظار بين عمليات إعادة المحاولة إلى أن يصل إلى الحد الأقصى لوقت الرقود الأسي الثنائي. على سبيل المثال:
إرسال طلب إلى Google Drive API
في حال تعذُّر تنفيذ الطلب، انتظِر لمدة 1 + random_number_milliseconds وأعِد محاولة تنفيذ الطلب.
في حال تعذّر إرسال الطلب، انتظِر لمدة 2 + random_number_milliseconds وأعِد محاولة إرساله.
في حال تعذّر إكمال الطلب، انتظِر 4 + random_number_milliseconds وأعِد محاولة إرساله.
وهكذا، حتى maximum_backoff مرة.
واصِل الانتظار وإعادة المحاولة حتى الوصول إلى الحدّ الأقصى لعدد المحاولات، ولكن لا تزد فترة الانتظار بين المحاولات.
where:
يبلغ وقت الانتظار min(((2^n)+random_number_milliseconds), maximum_backoff)،
ويتم زيادة n بمقدار 1 في كل تكرار (طلب).
random_number_milliseconds هو عدد عشوائي من المللي ثانية أقل من أو يساوي 1,000. يساعد ذلك في تجنُّب الحالات التي تتم فيها مزامنة العديد من العملاء بسبب موقف معيّن، ثم يعيدون المحاولة جميعًا في الوقت نفسه، ويرسلون الطلبات على شكل موجات متزامنة. تتم إعادة احتساب قيمة random_number_milliseconds بعد كل محاولة إعادة إرسال الطلب.
تبلغ مدة maximum_backoff عادةً 32 أو 64 ثانية. تعتمد القيمة المناسبة على حالة الاستخدام.
يمكن للعميل مواصلة إعادة المحاولة بعد بلوغ الوقت maximum_backoff.
لا يلزم مواصلة زيادة وقت التراجع بعد هذه النقطة. على سبيل المثال، إذا استخدم العميل وقتًا قدره maximum_backoff ثانية، يمكنه إعادة المحاولة كل 64 ثانية بعد الوصول إلى هذه القيمة. في مرحلة ما، يجب منع البرامج من إعادة المحاولة إلى أجل غير مسمّى.
يعتمد وقت الانتظار بين عمليات إعادة المحاولة وعددها على حالة الاستخدام وظروف الشبكة.
الأسعار
يمكنك استخدام Google Drive API بدون دفع أي رسوم إضافية. لا يؤدي تجاوز حدود طلبات الحصة إلى فرض رسوم إضافية، ولا يتم تحصيل أي رسوم من حسابك.
طلب زيادة الحصة
بناءً على استخدامك للموارد في مشروعك، قد تحتاج إلى طلب تعديل الحصة. يُعتبَر أنّ طلبات البيانات من واجهة برمجة التطبيقات التي يرسلها حساب خدمة تستخدم حسابًا واحدًا. لا يضمن التقدم بطلب للحصول على حصة معدَّلة الموافقة. قد تستغرق طلبات تعديل الحصة التي تؤدي إلى زيادة كبيرة في قيمة الحصة وقتًا أطول للموافقة عليها.
لا تتساوى جميع المشاريع في الحصص. مع زيادة استخدامك لخدمة Google Cloud بمرور الوقت، قد تحتاج إلى زيادة قيم الحصة. إذا كنت تتوقّع زيادة كبيرة في الاستخدام في المستقبل القريب، يمكنك بشكل استباقي طلب تعديلات على الحصة من صفحة "الحصص" في Google Cloud Console.
لمزيد من المعلومات، يُرجى الاطّلاع على المراجع التالية:
تاريخ التعديل الأخير: 2025-08-04 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","easyToUnderstand","thumb-up"],["ساعَدني المحتوى في حلّ مشكلتي.","solvedMyProblem","thumb-up"],["غير ذلك","otherUp","thumb-up"]],[["لا يحتوي على المعلومات التي أحتاج إليها.","missingTheInformationINeed","thumb-down"],["الخطوات معقدة للغاية / كثيرة جدًا.","tooComplicatedTooManySteps","thumb-down"],["المحتوى قديم.","outOfDate","thumb-down"],["ثمة مشكلة في الترجمة.","translationIssue","thumb-down"],["مشكلة في العيّنات / التعليمات البرمجية","samplesCodeIssue","thumb-down"],["غير ذلك","otherDown","thumb-down"]],["تاريخ التعديل الأخير: 2025-08-04 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# Usage limits\n\nAs the Google Drive API is a shared service, we apply quotas and limitations to\nmake sure it's used fairly by all users and to protect the overall performance\nof the Google Workspace system.\n\n[Notifications](/workspace/drive/api/guides/push) delivered to the address specified when\nopening a notification channel don't count against your quota limits. However,\ncalls to the [`changes.watch`](/workspace/drive/api/v3/reference/changes/watch),\n[`channels.stop`](/workspace/drive/api/v3/reference/channels/stop), and\n[`files.watch`](/workspace/drive/api/v3/reference/files/watch) methods do count against\nyour quota.\n\nIf you exceed a quota, you'll receive a [`403: User rate limit\nexceeded`](/workspace/drive/api/guides/handle-errors#resolve_a_403_error_user_rate_limit_exceeded)\nHTTP status code response. Additional rate limit checks on the\nDrive backend might also generate a [`429: Too many\nrequests`](/workspace/drive/api/guides/handle-errors#resolve_a_429_error_too_many_requests)\nresponse. If this happens, you should use an [exponential backoff\nalgorithm](#exponential) and try again later. Provided you stay within the\nper-minute quotas below, there's no limit to the number of requests you can make\nper day.\n\nThe following table details the query limits:\n\n| Quotas ||\n|---------|----------------------------------------------------------------------------------------------------------------|\n| Queries | |-------------------------|--------| | Per 60 seconds | 12,000 | | Per 60 seconds per user | 12,000 | |\n\n| **Note:** Depending on your type of Google Workspace account, there are additional [Drive storage limits](https://support.google.com/a/answer/172541). Google Workspace users can only upload 750 GB per day between My Drive and all shared drives; this limit also applies to copies. Users who reach the 750 GB limit or upload a file larger than 750 GB can't upload or copy additional files until 24 hours have passed. The maximum file size that users can upload is 5 TB; only the first file that breaks the limit completes uploading. The maximum file size that users can copy is 750 GB.\n\nResolve time-based quota errors\n-------------------------------\n\n\nFor all time-based errors (maximum of N requests per X minutes), we recommend\nyour code catches the exception and uses a *truncated exponential backoff* to make sure your\ndevices don't generate excessive load.\n\n\nExponential backoff is a standard error handling strategy for network applications. An\nexponential backoff algorithm retries requests using exponentially increasing wait times\nbetween requests, up to a maximum backoff time. If requests are still unsuccessful, it's\nimportant that the delays between requests increase over time until the request is successful.\n\n### Example algorithm\n\n\nAn exponential backoff algorithm retries requests exponentially, increasing the wait time\nbetween retries up to a maximum backoff time. For example:\n\n1. Make a request to Google Drive API.\n2. If the request fails, wait 1 + `random_number_milliseconds` and retry the request.\n3. If the request fails, wait 2 + `random_number_milliseconds` and retry the request.\n4. If the request fails, wait 4 + `random_number_milliseconds` and retry the request.\n5. And so on, up to a `maximum_backoff` time.\n6. Continue waiting and retrying up to some maximum number of retries, but don't increase the wait period between retries.\n\n\nwhere:\n\n- The wait time is `min(((2^n)+random_number_milliseconds), maximum_backoff)`, with `n` incremented by 1 for each iteration (request).\n- `random_number_milliseconds` is a random number of milliseconds less than or equal to 1,000. This helps to avoid cases in which many clients are synchronized by some situation and all retry at once, sending requests in synchronized waves. The value of `random_number_milliseconds` is recalculated after each retry request.\n- `maximum_backoff` is typically 32 or 64 seconds. The appropriate value depends on the use case.\n\n\nThe client can continue retrying after it has reached the `maximum_backoff` time.\nRetries after this point don't need to continue increasing backoff time. For\nexample, if a client uses a `maximum_backoff` time of 64 seconds, then after reaching\nthis value, the client can retry every 64 seconds. At some point,\nclients should be prevented from retrying indefinitely.\n\n\nThe wait time between retries and the number of retries depend on your use case\nand network conditions.\n\nPricing\n-------\n\n\nAll use of the Google Drive API is available at no additional cost. Exceeding the quota\nrequest limits doesn't incur extra charges and your account is not billed.\n\nRequest a quota increase\n------------------------\n\n\nDepending on your project's resource usage, you might want to request a quota\nadjustment. API calls by a service account are considered to be using a\nsingle account. Applying for an adjusted quota doesn't guarantee approval. Quota adjustment\nrequests that would significantly increase the quota value can take longer to be approved.\n\n\nNot all projects have the same quotas. As you increasingly use Google Cloud over\ntime, your quota values might need to increase. If you expect a notable upcoming\nincrease in usage, you can proactively\n[request quota adjustments](https://cloud.google.com/docs/quota#requesting_higher_quota)\nfrom the [Quotas page](https://console.cloud.google.com/iam-admin/quotas)\nin the Google Cloud console.\n\nTo learn more, see the following resources:\n\n- [About quota adjustments](https://cloud.google.com/docs/quotas/overview#about_increase_requests)\n- [View your current quota usage and limits](https://cloud.google.com/docs/quota#viewing_your_quota_console)\n- [Request a higher quota limit](https://cloud.google.com/docs/quota#requesting_higher_quota)"]]