Compare REST API with Forms Service

There is some overlap in what you can do with the Google Forms API and the Forms Service on Apps Script. This guide covers similarities and differences to help you decide which is best for your project.

Supported Forms features

Both the REST API and the Forms Service on Apps Script support Forms features that the other does not. Because the exact list of supported features changes over time, please explore the rest of the documentation to find out whether a particular feature is currently supported.

However, certain features are unlikely to ever be supported, as described below.

The REST API does not plan to support:

  • Submitting form responses
  • Including detailed form or response data in the body of pub/sub notifications

The Forms Service on Apps Script does not plan to support:

  • Subscribing to form events with Cloud Pub/Sub
  • Setting correct answers for question types that are not multiple choice

Request a new REST API feature

The REST API is newer than the Forms Service on Apps Script and new features are added regularly. Please file a feature request if you would like to see a certain feature prioritized.

Event-based behavior

Both {apps_script_name_short} triggers and the forms.watches resource in the REST API provide a way to take action when a form changes.

Prefer the REST API’s forms.watches for:

  • Maximum reliability
  • Interoperability with Cloud Pub/Sub
  • Notifications when forms are edited

Prefer Apps Script triggers for:

  • Form or response data included with each notification
  • Time-based triggers

Quotas

Apps Script and the Forms API have different service limits.

Languages and environments

If you prefer to develop in JavaScript, Apps Script can save you time by automating the setup of a Cloud Console project and an OAuth consent flow. Apps Script also provides a browser-based code editor and runs your code on Google servers.

On the other hand, the REST API provides client libraries in many languages besides JavaScript, freeing you to develop in the language of your choice and not be subject to limits on runtime or simultaneous executions.

Use the REST API from Apps Script

If you prefer the Apps Script development environment but want to use Forms REST API features, you can do so using UrlFetchApp. For more information, see Set up an Apps Script project.

The Forms REST API is not yet available as an Apps Script advanced service. Please file a feature request if you would like it to be supported.

Next steps