Google Docs API samples
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.
Codelab
Create a transcript of your business meetings using Google Docs & Machine
Learning:
In this codelab, you'll learn how to send an audio file through the
Google Cloud Speech-to-Text API,
then output the transcript to a Google document. The Speech-to-Text API is
easy-to-use and applies a powerful neural network to enable developers to
convert audio to text. Plus, it's powered by Machine Learning.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-28 UTC.
[null,null,["Last updated 2025-08-28 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."]]