เนื่องจาก Google ไดรฟ์ API เป็นบริการที่ใช้ร่วมกัน เราจึงใช้โควต้าและข้อจำกัดเพื่อให้ผู้ใช้ทุกคนใช้งานได้อย่างเท่าเทียมกัน และเพื่อปกป้องประสิทธิภาพโดยรวมของระบบ Google Workspace
หากใช้เกินโควต้า คุณจะได้รับการตอบกลับเป็นรหัสสถานะ HTTP 403: User rate limit
exceeded
การตรวจสอบการจำกัดอัตราเพิ่มเติมในแบ็กเอนด์ของไดรฟ์อาจสร้างการตอบกลับ 429: Too many
requests
ด้วย หากเกิดกรณีนี้ คุณควรใช้อัลกอริทึม Exponential Backoff แล้วลองอีกครั้งในภายหลัง หากคุณใช้โควต้าต่อนาทีตามที่ระบุไว้ด้านล่าง คุณจะส่งคำขอได้ไม่จำกัดจำนวนต่อวัน
ตารางต่อไปนี้แสดงรายละเอียดขีดจำกัดการค้นหา
โควต้า
คำค้นหา
ต่อ 60 วินาที
12,000
ต่อ 60 วินาทีต่อผู้ใช้
12,000
แก้ไขข้อผิดพลาดเกี่ยวกับโควต้าตามเวลา
สำหรับข้อผิดพลาดทั้งหมดที่อิงตามเวลา (คำขอสูงสุด N รายการต่อ X นาที) เราขอแนะนำให้
โค้ดของคุณตรวจพบข้อยกเว้นและใช้การถอยแบบทวีคูณที่ถูกตัดเพื่อให้แน่ใจว่าอุปกรณ์
จะไม่สร้างภาระงานมากเกินไป
การใช้ Google ไดรฟ์ API ทั้งหมดจะใช้งานได้โดยไม่มีค่าใช้จ่ายเพิ่มเติม การส่งคำขอเกินโควต้า
จะไม่ทำให้เกิดค่าใช้จ่ายเพิ่มเติมและระบบจะไม่เรียกเก็บเงินจากบัญชีของคุณ
ขอเพิ่มโควต้า
คุณอาจต้องขอปรับโควต้าตามการใช้ทรัพยากรของโปรเจ็กต์
การเรียก API โดยบัญชีบริการจะถือว่าเป็นการใช้บัญชีเดียว การขอโควต้าที่ปรับแล้วอาจไม่ได้รับการอนุมัติเสมอไป คำขอปรับโควต้า
ซึ่งจะเพิ่มค่าโควต้าอย่างมากอาจใช้เวลานานกว่าในการอนุมัติ
โปรเจ็กต์แต่ละโปรเจ็กต์อาจมีโควต้าไม่เหมือนกัน เมื่อคุณใช้ Google Cloud มากขึ้นเรื่อยๆ ค่าโควต้าอาจต้องเพิ่มขึ้น หากคาดว่าการใช้งานจะเพิ่มขึ้นอย่างเห็นได้ชัดในอนาคต คุณสามารถขอปรับโควต้า
จากหน้าโควต้า
ใน Google Cloud Console ได้ล่วงหน้า
[[["เข้าใจง่าย","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 UTC"],[],[],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)"]]