Stay organized with collections Save and categorize content based on your preferences.
This section presents a set of Docs API sample applications and utilities that demonstrate how to translate an intended Google Docs action into an API request.
Output document contents as JSON with Docs API: Outputs a JSON dump of the complete contents of a document. This can help you understand the structure of Docs files or troubleshoot issues.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-04 UTC."],[],[],null,["# Google Docs API samples\n\nThis section presents a set of Docs API sample applications and\nutilities that demonstrate how to translate an intended Google Docs action\ninto an API request.\n\n- [Output document contents as JSON with\n Docs API](/workspace/docs/api/samples/output-json): Outputs a JSON dump of\n the complete contents of a document. This can help you understand the\n structure of Docs files or troubleshoot issues.\n\n- [Extract the text from a document with\n Docs API](/workspace/docs/api/samples/extract-text): Extracts only the text\n from a document. This is especially useful for passing the text to another\n service.\n\n- [Mail merge with Docs API](/workspace/docs/api/samples/mail-merge): Mail\n merge documents from a template with data from Google Sheets or plain\n text.\n\nCodelab\n-------\n\n[Create a transcript of your business meetings using Google Docs \\& Machine\nLearning](https://codelabs.developers.google.com/codelabs/docs-ml-transcript#0):\nIn this codelab, you'll learn how to send an audio file through the [Google Cloud Speech-to-Text API](https://cloud.google.com/speech-to-text/),\nthen output the transcript to a Google document. The Speech-to-Text API is\neasy-to-use and applies a powerful neural network to enable developers to\nconvert audio to text. Plus, it's powered by Machine Learning."]]