Fun Share: Google Form Viewer

i found an open source (free) API that can read Google Form content!

Consider this sample google form. it includes all the types of questions you can build with google forms.

the form is partially reproduced below:

the API is really simple to use. in order to read the form above, type the following in a browser:

if you look closely the string following the site is the file id of the form (string between “…/forms/d/e/” and “/viewform?formkey” in the google form url above).

during the first iteration through the webapi block, i wasn’t getting any data - i suspected a CORS (cross origin) issue so i used a CORS Proxy - a work around for dealing with this (see this link) and it worked!

it’s straight forward from there the screen below shows the form title, description and all the questions included in that form. (Note that this app only reads the form’s content - NOT the responses).

this next screen shows more details about the question selected (red arrow above)

here’s the main logic

and here’s the project link for remix:

to learn more about this API, i encourage you to visit the github page

you can read further on how to update the form (ie. add a new response) by using the same API.