{"id":265897,"date":"2024-03-13T20:07:50","date_gmt":"2024-03-13T19:07:50","guid":{"rendered":"https:\/\/www.sheetgo.com\/?p=265897"},"modified":"2026-10-29T14:15:54","modified_gmt":"2026-10-29T13:15:54","slug":"api-do-google-sheets","status":"publish","type":"post","link":"https:\/\/www.sheetgo.com\/pt\/blog\/google-sheets-features\/google-sheets-api\/","title":{"rendered":"API do Google Sheets: o que \u00e9 e como usar"},"content":{"rendered":"<p>[et_pb_section fb_built=&#8221;1&#8243; admin_label=&#8221;section&#8221; _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221; da_is_popup=&#8221;off&#8221; da_exit_intent=&#8221;off&#8221; da_has_close=&#8221;on&#8221; da_alt_close=&#8221;off&#8221; da_dark_close=&#8221;off&#8221; da_not_modal=&#8221;on&#8221; da_is_singular=&#8221;off&#8221; da_with_loader=&#8221;off&#8221; da_has_shadow=&#8221;on&#8221; da_disable_devices=&#8221;off|off|off&#8221;][et_pb_row admin_label=&#8221;row&#8221; _builder_version=&#8221;4.16&#8243; background_size=&#8221;initial&#8221; background_position=&#8221;top_left&#8221; background_repeat=&#8221;repeat&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.16&#8243; custom_padding=&#8221;|||&#8221; global_colors_info=&#8221;{}&#8221; custom_padding__hover=&#8221;|||&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_text _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>The Google Sheets API allows you to manipulate Sheets data from outside Google Sheets. You can manipulate it programmatically using your preferred programming language or through any app or platform that lets you connect to an API. This allows you to use your Google Sheets spreadsheets as databases.<\/p>\n<p>In this post, you will learn all about the Google Sheets API, including what it is, its pricing, and its limitations. You will also learn how the API works, the different connection options available, as well as where to find documentation for your preferred programming language.<\/p>\n<p>[\/et_pb_text][et_pb_text module_id=&#8221;what-is-the-google-sheets-api&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h2>What is the Google Sheets API?<\/h2>\n<p>The Google Sheets API is a RESTful interface that you can use to read and write data to Google Sheets. You can connect to it from another app or platform or use your preferred programming language, including JavaScript, PHP, and Python.<\/p>\n<p>Some of the most common uses of the Google Sheets API include the following:<\/p>\n<ul>\n<li>Create spreadsheets<\/li>\n<li>Read and write values to cells<\/li>\n<li>Update formatting<\/li>\n<li>Manage <a href=\"https:\/\/www.sheetgo.com\/blog\/how-to-solve-with-sheetgo\/how-to-get-data-from-bigquery-to-google-sheets-automatically\/\">Connected Sheets<\/a><\/li>\n<\/ul>\n<p>[\/et_pb_text][et_pb_text module_id=&#8221;is-the-google-sheets-api-free&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h2>Is the Google Sheets API free?<\/h2>\n<p>Google Sheets\u2019 API is free to use, but usage limits apply to each user. If your app experiences heavy traffic from many users, you\u2019ll see an error message (429: Too many requests). In other words, if you exceed the number of requests, your account won&#8217;t be charged for the overage.<\/p>\n<p>[\/et_pb_text][et_pb_text module_id=&#8221;google-sheets-api-limits&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h2>Google Sheets API limits<\/h2>\n<p>The Google Sheets API has some built-in limitations to protect the system from hackers. These limits or quotas apply to both read and write requests.<\/p>\n<h3>Read &amp; write requests<\/h3>\n<p>The quotas below apply separately to each type of request: read and write.<\/p>\n<ul>\n<li><strong>Per day per project:<\/strong> unlimited<\/li>\n<li><strong>Per minute per project:<\/strong> 300<\/li>\n<li><strong>Per minute per user per project:<\/strong> 60<\/li>\n<\/ul>\n<h3>Time-based quota errors<\/h3>\n<p>The Google Sheets API documentation recommends using an exponential backoff algorithm to implement a small delay to resolve time-based quota errors. For more instructions, you can check out the Google Cloud Storage documentation on <a href=\"https:\/\/cloud.google.com\/storage\/docs\/retry-strategy\" rel=\"noreferrer noopener\" target=\"_blank\">how to implement the exponential backoff algorithm<\/a>.<\/p>\n<h3>View quotas<\/h3>\n<p>You can <a href=\"https:\/\/cloud.google.com\/docs\/quotas\/view-manage\" rel=\"noreferrer noopener\" target=\"_blank\">view and manage your quotas<\/a> using a variety of methods.<\/p>\n<ul>\n<li>Google Cloud Console<\/li>\n<li>Google Cloud CLI<\/li>\n<li>Service Usage API<\/li>\n<li>Quota Metrics in Cloud Monitoring<\/li>\n<\/ul>\n<h3>Request higher quotas<\/h3>\n<p>If you exceed your quotas, you can <a href=\"https:\/\/cloud.google.com\/docs\/quotas\/help\/request_increase\" rel=\"noreferrer noopener\" target=\"_blank\">request higher ones<\/a>. However, this process requires that your request meet a set of undisclosed and strict criteria. You will be notified whether your request has been approved or denied.<\/p>\n<p>[\/et_pb_text][et_pb_text module_id=&#8221;how-does-the-google-sheets-api-work&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h2>How does the Google Sheets API work?<\/h2>\n<p>Google Sheets\u2019 RESTful Application Programming Interface (API) allows you to interact directly with your spreadsheets. You can choose whether to code an app or use a no-code solution, depending on your needs and programming skills. No-code solutions include existing apps that allow you to connect to an API, like <a href=\"https:\/\/www.sheetgo.com\/blog\/data-science\/tableau-dashboards-examples\/\">Tableau<\/a> or <a href=\"https:\/\/www.sheetgo.com\/blog\/marketing-processes\/how-to-use-supermetrics-add-on-for-google-sheets\/\">Supermetrics<\/a>. In order to connect, you will need to enable the API and generate the necessary API key.<\/p>\n<h3>Enable the Google Sheets API<\/h3>\n<p>To enable the Google Sheets API, follow the instructions below.<\/p>\n<p><strong>1.<\/strong> Log in to your Google Cloud Console.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2026\/10\/google-sheets-api-google-cloud-console.webp&#8221; alt=&#8221;Google Sheets API \u2014 Google Cloud welcome page for SampleProject with the project number and ID&#8221; title_text=&#8221;Google Cloud welcome page for SampleProject with the project number and ID&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><strong>2.<\/strong> Click the menu to access \u201cAPIs &amp; Services\u201d, then \u201cEnabled APIs &amp; services\u201d.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2026\/10\/google-sheets-api-apis-services-menu.webp&#8221; alt=&#8221;Google Sheets API \u2014 Google Cloud menu with APIs &#038; Services open and Enabled APIs &#038; services listed&#8221; title_text=&#8221;Google Cloud menu with APIs &#038; Services open and Enabled APIs &#038; services listed&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><strong>3.<\/strong> Click the button that says \u201c+ ENABLE APIS AND SERVICES\u201d.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2026\/10\/google-sheets-api-enable-apis-services.webp&#8221; alt=&#8221;Google Sheets API \u2014 APIs &#038; Services page with the Enable APIs and Services button at the top&#8221; title_text=&#8221;APIs &#038; Services page with the Enable APIs and Services button at the top&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><strong>4.<\/strong> Search for the Google Sheets API, as shown below and click on the result.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2026\/10\/google-sheets-api-library-search.webp&#8221; alt=&#8221;Google Sheets API \u2014 API Library search for sheets with Google Sheets API as the only result&#8221; title_text=&#8221;API Library search for sheets with Google Sheets API as the only result&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><strong>5.<\/strong> Click to enable the Google Sheets API.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2026\/10\/google-sheets-api-enable-button.webp&#8221; alt=&#8221;Google Sheets API \u2014 product details page with the Enable button&#8221; title_text=&#8221;Product details page with the Enable button&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><strong>6.<\/strong> Click the blue button to create the credentials.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2026\/10\/google-sheets-api-create-credentials.webp&#8221; alt=&#8221;Google Sheets API \u2014 API\/Service Details page with the Create Credentials button&#8221; title_text=&#8221;API\/Service Details page with the Create Credentials button&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><strong>7.<\/strong> To define the credential type, make sure that you have selected the Google Sheets API.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2026\/10\/google-sheets-api-credential-type.webp&#8221; alt=&#8221;Google Sheets API \u2014 Create credentials form with Google Sheets API selected as the API&#8221; title_text=&#8221;Create credentials form with Google Sheets API selected as the API&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><strong>8.<\/strong> Select whether you want to access user data or application data.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2026\/10\/google-sheets-api-application-data.webp&#8221; alt=&#8221;Google Sheets API \u2014 Create credentials form with Application data selected&#8221; title_text=&#8221;Create credentials form with Application data selected&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><strong>9.<\/strong> Specify whether you will be using any of the products listed and click \u201cNext\u201d.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2026\/10\/google-sheets-api-compute-engine-question.webp&#8221; alt=&#8221;Google Sheets API \u2014 Compute Engine question answered with No, I&#8217;m not using them&#8221; title_text=&#8221;Compute Engine question answered with No, I&#8217;m not using them&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><strong>10.<\/strong> Type in the required account details.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2026\/10\/google-sheets-api-service-account-details.webp&#8221; alt=&#8221;Google Sheets API \u2014 Create service account form with the name Sheets filled in&#8221; title_text=&#8221;Create service account form with the name Sheets filled in&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><strong>11.<\/strong> Select the role you want to grant, then click \u201cDone\u201d to finish.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2026\/10\/google-sheets-api-service-account-role.webp&#8221; alt=&#8221;Google Sheets API \u2014 role menu for the service account with Editor highlighted&#8221; title_text=&#8221;Role menu for the service account with Editor highlighted&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text module_id=&#8221;google-sheets-api-documentation&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h2>Google Sheets API documentation<\/h2>\n<p>The <a href=\"https:\/\/developers.google.com\/sheets\/api\/guides\/concepts\" rel=\"noreferrer noopener\" target=\"_blank\">Google Sheets API documentation<\/a> offers Quickstarts with detailed instructions and the code required to connect using <a href=\"https:\/\/developers.google.com\/sheets\/api\/quickstart\/go\" rel=\"noreferrer noopener\" target=\"_blank\">Go<\/a>, <a href=\"https:\/\/developers.google.com\/sheets\/api\/quickstart\/apps-script\" rel=\"noreferrer noopener\" target=\"_blank\">Google Apps Script<\/a>, <a href=\"https:\/\/developers.google.com\/sheets\/api\/quickstart\/java\" rel=\"noreferrer noopener\" target=\"_blank\">Java<\/a>, <a href=\"https:\/\/developers.google.com\/sheets\/api\/quickstart\/js\" rel=\"noreferrer noopener\" target=\"_blank\">JavaScript<\/a>, <a href=\"https:\/\/developers.google.com\/sheets\/api\/quickstart\/nodejs\" rel=\"noreferrer noopener\" target=\"_blank\">Node.js<\/a>, and <a href=\"https:\/\/developers.google.com\/sheets\/api\/quickstart\/python\" rel=\"noreferrer noopener\" target=\"_blank\">Python<\/a>. Additionally, the documentation includes detailed instructions and the code needed for the following:<\/p>\n<ul>\n<li>Create Spreadsheets<\/li>\n<li>Read\/Write Cell Values<\/li>\n<li>Update Spreadsheets<\/li>\n<li>Date\/Number Formats<\/li>\n<li>Pivot Tables<\/li>\n<li>Conditional Formatting<\/li>\n<li>Filters<\/li>\n<li>Developer Metadata<\/li>\n<li>Connected Sheets<\/li>\n<li>Field Masks<\/li>\n<li>Google Charts<\/li>\n<\/ul>\n<p>These instructions and samples are available for various programming languages: Google Apps Script, Java, JavaScript, Node.js, PHP, Python, and Ruby.<\/p>\n<p>[\/et_pb_text][et_pb_text module_id=&#8221;conclusion&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h2>Conclusion<\/h2>\n<p>As you have seen, the Google Sheets API allows you to interact with your Google Sheets data programmatically. You can read and write data to your spreadsheet using other platforms and apps, including ones you build using your preferred programming language. You can then <a href=\"https:\/\/www.sheetgo.com\/blog\/google-sheets-features\/google-sheets-as-database\/\">use Google Sheets as a database<\/a> and run queries and functions from wherever you want.<\/p>\n<p>You now know what the Google Sheets API is and the pricing, as well as the main limitations related to its use. You also know how to enable the Google Sheets API and create credentials from the Google Cloud Platform. Finally, you know how to access quickstart documentation for multiple programming languages and full Google Sheets API documentation and examples for Google Apps Script, Java, JavaScript, Node.js, PHP, Python, and Ruby.<\/p>\n<p>If you&#8217;d rather not write code, <a href=\"https:\/\/www.sheetgo.com\/automations\/\">Sheetgo<\/a>, an AI-powered data automation platform, can <a href=\"https:\/\/www.sheetgo.com\/blog\/how-to-solve-with-sheetgo\/connect-to-any-api-using-sheetgo\/\">connect to an API<\/a> and bring the data into your spreadsheets on a schedule. To script it yourself, start with this guide to <a href=\"https:\/\/www.sheetgo.com\/blog\/google-sheets-features\/use-google-apps-script-in-google-sheets\/\">Google Apps Script in Google Sheets<\/a>.<\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn what the Google Sheets API is, whether it&#8217;s free, what its usage limits are, and how to enable it and create credentials in the Google Cloud Console.<\/p>","protected":false},"author":2,"featured_media":265909,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_et_pb_use_builder":"on","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[37],"tags":[],"class_list":["post-265897","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-google-sheets-features"],"acf":[],"permalink_manager":null,"_links":{"self":[{"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/posts\/265897","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/comments?post=265897"}],"version-history":[{"count":0,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/posts\/265897\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/media\/265909"}],"wp:attachment":[{"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/media?parent=265897"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/categories?post=265897"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/tags?post=265897"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}