无论接口类型如何,所有 Cloud API 都采用 API 设计指南中所述的面向资源的设计原则,这样可确保 Cloud API 提供简单、一致的开发者体验。
您可以参考我们的 API 设计指南,更好地了解 Cloud API。
如果您想研究 Cloud API 的接口定义,可以访问 GitHub 上的 Google API 代码库。
限制您的用量
Cloud API 由数百万名开发者和用户共用。为确保公平使用并最大限度地减少滥用风险,所有 Cloud API 都设有使用速率限制和资源用量配额,通常称为配额。您还可以使用这些配额来减少自己的配额限制,以控制您在 Google Cloud 产品上的支出。如果您的配额超出默认限制,您需要提交增加配额的申请。
大多数 Cloud API 都可为您提供您的项目对该 API 的使用详情,包括流量水平、错误率和延迟时间。它有助于您对使用 Cloud API 的应用进行快速分类。您可以在 Google Cloud 控制台的 Google Cloud API 信息中心中查看此信息。您还可以在 Cloud Monitoring 中创建自定义信息中心和提醒。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-04。"],[[["\u003cp\u003eGoogle Cloud APIs are programmatic interfaces that allow developers to integrate Google Cloud services, such as computing, networking, and machine learning, into their applications.\u003c/p\u003e\n"],["\u003cp\u003eCloud APIs can be accessed through various methods, including client libraries, Firebase SDKs, third-party clients, the Google Cloud CLI, and the Google Cloud console.\u003c/p\u003e\n"],["\u003cp\u003eThese APIs support both JSON HTTP and gRPC interfaces, with gRPC offering enhanced performance and usability through Google Cloud Client Libraries.\u003c/p\u003e\n"],["\u003cp\u003eCloud APIs are categorized into resource-based and client-based, which determine the project used for billing and quota purposes.\u003c/p\u003e\n"],["\u003cp\u003eAll Cloud APIs enforce rate limits and quotas to ensure fair usage and to help users manage their spending on Google Cloud products.\u003c/p\u003e\n"]]],[],null,["# Google Cloud APIs are programmatic interfaces to Google Cloud Platform services.\nThey are a key part of Google Cloud Platform, allowing you to easily add the\npower of everything from computing to networking to storage to\nmachine-learning-based data analysis to your applications.\n\nAbout Cloud APIs\n----------------\n\nCloud APIs are exposed as network API services to customers, such as\n[Cloud Pub/Sub API](/pubsub). Each Cloud API typically runs on one or more\nsubdomains of `googleapis.com`, such as `pubsub.googleapis.com`, and provides\nboth JSON HTTP and gRPC interfaces to clients over public internet and\nVirtual Private Cloud (VPC) networks. Clients can send HTTP and gRPC\nrequests to Cloud API endpoints directly or by using client libraries.\n\nCloud APIs are part of the [Google Enterprise\nAPIs](/apis/docs/resources/enterprise-apis) category in the Google Cloud console\n[API Library](https://console.cloud.google.com/apis/library/browse?filter=category:enterprise-api).\n\nThere are two kinds of Google Cloud APIs:\n\n- *Resource-based APIs*, which use the project associated with the resources\n being accessed for billing and quota.\n\n- *Client-based APIs*, which use the project associated with the client\n accessing the resources for billing and quota.\n\nAccessing Cloud APIs\n--------------------\n\nYou can access Cloud APIs from server applications with our\n[client libraries](/apis/docs/client-libraries-explained)\nin many popular programming languages, from mobile apps via the\n[Firebase SDKs](https://firebase.google.com/docs),\nor by using third-party clients. You can also access Cloud APIs with the\n[Google Cloud CLI](/sdk) or\n[Google Cloud console](https://console.cloud.google.com/).\n\nIf you are new to Cloud APIs, see [Getting Started](/apis/docs/getting-started)\non how to use Cloud APIs.\n\n### Supporting HTTP and gRPC\n\nAll Cloud APIs provide a simple JSON HTTP interface that you can call directly\nor via\n[Google API Client Libraries](https://developers.google.com/api-client-library).\nMost Cloud APIs also provide a\n[gRPC](https://grpc.io)\ninterface you can call via\n[Google Cloud Client Libraries](/apis/docs/cloud-client-libraries),\nwhich provide better performance and usability. You can also use third-party\nclients.\n\nFor more information about our client libraries, see\n[Client Libraries Explained](/apis/docs/client-libraries-explained).\n\nFor more information about authentication for using Google APIs, see\n[Authentication methods at Google](/docs/authentication) and\n[Authentication for using client libraries](/docs/authentication/client-libraries).\n\n### TLS encryption\n\nAll Cloud APIs accept only secure requests using TLS encryption.\n\n- If you are using one of our client libraries, in-transit encryption is handled for you by the library.\n- If you are using your own gRPC client, you need to authenticate with Google (which requires TLS) following the instructions in the [gRPC authentication guide](https://grpc.io/docs/guides/auth/).\n- If you are creating your own HTTP client, see our [HTTP guidelines](/apis/docs/http).\n\nYou can find out more about how traffic to Google Cloud services is secured in\nour [Encryption in Transit](/security/encryption-in-transit) security guide.\n\n### Private Service Connect\n\nEnterprise customers often want to access Cloud APIs privately for security\nand compliance reasons. You can use Private Service Connect to\nset up and manage such access within your VPC networks.\n\nFor more information, see\n[Configuring Private Service Connect](/vpc/docs/configure-private-service-connect-apis).\n\n### Step-by-step examples\n\nSee the following step-by-step guides that use the client libraries for some\npopular APIs:\n\n- [Cloud Billing Budget API with Node.js](https://console.cloud.google.com/?tutorial=billing--budget--billing-budget-api-nodejs).\n- [Cloud Billing Budget API with Python](https://console.cloud.google.com/?tutorial=billing--budget--billing-budget-api-python).\n- [Cloud Logging with Node.js](https://console.cloud.google.com/?tutorial=logging--logging-nodejs).\n- [Cloud Logging with Python](https://console.cloud.google.com/?tutorial=logging--logging-python).\n- [Cloud Logging with Go](https://console.cloud.google.com/?tutorial=logging--logging-go).\n- [Cloud Logging with Java](https://console.cloud.google.com/?tutorial=logging--logging-java).\n- [Speech-to-Text with Node.js](https://console.cloud.google.com/?tutorial=speech-to-text--speech-to-text-nodejs).\n- [Speech-to-Text with Python](https://console.cloud.google.com/?tutorial=speech-to-text--speech-to-text-python).\n- [Speech-to-Text with Go](https://console.cloud.google.com/?tutorial=speech-to-text--speech-to-text-go).\n- [Speech-to-Text with Java](https://console.cloud.google.com/?tutorial=speech-to-text__speech-to-text-java).\n\nAPI Design Guide\n----------------\n\nRegardless of the interface type, all Cloud APIs use resource-oriented design\nprinciples as described in our [API Design Guide](/apis/design), which\nensures Cloud APIs to have a simple and consistent developer experience.\nYou can reference our API Design Guide to have a better understanding of Cloud\nAPIs.\n\nIf you want to study the interface definition of Cloud APIs, you can visit the\n[Google APIs](https://github.com/googleapis/googleapis) repository on GitHub.\n\nCapping your usage\n------------------\n\nCloud APIs are shared among millions of developers and users. To ensure fair\nusage and minimize abuse risks, all Cloud APIs are enforcing rate limits and\nresource quotas on usage, commonly known as quotas. You can also use these\nquotas to control your spending on Google Cloud products by reducing your own\nquota limits. If you need more quotas than the default limits, you need\nto file quota increase requests.\n\nFor more information, see [Capping API usage](/apis/docs/capping-api-usage).\n\nMonitoring your usage\n---------------------\n\nMost Cloud APIs provide you with detailed information on your project's usage\nof that API, including traffic levels, error rates, and latencies. It helps\nyou to quickly triage problems with applications that use Cloud APIs. You can\nview this information in the Google Cloud\n[API Dashboard](https://console.cloud.google.com/apis/dashboard) in the Google Cloud console. You\ncan also create custom dashboards and alerts in Cloud Monitoring.\n\nFor more information, see [Monitoring API usage](/apis/docs/monitoring).\n\nGoogle Enterprise APIs\n----------------------\n\nGoogle Enterprise APIs are high-stability APIs, ready for enterprise use with\nsupport options available.\n\nFor more information, see\n[Google Enterprise APIs](/apis/docs/resources/enterprise-apis).\n\nTry it for yourself\n-------------------\n\n\nIf you're new to Google Cloud, create an account to evaluate how our\nproducts perform in real-world scenarios. New customers also get $300 in\nfree credits to run, test, and deploy workloads.\n[Get started for free](https://console.cloud.google.com/freetrial)"]]