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.
Tất cả các yêu cầu gửi đến API thư viện Google Photos đều được tính vào hạn mức. Chúng tôi áp dụng các giới hạn này để bảo vệ hệ thống và người dùng.
Để truy cập vào API, bạn phải cung cấp thông tin đăng nhập ứng dụng OAuth từ dự án dành cho nhà phát triển của Google. Dự án này phải bật API Thư viện theo mô tả trong phần Bắt đầu.
Để tìm hiểu thêm về cách sử dụng API này sao cho phù hợp, vui lòng xem Chính sách sử dụng.
Hạn mức chung
Hạn mức cho các yêu cầu gửi đến API thư viện là 10.000 yêu cầu cho mỗi dự án mỗi ngày. Điều này bao gồm tất cả các yêu cầu API, chẳng hạn như tải lên, liệt kê nội dung nghe nhìn và áp dụng bộ lọc, nhưng không truy cập các byte nội dung nghe nhìn từ một URL cơ sở.
Hạn mức đối với các yêu cầu truy cập vào số byte nội dung đa phương tiện (bằng cách tải ảnh hoặc video từ một URL cơ sở) là 75.000 yêu cầu cho mỗi dự án mỗi ngày.
Ngoài những giới hạn này, chúng tôi còn đặt ra các hạn mức khác để bảo vệ độ tin cậy và tính toàn vẹn của hệ thống. Nếu gặp lỗi 429, thì có khả năng bạn đã đạt đến một trong những hạn mức này. Nếu gặp một trong những lỗi trên, hãy giảm số lượng yêu cầu bạn thực hiện trong một khoảng thời gian nhất định. Để biết thêm thông tin, hãy tham khảo nội dung thử lại các yêu cầu không thành công và thời gian đợi luỹ thừa.
Kiểm tra mức sử dụng hạn mức
Để xem hạn mức hiện có mà bạn đã sử dụng và để xem hoặc thay đổi hạn mức sử dụng cho dự án, hãy truy cập trang Hạn mức trong Google API Console rồi chọn API Thư viện Photos.
Vượt quá hạn mức
Nếu vượt quá hạn mức yêu cầu API Thư viện, API sẽ trả về mã lỗi 429 và thông báo cho biết dự án đã vượt quá hạn mức. Để biết thêm thông tin, hãy xem Điều khoản dịch vụ.
Đang yêu cầu hạn mức bổ sung
Chương trình đối tác của Google Photos hướng đến các ứng dụng lớn dành cho người tiêu dùng yêu cầu tăng hạn mức. Nếu bạn cho rằng đơn đăng ký của mình thuộc danh mục này, hãy bày tỏ sự quan tâm đến chương trình đối tác.
Chất lượng và bộ nhớ ảnh
Tất cả các mục nội dung đa phương tiện mà bạn tải lên Google Photos bằng API này đều được lưu trữ ở độ phân giải đầy đủ với chất lượng gốc. Chúng được tính vào bộ nhớ của người dùng.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-08-29 UTC."],[[["\u003cp\u003eAll requests to the Google Photos Library API are subject to daily quota limits to protect the system, including limits for general API requests and accessing media bytes.\u003c/p\u003e\n"],["\u003cp\u003eExceeding these quota limits will result in a 429 error, requiring developers to reduce request frequency and implement strategies like retrying failed requests and exponential backoff.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can monitor and manage their quota usage through the Quotas page in the Google API Console.\u003c/p\u003e\n"],["\u003cp\u003eApplications with high-volume needs can request increased quota limits by expressing interest in the Google Photos partner program.\u003c/p\u003e\n"],["\u003cp\u003eMedia uploaded via the API is stored at original quality and counts towards the user's storage, requiring applications to inform users about potential storage impact for large uploads.\u003c/p\u003e\n"]]],["The Google Photos Library API has request quotas to protect the system. Each project is limited to 10,000 API requests daily, including uploads and listing, and 75,000 daily requests for media byte access. Exceeding limits results in a 429 error, requiring reduced request frequency. Quota usage can be monitored via the Google API Console. Uploaded media are stored at original quality and count towards user storage. Higher quotas are available via a partner program.\n"],null,["# API limits and quotas\n\nAll requests sent to the Google Photos Library API are counted toward a quota. We put these\nlimits in place to protect the system and its users.\n\nAccess to the API requires OAuth client credentials from a Google developers\nproject. This project must have the Library API enabled as described in\n[Get started](/photos/library/guides/get-started).\n\nTo learn more about appropriate use of this API, see the\n[Acceptable use policy](/photos/library/guides/acceptable-use).\n\nGeneral quota limits\n--------------------\n\nThe quota limit for requests to the Library API is 10,000 requests per\nproject per day. This includes all API requests, such as uploading, listing\nmedia, and applying filters, but not accessing media bytes from a base URL.\n\nThe quota limit for requests to access media bytes (by\n[loading a photo or video from a base\nURL](/photos/library/guides/access-media-items#base-urls))\nis 75,000 requests per project per day.\n\nIn addition to these limits there are other quotas that exist to protect the\nreliability and integrity of our systems. If you receive a 429 error, you've\nlikely hit one of these quotas. If you receive one of these errors, reduce the\nnumber of requests you are making over a given time period. For more\ninformation, refer to [retrying failed\nrequests](/photos/library/guides/best-practices#retrying-failed-requests) and\n[exponential\nbackoff](/photos/library/guides/best-practices#exponential-backoff).\n\n### Checking quota usage\n\nTo see how much of your available quota you have used, and to view or change\nusage limits for your project, visit the\n[Quotas page](https://console.cloud.google.com/iam-admin/quotas?service=photoslibrary.googleapis.com)\nin the Google API Console and select **Photos Library API**.\n\n### Exceeding quota limits\n\nIf the quota of requests to the Library API is exceeded, the API returns\nan error code 429 and a message that the project has exceeded the quota. For\nmore information, see the [Terms of\nService](https://developers.google.com/terms/).\n\n### Requesting additional quota\n\nThe Google Photos partner program is geared towards large consumer\napplications that require increased quota limits. If you believe your\napplication belongs in this category, [express interest in the\npartner program](/photos/partner-program/overview).\n\nPhoto storage and quality\n-------------------------\n\nAll media items uploaded to Google Photos using the API are stored in\nfull resolution at [original\nquality](https://support.google.com/photos/answer/6220791). They count toward\nthe user's storage.\n| **Note:** If your uploads exceed 25MB per user, your application should remind the user that these uploads will count towards storage in their Google Account."]]