Google Docs API – Übersicht
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Mit der Google Docs API können Sie Dokumente in Google Docs erstellen und ändern.
Anwendungen können in die Docs API eingebunden werden, um ansprechende Dokumente aus Nutzer- und Systemdaten zu erstellen. Mit der Docs API haben Sie folgende Möglichkeiten:
- Prozesse automatisieren
- Dokumentation im Bulk erstellen
- Dokumente formatieren
- Rechnungen oder Verträge erstellen
- Bestimmte Attribute von Objekten abrufen
Im Folgenden finden Sie eine Liste der häufig verwendeten Begriffe in der Docs API:
- Dokument-ID
Die eindeutige Kennung für ein Dokument. Es handelt sich um einen bestimmten String, der Buchstaben, Zahlen und einige Sonderzeichen enthält, die auf ein Dokument verweisen. Er kann aus der URL des Dokuments abgeleitet werden. Dokument-IDs bleiben stabil, auch wenn sich der Dokumentname ändert. Weitere Informationen zum Suchen der ID finden Sie unter Dokument-ID.
https://docs.google.com/document/d/DOCUMENT_ID/edit
- Element
Die Struktur, aus der ein Dokument besteht. Zu den Elementen der obersten Ebene eines Dokuments gehören Body
, DocumentStyle
und List
.
- Google Workspace-Dokument
Eine Datei, die von einer Google Workspace-Anwendung wie Google Docs erstellt wird.
Das Format für den MIME-Typ für Google Docs ist application/vnd.google-apps.document
. Eine Liste der MIME-Typen finden Sie unter
Von Google Workspace und Google Drive unterstützte MIME-Typen.
- Index
Die meisten Elemente im Inhaltsbereich haben die Eigenschaften startIndex
und endIndex
. Diese geben den Versatz des Beginns und Endes eines Elements relativ zum Beginn des umschließenden segment an.
- Inline-Bild
Ein Bild, das im Textfluss eines Dokuments angezeigt wird. Es handelt sich nicht um einen Anhang.
- Benannter Bereich
Ein zusammenhängender Textbereich. Ein NamedRange
ist eine Sammlung von Bereichen mit demselben namedRangeId
. Mit benannten Bereichen können Entwickler Teile eines Dokuments mit einem beliebigen benutzerdefinierten Label verknüpfen, damit die Inhalte später programmatisch gelesen oder bearbeitet werden können. Ein Dokument kann mehrere benannte Bereiche mit demselben Namen enthalten, aber jeder benannte Bereich hat eine eindeutige ID.
- Segment
Das Body
-, Header
-, Footer
- oder Footnote
-Element, das Strukturelemente oder Inhaltselemente enthält. Die Indizes der Elemente in einem Segment sind relativ zum Beginn dieses Segments.
- Vorschlag
Änderungen an einem Dokument vornehmen, ohne den Originaltext zu ändern. Wenn der Eigentümer des Dokuments die Änderungen annimmt, ersetzen diese den ursprünglichen Text an den entsprechenden Stellen.
Informationen zur Entwicklung mit Google Workspace APIs, einschließlich der Verarbeitung von Authentifizierung und Autorisierung, finden Sie unter Entwicklung mit Google Workspace.
Eine konzeptionelle Übersicht über ein Dokument finden Sie unter Dokument.
Informationen zum Konfigurieren und Ausführen einer Docs API-App finden Sie in der JavaScript-Kurzanleitung.
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-08-29 (UTC).
[null,null,["Zuletzt aktualisiert: 2025-08-29 (UTC)."],[],[],null,["# Google Docs API overview\n\nThe Google Docs API lets you create and modify documents in Google Docs.\n\nApplications can integrate with the Docs API to create polished\ndocuments from both user and system-provided data. The Docs API lets\nyou:\n\n- Automate processes\n- Create documentation in bulk\n- Format documents\n- Generate invoices or contracts\n- Retrieve specific attributes of objects\n\nThe following is a list of common terms used in the Docs API:\n\n*Document ID*\n\n: The unique identifier for a document. It's a particular string containing\n letters, numbers, and some special characters that reference a document and\n it can be derived from the document's URL. Document IDs are stable, even if\n the document name changes. For more information on how to find the ID, see\n [Document ID](/workspace/docs/api/concepts/document#document-id).\n\n https://docs.google.com/document/d/\u003cvar translate=\"no\"\u003eDOCUMENT_ID\u003c/var\u003e/edit\n\n*Element*\n\n: The structure that makes up a document. Top-level elements of a document\n include the [`Body`](/workspace/docs/api/reference/rest/v1/documents#body),\n [`DocumentStyle`](/workspace/docs/api/reference/rest/v1/documents#documentstyle), and\n [`List`](/workspace/docs/api/reference/rest/v1/documents#list).\n\n*Google Workspace document*\n\n: A file that a Google Workspace application, like Google Docs, creates.\n The MIME type format for Docs is\n `application/vnd.google-apps.document`. For a list of MIME types, see [Google Workspace and Google Drive supported MIME types](/drive/api/guides/mime-types).\n\n*Index*\n\n: Most *elements* within the content body have the `startIndex` and `endIndex`\n properties. These indicate the offset of an element's beginning and end,\n relative to the beginning of its enclosing *segment*.\n\n*Inline image*\n\n: An image that appears in the flow of text within a document. It's not an\n attachment.\n\n*Named range*\n\n: A contiguous range of text. A\n [`NamedRange`](/workspace/docs/api/reference/rest/v1/documents#namedrange) is a\n collection of ranges with the same `namedRangeId`. Named ranges allow\n developers to associate parts of a document with an arbitrary user-defined\n label so their contents can be programmatically read or edited later. A\n document can contain multiple named ranges with the same name, but every\n named range has a unique ID.\n\n*Segment*\n\n: The `Body`, [`Header`](/workspace/docs/api/reference/rest/v1/documents#header),\n [`Footer`](/workspace/docs/api/reference/rest/v1/documents#footer), or\n [`Footnote`](/workspace/docs/api/reference/rest/v1/documents#footnote) containing\n structural or content *elements* . The *indexes* of the elements within a\n segment are relative to the beginning of that segment.\n\n*Suggestion*\n\n: Changes to a document without changing the original text. If the owner\n approves your suggestions, they replace the original text.\n\nRelated topics\n--------------\n\n- To learn about developing with Google Workspace APIs, including handling\n authentication and authorization, refer to [Develop on\n Google Workspace](/workspace/guides/get-started).\n\n- To get a conceptual overview of a document, see\n [Document](/workspace/docs/api/concepts/document).\n\n- To learn how to configure and run a Docs API app, try the\n [JavaScript quickstart](/workspace/docs/api/quickstart/js)."]]