Google Sheets API
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Lee y escribe Hojas de cálculo de Google.
Servicio: sheets.googleapis.com
Para llamar a este servicio, te recomendamos que uses las bibliotecas cliente que proporciona Google. Si tu aplicación necesita usar tus propias bibliotecas para llamar a este servicio, usa la información siguiente cuando realices las solicitudes a la API.
Documento de descubrimiento
Un Documento de descubrimiento es una especificación procesable para describir y consumir las API de REST. Se usa para compilar bibliotecas cliente, complementos IDE y otras herramientas que interactúan con las API de Google. Un servicio puede proporcionar varios documentos de descubrimiento. Este servicio proporciona el documento de descubrimiento siguiente:
Extremo de servicio
Un extremo de servicio es una URL base que especifica la dirección de la red de un servicio de API. Un servicio puede tener varios extremos de servicio. Este servicio tiene el siguiente extremo, y todos los URI que se muestran a continuación son relativos a él:
https://sheets.googleapis.com
Métodos |
batchUpdate |
POST /v4/spreadsheets/{spreadsheetId}:batchUpdate
Aplica una o más actualizaciones a la hoja de cálculo. |
create |
POST /v4/spreadsheets
Crea una hoja de cálculo y muestra la hoja recién creada. |
get |
GET /v4/spreadsheets/{spreadsheetId}
Muestra la hoja de cálculo en el ID determinado. |
getByDataFilter |
POST /v4/spreadsheets/{spreadsheetId}:getByDataFilter
Muestra la hoja de cálculo en el ID determinado. |
Métodos |
copyTo |
POST /v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo
Copia una sola hoja de una hoja de cálculo a otra. |
Métodos |
append |
POST /v4/spreadsheets/{spreadsheetId}/values/{range}:append
Agrega valores a una hoja de cálculo. |
batchClear |
POST /v4/spreadsheets/{spreadsheetId}/values:batchClear
Borra uno o más rangos de valores de una hoja de cálculo. |
batchClearByDataFilter |
POST /v4/spreadsheets/{spreadsheetId}/values:batchClearByDataFilter
Borra uno o más rangos de valores de una hoja de cálculo. |
batchGet |
GET /v4/spreadsheets/{spreadsheetId}/values:batchGet
Muestra uno o más rangos de valores de una hoja de cálculo. |
batchGetByDataFilter |
POST /v4/spreadsheets/{spreadsheetId}/values:batchGetByDataFilter
Devuelve uno o más rangos de valores que coinciden con los filtros de datos especificados. |
batchUpdate |
POST /v4/spreadsheets/{spreadsheetId}/values:batchUpdate
Establece valores en uno o más rangos de una hoja de cálculo. |
batchUpdateByDataFilter |
POST /v4/spreadsheets/{spreadsheetId}/values:batchUpdateByDataFilter
Establece valores en uno o más rangos de una hoja de cálculo. |
clear |
POST /v4/spreadsheets/{spreadsheetId}/values/{range}:clear
Borra los valores de una hoja de cálculo. |
get |
GET /v4/spreadsheets/{spreadsheetId}/values/{range}
Muestra un rango de valores de una hoja de cálculo. |
update |
PUT /v4/spreadsheets/{spreadsheetId}/values/{range}
Establece valores en un rango de una hoja de cálculo. |
Salvo que se indique lo contrario, el contenido de esta página está sujeto a la licencia Atribución 4.0 de Creative Commons, y los ejemplos de código están sujetos a la licencia Apache 2.0. Para obtener más información, consulta las políticas del sitio de Google Developers. Java es una marca registrada de Oracle o sus afiliados.
Última actualización: 2025-07-25 (UTC)
[null,null,["Última actualización: 2025-07-25 (UTC)"],[],[],null,["# Google Sheets API\n\nReads and writes Google Sheets.\n\n- [REST Resource: v4.spreadsheets](#v4.spreadsheets)\n- [REST Resource: v4.spreadsheets.developerMetadata](#v4.spreadsheets.developerMetadata)\n- [REST Resource: v4.spreadsheets.sheets](#v4.spreadsheets.sheets)\n- [REST Resource: v4.spreadsheets.values](#v4.spreadsheets.values)\n\nService: sheets.googleapis.com\n------------------------------\n\nTo call this service, we recommend that you use the Google-provided [client libraries](https://cloud.google.com/apis/docs/client-libraries-explained). If your application needs to use your own libraries to call this service, use the following information when you make the API requests.\n\n### Discovery document\n\nA [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) is a machine-readable specification for describing and consuming REST APIs. It is used to build client libraries, IDE plugins, and other tools that interact with Google APIs. One service may provide multiple discovery documents. This service provides the following discovery document:\n\n- \u003chttps://sheets.googleapis.com/$discovery/rest?version=v4\u003e\n\n### Service endpoint\n\nA [service endpoint](https://cloud.google.com/apis/design/glossary#api_service_endpoint) is a base URL that specifies the network address of an API service. One service might have multiple service endpoints. This service has the following service endpoint and all URIs below are relative to this service endpoint:\n\n- `https://sheets.googleapis.com`\n\nREST Resource: [v4.spreadsheets](/workspace/sheets/api/reference/rest/v4/spreadsheets)\n--------------------------------------------------------------------------------------\n\n| Methods ||\n|-----------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------|\n| [batchUpdate](/workspace/sheets/api/reference/rest/v4/spreadsheets/batchUpdate) | `POST /v4/spreadsheets/{spreadsheetId}:batchUpdate` Applies one or more updates to the spreadsheet. |\n| [create](/workspace/sheets/api/reference/rest/v4/spreadsheets/create) | `POST /v4/spreadsheets` Creates a spreadsheet, returning the newly created spreadsheet. |\n| [get](/workspace/sheets/api/reference/rest/v4/spreadsheets/get) | `GET /v4/spreadsheets/{spreadsheetId}` Returns the spreadsheet at the given ID. |\n| [getByDataFilter](/workspace/sheets/api/reference/rest/v4/spreadsheets/getByDataFilter) | `POST /v4/spreadsheets/{spreadsheetId}:getByDataFilter` Returns the spreadsheet at the given ID. |\n\nREST Resource: [v4.spreadsheets.developerMetadata](/workspace/sheets/api/reference/rest/v4/spreadsheets.developerMetadata)\n--------------------------------------------------------------------------------------------------------------------------\n\n| Methods ||\n|-----------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [get](/workspace/sheets/api/reference/rest/v4/spreadsheets.developerMetadata/get) | `GET /v4/spreadsheets/{spreadsheetId}/developerMetadata/{metadataId}` Returns the developer metadata with the specified ID. |\n| [search](/workspace/sheets/api/reference/rest/v4/spreadsheets.developerMetadata/search) | `POST /v4/spreadsheets/{spreadsheetId}/developerMetadata:search` Returns all developer metadata matching the specified [DataFilter](/workspace/sheets/api/reference/rest/v4/DataFilter). |\n\nREST Resource: [v4.spreadsheets.sheets](/workspace/sheets/api/reference/rest/v4/spreadsheets.sheets)\n----------------------------------------------------------------------------------------------------\n\n| Methods ||\n|------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------|\n| [copyTo](/workspace/sheets/api/reference/rest/v4/spreadsheets.sheets/copyTo) | `POST /v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo` Copies a single sheet from a spreadsheet to another spreadsheet. |\n\nREST Resource: [v4.spreadsheets.values](/workspace/sheets/api/reference/rest/v4/spreadsheets.values)\n----------------------------------------------------------------------------------------------------\n\n| Methods ||\n|----------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------|\n| [append](/workspace/sheets/api/reference/rest/v4/spreadsheets.values/append) | `POST /v4/spreadsheets/{spreadsheetId}/values/{range}:append` Appends values to a spreadsheet. |\n| [batchClear](/workspace/sheets/api/reference/rest/v4/spreadsheets.values/batchClear) | `POST /v4/spreadsheets/{spreadsheetId}/values:batchClear` Clears one or more ranges of values from a spreadsheet. |\n| [batchClearByDataFilter](/workspace/sheets/api/reference/rest/v4/spreadsheets.values/batchClearByDataFilter) | `POST /v4/spreadsheets/{spreadsheetId}/values:batchClearByDataFilter` Clears one or more ranges of values from a spreadsheet. |\n| [batchGet](/workspace/sheets/api/reference/rest/v4/spreadsheets.values/batchGet) | `GET /v4/spreadsheets/{spreadsheetId}/values:batchGet` Returns one or more ranges of values from a spreadsheet. |\n| [batchGetByDataFilter](/workspace/sheets/api/reference/rest/v4/spreadsheets.values/batchGetByDataFilter) | `POST /v4/spreadsheets/{spreadsheetId}/values:batchGetByDataFilter` Returns one or more ranges of values that match the specified data filters. |\n| [batchUpdate](/workspace/sheets/api/reference/rest/v4/spreadsheets.values/batchUpdate) | `POST /v4/spreadsheets/{spreadsheetId}/values:batchUpdate` Sets values in one or more ranges of a spreadsheet. |\n| [batchUpdateByDataFilter](/workspace/sheets/api/reference/rest/v4/spreadsheets.values/batchUpdateByDataFilter) | `POST /v4/spreadsheets/{spreadsheetId}/values:batchUpdateByDataFilter` Sets values in one or more ranges of a spreadsheet. |\n| [clear](/workspace/sheets/api/reference/rest/v4/spreadsheets.values/clear) | `POST /v4/spreadsheets/{spreadsheetId}/values/{range}:clear` Clears values from a spreadsheet. |\n| [get](/workspace/sheets/api/reference/rest/v4/spreadsheets.values/get) | `GET /v4/spreadsheets/{spreadsheetId}/values/{range}` Returns a range of values from a spreadsheet. |\n| [update](/workspace/sheets/api/reference/rest/v4/spreadsheets.values/update) | `PUT /v4/spreadsheets/{spreadsheetId}/values/{range}` Sets values in a range of a spreadsheet. |"]]