Google Forms API: What Developers Need to Know

Quick answer: The Google Forms API is a REST API for programmatically creating forms, editing questions via batchUpdate, and reading responses from your own application or backend. It's separate from Apps Script, doesn't handle sharing or permissions (that's the Drive API), and doesn't necessarily expose every feature available in the visual Forms editor.

Most people interact with Google Forms through the web editor, but there's also a REST API behind it that developers can call directly from their own code. It's a smaller, more specialized API than something like the Sheets or Drive APIs, and understanding what it actually covers — and what it deliberately leaves to other APIs — saves a lot of trial and error if you're evaluating it for a project. This is a conceptual overview, not a code tutorial: what the API is, what it can and can't do, how it differs from Apps Script, and where it tends to show up in real products.

What the Google Forms API actually is

The Google Forms API is a REST API, part of the broader family of Google Workspace APIs alongside things like the Sheets and Drive APIs. It lets a developer's own application create a new form, add and modify questions, adjust certain form settings, and retrieve submitted responses — all by making HTTP requests, without a human ever opening forms.google.com. It's distinct from Google Apps Script, though the two aren't mutually exclusive: Apps Script code running inside Google's environment can itself call the Forms API, and some developers do exactly that when they need capabilities beyond what the built-in Apps Script Forms service offers.

What it can do

What it explicitly cannot do

Getting started, at a concept level

Setting up access follows the same general pattern as other Google APIs:

  1. Enable the Forms API for your project in Google Cloud Console.
  2. Set up OAuth 2.0 credentials so your application can request permission to act on behalf of a Google account, since form creation and editing is always tied to a specific account's Drive.
  3. Use a client library. Google provides official client libraries for several common languages — including Python, Node.js, and Java — that wrap the raw HTTP calls in a more convenient interface, so most developers don't hand-write the REST requests directly.

From there, the typical flow is: authenticate, create or open a form by ID, send batchUpdate calls to shape its questions and settings, and later call the responses endpoint to pull in submissions.

Forms API vs. Apps Script

Both let you automate Google Forms, but they're built for different situations:

Realistic use cases

The resource model: forms, items and responses

Understanding the shape of the data makes the rest of the API much easier to reason about. At a high level, the API works with three things:

The practical takeaway: store question IDs, not question titles, when you map answers into your own database. Titles are human text that editors change freely; IDs stay stable for the life of the question.

How editing actually works: create, then batchUpdate

A detail that surprises many first-time users: the create call only sets the form's title (and document title). You cannot send a full form with questions in one create request. The normal pattern is two steps:

  1. Create the form with a title and keep the returned form ID.
  2. Send one batchUpdate containing a list of requests that build everything else.

The request types you will use most often in a batchUpdate are:

RequestPurpose
updateFormInfoChange the title or description
updateSettingsChange form settings, such as turning the form into a quiz
createItemInsert a question or other item at a given index
updateItemModify an existing item (with an update mask naming the fields you are changing)
moveItemReorder an item
deleteItemRemove an item by index

Requests in a batch are applied in order, and the batch succeeds or fails as a unit, which keeps a form from ending up half-built. A few points that save debugging time:

Worked example: provisioning one form per class section

This is an illustrative design, not production code, for a school district tool that creates an identical exit-ticket form for each class section.

  1. Template in code. Keep the question list (titles, types, choices, required flags) as structured data in your app, not as a hand-built form you try to copy.
  2. Loop over sections. For each section, call create with a title like "Exit Ticket — Period 3 Biology", then send one batchUpdate with updateFormInfo (description) followed by a createItem request per question.
  3. Store the mapping. Save the section ID, form ID, responder link and each question ID in your database.
  4. Share through Drive. Use the Drive API to add the teacher as an editor of their section's form. The Forms API itself has no permission calls.
  5. Collect results. Either list responses on a schedule using a timestamp filter so you only fetch new submissions, or create a watch so your backend is notified when responses arrive.

Building the form list from data in your code, instead of copying a master form, means a question change is a one-line edit followed by a re-run, and every form stays consistent. If you only need a copy of an existing form, the Drive API's file copy is simpler — see duplicating a Google Form for the manual equivalent.

Reading responses reliably

Watches and push notifications

Watches let Google publish an event to a Google Cloud Pub/Sub topic you own when something changes. There are two kinds of event: a change to the form's structure (questions or settings), and a new response. A few practical notes:

Scopes, verification and data handling

OAuth scopes decide what your app is allowed to do, and choosing the narrowest set is good practice and makes Google's app review smoother. The Forms API has scopes for editing form structure, reading form structure only, and reading responses only; the Drive scopes cover file-level operations. Check Google's current scope list rather than copying one from an old tutorial.

Known limitations to plan around

Choosing the right tool: API, Apps Script or no-code

NeedGood fitWhy
Email a summary when one form gets a responseApps ScriptForm submit triggers, no server to run; see Apps Script for Google Forms
Send each response to a CRM or chat toolNo-code automationConnectors handle auth and retries; see Google Forms and Zapier
Create many forms from data, or forms as a product featureForms APIRuns from your own backend with OAuth on behalf of many users
Analyze responses in a spreadsheetLinked Google SheetNo code needed; Sheets formulas and charts
Draft a form quickly without codeAn app built on the APIFor example FormMaker's AI form generator, which creates a real form in your account

Common mistakes developers make

FAQ

What is the Google Forms API?

A REST API, part of Google Workspace APIs, that lets developers programmatically create forms, add or edit questions, and read responses from an external application or backend service.

Can the Google Forms API manage sharing and permissions?

No. Managing who can view, edit, or be a collaborator on a form is handled by the separate Google Drive API, not the Forms API itself.

What's the difference between the Forms API and Apps Script?

Apps Script runs inside Google's environment and is well suited to quick automations tied to a single form. The REST API is meant for external applications, backend services, or tools that need to manage many forms programmatically from outside Google's environment.

Does the Google Forms API cover every feature in the Forms editor UI?

Not always. Some newer question types or settings in the visual editor can lag behind or aren't exposed through the API, so it's worth checking Google's current documentation before relying on a specific feature being available.

Can I create a complete form with questions in a single API call?

No. The create call only sets the title. Create the form, then send one batchUpdate containing createItem requests for the questions and any settings changes; the batch is applied as a unit.

Can the Google Forms API submit responses?

No. It can list and read responses but not submit them for a respondent. To pre-fill answers that a person then submits, use a pre-filled link.

How do I get notified about new responses without polling?

Create a watch for response events that publishes to a Google Cloud Pub/Sub topic you own. Watches expire and need renewing, so keep a periodic timestamp-filtered list call as a fallback.

Related guides