To give form creators more control over who can respond, we're introducing granular controls for responders. Forms created with the API after January 31, 2026 will have an unpublished state by default. To learn more, see API changes to Google Forms.
Stay organized with collections
Save and categorize content based on your preferences.
The Google Forms API lets you retrieve form content, settings and metadata,
and the end-user form responses. This page describes how to perform these
tasks.
Before you begin
Perform the following tasks before proceeding with the tasks on this page:
Complete authorization/authentication and credentials setup in the
Early Adopter Program instructions.
Retrieve form contents and metadata
To retrieve the content, settings, and metadata of a form, call the
forms.get() method with
the form ID.
fromapiclientimportdiscoveryfromhttplib2importHttpfromoauth2clientimportclient,file,toolsSCOPES="https://www.googleapis.com/auth/forms.body.readonly"DISCOVERY_DOC="https://forms.googleapis.com/$discovery/rest?version=v1"store=file.Storage("token.json")creds=Noneifnotcredsorcreds.invalid:flow=client.flow_from_clientsecrets("client_secrets.json",SCOPES)creds=tools.run_flow(flow,store)service=discovery.build("forms","v1",http=creds.authorize(Http()),discoveryServiceUrl=DISCOVERY_DOC,static_discovery=False,)# Prints the title of the sample form:form_id="<YOUR_FORM_ID>"result=service.forms().get(formId=form_id).execute()print(result)
fromapiclientimportdiscoveryfromhttplib2importHttpfromoauth2clientimportclient,file,toolsSCOPES="https://www.googleapis.com/auth/forms.responses.readonly"DISCOVERY_DOC="https://forms.googleapis.com/$discovery/rest?version=v1"store=file.Storage("token.json")creds=Noneifnotcredsorcreds.invalid:flow=client.flow_from_clientsecrets("client_secrets.json",SCOPES)creds=tools.run_flow(flow,store)service=discovery.build("forms","v1",http=creds.authorize(Http()),discoveryServiceUrl=DISCOVERY_DOC,static_discovery=False,)# Prints the responses of your specified form:form_id="<YOUR_FORM_ID>"result=service.forms().responses().list(formId=form_id).execute()print(result)
fromapiclientimportdiscoveryfromhttplib2importHttpfromoauth2clientimportclient,file,toolsSCOPES="https://www.googleapis.com/auth/forms.responses.readonly"DISCOVERY_DOC="https://forms.googleapis.com/$discovery/rest?version=v1"store=file.Storage("token.json")creds=Noneifnotcredsorcreds.invalid:flow=client.flow_from_clientsecrets("client_secrets.json",SCOPES)creds=tools.run_flow(flow,store)service=discovery.build("forms","v1",http=creds.authorize(Http()),discoveryServiceUrl=DISCOVERY_DOC,static_discovery=False,)# Prints the specified response from your form:form_id="<YOUR_FORM_ID>"response_id="<YOUR_RESPONSE_ID>"result=(service.forms().responses().get(formId=form_id,responseId=response_id).execute())print(result)
[[["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."],[],["The Google Forms API allows retrieving form data and responses. To begin, set up authorization/authentication. To get form content, settings, and metadata, use `forms.get()` with the form ID. To retrieve all responses, use `forms.responses.list()` with the form ID. For a single response, use `forms.responses.get()` with both the form ID and specific response ID. Python and Node.js code examples are provided for each action.\n"],null,["The Google Forms API lets you retrieve form content, settings and metadata,\nand the end-user form responses. This page describes how to perform these\ntasks.\n\nBefore you begin\n\nPerform the following tasks before proceeding with the tasks on this page:\n\n- Complete authorization/authentication and credentials setup in the Early Adopter Program instructions.\n\nRetrieve form contents and metadata\n\nTo retrieve the content, settings, and metadata of a form, call the\n[`forms.get()`](/workspace/forms/api/reference/rest/v1/forms/get) method with\nthe form ID. \n\nPython \nforms/snippets/retrieve_contents.py \n[View on GitHub](https://github.com/googleworkspace/python-samples/blob/main/forms/snippets/retrieve_contents.py) \n\n```python\nfrom apiclient import discovery\nfrom httplib2 import Http\nfrom oauth2client import client, file, tools\n\nSCOPES = \"https://www.googleapis.com/auth/forms.body.readonly\"\nDISCOVERY_DOC = \"https://forms.googleapis.com/$discovery/rest?version=v1\"\n\nstore = file.Storage(\"token.json\")\ncreds = None\nif not creds or creds.invalid:\n flow = client.flow_from_clientsecrets(\"client_secrets.json\", SCOPES)\n creds = tools.run_flow(flow, store)\nservice = discovery.build(\n \"forms\",\n \"v1\",\n http=creds.authorize(Http()),\n discoveryServiceUrl=DISCOVERY_DOC,\n static_discovery=False,\n)\n\n# Prints the title of the sample form:\nform_id = \"\u003cYOUR_FORM_ID\u003e\"\nresult = service.forms().get(formId=form_id).execute()\nprint(result)\n```\n\nNode.js \nforms/snippets/get_form.js \n[View on GitHub](https://github.com/googleworkspace/node-samples/blob/main/forms/snippets/get_form.js) \n\n```javascript\n'use strict';\n\nconst path = require('path');\nconst google = require('@googleapis/forms');\nconst {authenticate} = require('@google-cloud/local-auth');\n\nconst formID = '\u003cYOUR_FORM_ID\u003e';\n\nasync function runSample(query) {\n const auth = await authenticate({\n keyfilePath: path.join(__dirname, 'credentials.json'),\n scopes: 'https://www.googleapis.com/auth/forms.body.readonly',\n });\n const forms = google.forms({\n version: 'v1',\n auth: auth,\n });\n const res = await forms.forms.get({formId: formID});\n console.log(res.data);\n return res.data;\n}\n\nif (module === require.main) {\n runSample().catch(console.error);\n}\nmodule.exports = runSample;\n```\n\nRetrieve all form responses\n\nTo retrieve all of the responses from a form, call the\n[`forms.responses.list()`](/workspace/forms/api/reference/rest/v1/forms.responses/list)\nmethod with the form ID. \n\nPython \nforms/snippets/retrieve_all_responses.py \n[View on GitHub](https://github.com/googleworkspace/python-samples/blob/main/forms/snippets/retrieve_all_responses.py) \n\n```python\nfrom apiclient import discovery\nfrom httplib2 import Http\nfrom oauth2client import client, file, tools\n\nSCOPES = \"https://www.googleapis.com/auth/forms.responses.readonly\"\nDISCOVERY_DOC = \"https://forms.googleapis.com/$discovery/rest?version=v1\"\n\nstore = file.Storage(\"token.json\")\ncreds = None\nif not creds or creds.invalid:\n flow = client.flow_from_clientsecrets(\"client_secrets.json\", SCOPES)\n creds = tools.run_flow(flow, store)\nservice = discovery.build(\n \"forms\",\n \"v1\",\n http=creds.authorize(Http()),\n discoveryServiceUrl=DISCOVERY_DOC,\n static_discovery=False,\n)\n\n# Prints the responses of your specified form:\nform_id = \"\u003cYOUR_FORM_ID\u003e\"\nresult = service.forms().responses().list(formId=form_id).execute()\nprint(result)\n```\n\nNode.js \nforms/snippets/get_all_responses.js \n[View on GitHub](https://github.com/googleworkspace/node-samples/blob/main/forms/snippets/get_all_responses.js) \n\n```javascript\n'use strict';\n\nconst path = require('path');\nconst google = require('@googleapis/forms');\nconst {authenticate} = require('@google-cloud/local-auth');\n\nconst formID = '\u003cYOUR_FORM_ID\u003e';\n\nasync function runSample(query) {\n const auth = await authenticate({\n keyfilePath: path.join(__dirname, 'credentials.json'),\n scopes: 'https://www.googleapis.com/auth/forms.responses.readonly',\n });\n const forms = google.forms({\n version: 'v1',\n auth: auth,\n });\n const res = await forms.forms.responses.list({\n formId: formID,\n });\n console.log(res.data);\n return res.data;\n}\n\nif (module === require.main) {\n runSample().catch(console.error);\n}\nmodule.exports = runSample;\n```\n\nRetrieve a single form response\n\nTo retrieve a specific response from a form, call the\n[`forms.responses.get()`](/workspace/forms/api/reference/rest/v1/forms.responses/get)\nmethod with the form ID and the response ID. \n\nPython \nforms/snippets/retrieve_single_response.py \n[View on GitHub](https://github.com/googleworkspace/python-samples/blob/main/forms/snippets/retrieve_single_response.py) \n\n```python\nfrom apiclient import discovery\nfrom httplib2 import Http\nfrom oauth2client import client, file, tools\n\nSCOPES = \"https://www.googleapis.com/auth/forms.responses.readonly\"\nDISCOVERY_DOC = \"https://forms.googleapis.com/$discovery/rest?version=v1\"\n\nstore = file.Storage(\"token.json\")\ncreds = None\nif not creds or creds.invalid:\n flow = client.flow_from_clientsecrets(\"client_secrets.json\", SCOPES)\n creds = tools.run_flow(flow, store)\nservice = discovery.build(\n \"forms\",\n \"v1\",\n http=creds.authorize(Http()),\n discoveryServiceUrl=DISCOVERY_DOC,\n static_discovery=False,\n)\n\n# Prints the specified response from your form:\nform_id = \"\u003cYOUR_FORM_ID\u003e\"\nresponse_id = \"\u003cYOUR_RESPONSE_ID\u003e\"\nresult = (\n service.forms()\n .responses()\n .get(formId=form_id, responseId=response_id)\n .execute()\n)\nprint(result)\n```\n\nNode.js \nforms/snippets/get_single_response.js \n[View on GitHub](https://github.com/googleworkspace/node-samples/blob/main/forms/snippets/get_single_response.js) \n\n```javascript\n'use strict';\n\nconst path = require('path');\nconst google = require('@googleapis/forms');\nconst {authenticate} = require('@google-cloud/local-auth');\n\nconst formID = '\u003cYOUR_FORM_ID\u003e';\nconst responseID = '\u003cYOUR_RESPONSE_ID\u003e';\n\nasync function runSample(query) {\n const auth = await authenticate({\n keyfilePath: path.join(__dirname, 'credentials.json'),\n scopes: 'https://www.googleapis.com/auth/forms.responses.readonly',\n });\n const forms = google.forms({\n version: 'v1',\n auth: auth,\n });\n const res = await forms.forms.responses.get({\n formId: formID,\n responseId: responseID,\n });\n console.log(res.data);\n return res.data;\n}\n\nif (module === require.main) {\n runSample().catch(console.error);\n}\nmodule.exports = runSample;\n```"]]