Find an API

Search public APIs with auth details & Postman guides

← All APIs

Google Docs API

googleapis · Analytics

Analytics No Auth Free & Open analytics media

Reads and writes Google Docs documents.

Authentication

No authentication requiredFree to use with no key needed.

Sample Requests

GET docs.documents.get

Gets the latest version of the specified document.

https://api.apis.guru/v2/specs/googleapis.com/docs/v1/v1/documents/{documentId}?alt=json&key=YOUR_API_KEY&fields=example&$.xgafv=1&callback=example&quotaUser=example&uploadType=example&oauth_token=example&prettyPrint=true&access_token=example&upload_protocol=example&suggestionsViewMode=DEFAULT_FOR_CURRENT_ACCESS

Hover any highlighted part to learn what it does

curl -X GET "https://api.apis.guru/v2/specs/googleapis.com/docs/v1/v1/documents/{documentId}?alt=json&key=YOUR_API_KEY&fields=example&$.xgafv=1&callback=example&quotaUser=example&uploadType=example&oauth_token=example&prettyPrint=true&access_token=example&upload_protocol=example&suggestionsViewMode=DEFAULT_FOR_CURRENT_ACCESS"
import requests
params = {
    "alt": "json",
    "key": "YOUR_API_KEY",
    "fields": "example",
    "$.xgafv": "1",
    "callback": "example",
    "quotaUser": "example",
    "uploadType": "example",
    "oauth_token": "example",
    "prettyPrint": "true",
    "access_token": "example",
    "upload_protocol": "example",
    "suggestionsViewMode": "DEFAULT_FOR_CURRENT_ACCESS"
}
response = requests.get(
    "https://api.apis.guru/v2/specs/googleapis.com/docs/v1/v1/documents/{documentId}",
    params=params,
)
print(response.json())
const url = new URL('https://api.apis.guru/v2/specs/googleapis.com/docs/v1/v1/documents/{documentId}');
url.searchParams.set('alt', 'json');
url.searchParams.set('key', 'YOUR_API_KEY');
url.searchParams.set('fields', 'example');
url.searchParams.set('$.xgafv', '1');
url.searchParams.set('callback', 'example');
url.searchParams.set('quotaUser', 'example');
url.searchParams.set('uploadType', 'example');
url.searchParams.set('oauth_token', 'example');
url.searchParams.set('prettyPrint', 'true');
url.searchParams.set('access_token', 'example');
url.searchParams.set('upload_protocol', 'example');
url.searchParams.set('suggestionsViewMode', 'DEFAULT_FOR_CURRENT_ACCESS');

const response = await fetch(url); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/googleapis.com/docs/v1/v1/documents/{documentId}")
	q := baseURL.Query()
	q.Set("alt", "json")
	q.Set("key", "YOUR_API_KEY")
	q.Set("fields", "example")
	q.Set("$.xgafv", "1")
	q.Set("callback", "example")
	q.Set("quotaUser", "example")
	q.Set("uploadType", "example")
	q.Set("oauth_token", "example")
	q.Set("prettyPrint", "true")
	q.Set("access_token", "example")
	q.Set("upload_protocol", "example")
	q.Set("suggestionsViewMode", "DEFAULT_FOR_CURRENT_ACCESS")
	baseURL.RawQuery = q.Encode()
	targetURL := baseURL.String()
	req, _ := http.NewRequest("GET", targetURL, nil)

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://api.apis.guru/v2/specs/googleapis.com/docs/v1/v1/documents/{documentId}")
uri.query = URI.encode_www_form({
  "alt" => "json",
  "key" => "YOUR_API_KEY",
  "fields" => "example",
  "$.xgafv" => "1",
  "callback" => "example",
  "quotaUser" => "example",
  "uploadType" => "example",
  "oauth_token" => "example",
  "prettyPrint" => "true",
  "access_token" => "example",
  "upload_protocol" => "example",
  "suggestionsViewMode" => "DEFAULT_FOR_CURRENT_ACCESS"
})

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://api.apis.guru/v2/specs/googleapis.com/docs/v1/v1/documents/{documentId}?" . http_build_query([
    "alt" => "json",
    "key" => "YOUR_API_KEY",
    "fields" => "example",
    "$.xgafv" => "1",
    "callback" => "example",
    "quotaUser" => "example",
    "uploadType" => "example",
    "oauth_token" => "example",
    "prettyPrint" => "true",
    "access_token" => "example",
    "upload_protocol" => "example",
    "suggestionsViewMode" => "DEFAULT_FOR_CURRENT_ACCESS"
]);
$opts = ["http" => [
    "method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));
POST docs.documents.create

Creates a blank document using the title given in the request. Other fields in the request, including any provided content, are ignored. Returns the created document.

https://api.apis.guru/v2/specs/googleapis.com/docs/v1/v1/documents?alt=json&key=YOUR_API_KEY&fields=example&$.xgafv=1&callback=example&quotaUser=example&uploadType=example&oauth_token=example&prettyPrint=true&access_token=example&upload_protocol=example

Hover any highlighted part to learn what it does

curl -X POST "https://api.apis.guru/v2/specs/googleapis.com/docs/v1/v1/documents?alt=json&key=YOUR_API_KEY&fields=example&$.xgafv=1&callback=example&quotaUser=example&uploadType=example&oauth_token=example&prettyPrint=true&access_token=example&upload_protocol=example"
import requests
params = {
    "alt": "json",
    "key": "YOUR_API_KEY",
    "fields": "example",
    "$.xgafv": "1",
    "callback": "example",
    "quotaUser": "example",
    "uploadType": "example",
    "oauth_token": "example",
    "prettyPrint": "true",
    "access_token": "example",
    "upload_protocol": "example"
}
response = requests.post(
    "https://api.apis.guru/v2/specs/googleapis.com/docs/v1/v1/documents",
    params=params,
)
print(response.json())
const url = new URL('https://api.apis.guru/v2/specs/googleapis.com/docs/v1/v1/documents');
url.searchParams.set('alt', 'json');
url.searchParams.set('key', 'YOUR_API_KEY');
url.searchParams.set('fields', 'example');
url.searchParams.set('$.xgafv', '1');
url.searchParams.set('callback', 'example');
url.searchParams.set('quotaUser', 'example');
url.searchParams.set('uploadType', 'example');
url.searchParams.set('oauth_token', 'example');
url.searchParams.set('prettyPrint', 'true');
url.searchParams.set('access_token', 'example');
url.searchParams.set('upload_protocol', 'example');

const response = await fetch(url, {
  method: 'POST',
}); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/googleapis.com/docs/v1/v1/documents")
	q := baseURL.Query()
	q.Set("alt", "json")
	q.Set("key", "YOUR_API_KEY")
	q.Set("fields", "example")
	q.Set("$.xgafv", "1")
	q.Set("callback", "example")
	q.Set("quotaUser", "example")
	q.Set("uploadType", "example")
	q.Set("oauth_token", "example")
	q.Set("prettyPrint", "true")
	q.Set("access_token", "example")
	q.Set("upload_protocol", "example")
	baseURL.RawQuery = q.Encode()
	targetURL := baseURL.String()
	req, _ := http.NewRequest("POST", targetURL, nil)

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://api.apis.guru/v2/specs/googleapis.com/docs/v1/v1/documents")
uri.query = URI.encode_www_form({
  "alt" => "json",
  "key" => "YOUR_API_KEY",
  "fields" => "example",
  "$.xgafv" => "1",
  "callback" => "example",
  "quotaUser" => "example",
  "uploadType" => "example",
  "oauth_token" => "example",
  "prettyPrint" => "true",
  "access_token" => "example",
  "upload_protocol" => "example"
})

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Post.new(uri)

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://api.apis.guru/v2/specs/googleapis.com/docs/v1/v1/documents?" . http_build_query([
    "alt" => "json",
    "key" => "YOUR_API_KEY",
    "fields" => "example",
    "$.xgafv" => "1",
    "callback" => "example",
    "quotaUser" => "example",
    "uploadType" => "example",
    "oauth_token" => "example",
    "prettyPrint" => "true",
    "access_token" => "example",
    "upload_protocol" => "example"
]);
$opts = ["http" => [
    "method" => "POST",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));
POST docs.documents.batchUpdate

Applies one or more updates to the document. Each request is validated before being applied. If any request is not valid, then the entire request will fail and nothing will be applied. Some requests have replies to give you some information about how they are applied. Other requests do not need to r

https://api.apis.guru/v2/specs/googleapis.com/docs/v1/v1/documents/{documentId}:batchUpdate?alt=json&key=YOUR_API_KEY&fields=example&$.xgafv=1&callback=example&quotaUser=example&uploadType=example&oauth_token=example&prettyPrint=true&access_token=example&upload_protocol=example

Hover any highlighted part to learn what it does

curl -X POST "https://api.apis.guru/v2/specs/googleapis.com/docs/v1/v1/documents/{documentId}:batchUpdate?alt=json&key=YOUR_API_KEY&fields=example&$.xgafv=1&callback=example&quotaUser=example&uploadType=example&oauth_token=example&prettyPrint=true&access_token=example&upload_protocol=example"
import requests
params = {
    "alt": "json",
    "key": "YOUR_API_KEY",
    "fields": "example",
    "$.xgafv": "1",
    "callback": "example",
    "quotaUser": "example",
    "uploadType": "example",
    "oauth_token": "example",
    "prettyPrint": "true",
    "access_token": "example",
    "upload_protocol": "example"
}
response = requests.post(
    "https://api.apis.guru/v2/specs/googleapis.com/docs/v1/v1/documents/{documentId}:batchUpdate",
    params=params,
)
print(response.json())
const url = new URL('https://api.apis.guru/v2/specs/googleapis.com/docs/v1/v1/documents/{documentId}:batchUpdate');
url.searchParams.set('alt', 'json');
url.searchParams.set('key', 'YOUR_API_KEY');
url.searchParams.set('fields', 'example');
url.searchParams.set('$.xgafv', '1');
url.searchParams.set('callback', 'example');
url.searchParams.set('quotaUser', 'example');
url.searchParams.set('uploadType', 'example');
url.searchParams.set('oauth_token', 'example');
url.searchParams.set('prettyPrint', 'true');
url.searchParams.set('access_token', 'example');
url.searchParams.set('upload_protocol', 'example');

const response = await fetch(url, {
  method: 'POST',
}); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/googleapis.com/docs/v1/v1/documents/{documentId}:batchUpdate")
	q := baseURL.Query()
	q.Set("alt", "json")
	q.Set("key", "YOUR_API_KEY")
	q.Set("fields", "example")
	q.Set("$.xgafv", "1")
	q.Set("callback", "example")
	q.Set("quotaUser", "example")
	q.Set("uploadType", "example")
	q.Set("oauth_token", "example")
	q.Set("prettyPrint", "true")
	q.Set("access_token", "example")
	q.Set("upload_protocol", "example")
	baseURL.RawQuery = q.Encode()
	targetURL := baseURL.String()
	req, _ := http.NewRequest("POST", targetURL, nil)

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://api.apis.guru/v2/specs/googleapis.com/docs/v1/v1/documents/{documentId}:batchUpdate")
uri.query = URI.encode_www_form({
  "alt" => "json",
  "key" => "YOUR_API_KEY",
  "fields" => "example",
  "$.xgafv" => "1",
  "callback" => "example",
  "quotaUser" => "example",
  "uploadType" => "example",
  "oauth_token" => "example",
  "prettyPrint" => "true",
  "access_token" => "example",
  "upload_protocol" => "example"
})

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Post.new(uri)

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://api.apis.guru/v2/specs/googleapis.com/docs/v1/v1/documents/{documentId}:batchUpdate?" . http_build_query([
    "alt" => "json",
    "key" => "YOUR_API_KEY",
    "fields" => "example",
    "$.xgafv" => "1",
    "callback" => "example",
    "quotaUser" => "example",
    "uploadType" => "example",
    "oauth_token" => "example",
    "prettyPrint" => "true",
    "access_token" => "example",
    "upload_protocol" => "example"
]);
$opts = ["http" => [
    "method" => "POST",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));

Postman Setup Guide

Get Postman ↗
  1. See official documentation for authentication and setup.

What can you build with Google Docs API?

Google Docs API is a Analytics API. Developers commonly use analytics APIs for:

  • tracking product usage and user behaviour
  • building custom reporting and BI dashboards
  • measuring marketing and campaign performance
  • running funnel, retention, and cohort analysis
  • aggregating metrics from multiple data sources

No authentication required. This API is open — no signup or key needed. Ideal for quick prototypes and public-facing features. Google Docs API is free to use, making it a low-risk choice to experiment with.

New to APIs? Read our beginner's guide

Open documentation ↗