Google Docs to Forms - Formswrite.com logo
BlogPricing

Formswrite API: Convert Google Docs to Google Forms Programmatically

Formswrite Team

February 15, 2026

Formswrite API: Convert Google Docs to Google Forms Programmatically

Formswrite API: Convert Google Docs to Google Forms Programmatically

If you've ever needed to automate the creation of Google Forms from existing documents, you know how painful it is. Google's own Forms API requires you to build every question, option, and validation rule by hand. With the Formswrite API, you can convert a Google Doc into a fully structured Google Form with a single API call.

What Is the Formswrite API?

Formswrite provides a REST API that takes any Google Docs document and converts it into Google Forms, Moodle quizzes, Canvas QTI packages, Kahoot imports, and 20+ other formats — all programmatically.
Instead of manually building forms question by question, you write your quiz or form in a Google Doc and let the API do the rest. The AI engine extracts questions, answer choices, correct answers, and grading automatically.

Why Use the Formswrite API Instead of Google Forms API?

FeatureGoogle Forms APIFormswrite API
Input formatJSON (build each question manually)Google Doc (natural language)
AI question extractionNoYes
Auto-detect question typesNoYes
Auto-grading supportManual setupAuto-detected from document
Multiple output formatsGoogle Forms only25+ formats
Lines of code needed100+ per form5-10 lines total

Getting Started

Step 1: Get Your API Token

Sign in to Formswrite, go to your account settings, and generate an API token. This token is valid for 365 days and authenticates all your API requests.

Step 2: Prepare Your Google Doc

Write your form or quiz in a Google Doc. The AI will automatically detect:
  • Multiple choice questions
  • Checkbox (select all that apply) questions
  • Short answer and paragraph responses
  • True/False questions
  • Linear scale (Likert) questions
  • Dropdown selections
  • Correct answers and point values (if marked in your document)

Step 3: Make the API Call

bashcurl -X POST https://api.formswrite.com/api/v1/convert \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "documentId": "YOUR_GOOGLE_DOC_ID",
    "format": "google_form",
    "documentName": "My Weekly Quiz"
  }'

Step 4: Get Your Google Form

The API returns a response with your newly created Google Form:
json{
  "success": true,
  "exportId": "abc-123",
  "downloadUrl": "https://api.formswrite.com/api/forms/exports/abc-123",
  "fileName": "My Weekly Quiz",
  "format": "google_form"
}
That's it. Your Google Doc is now a live Google Form, complete with questions, answer options, and grading.

Code Examples

Python

pythonimport requests

API_TOKEN = "your_api_token_here"
GOOGLE_DOC_ID = "1abc123xyz"

response = requests.post(
    "https://api.formswrite.com/api/v1/convert",
    headers={
        "Authorization": f"Bearer {API_TOKEN}",
        "Content-Type": "application/json"
    },
    json={
        "documentId": GOOGLE_DOC_ID,
        "format": "google_form",
        "documentName": "Biology Quiz Chapter 5"
    }
)

result = response.json()
print(f"Form created: {result['downloadUrl']}")

Node.js

javascriptconst response = await fetch('https://api.formswrite.com/api/v1/convert', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${API_TOKEN}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    documentId: '1abc123xyz',
    format: 'google_form',
    documentName: 'Biology Quiz Chapter 5'
  })
});

const result = await response.json();
console.log('Form created:', result.downloadUrl);

Async Mode for Large Documents

For large documents, use async mode to avoid timeouts:
bashcurl -X POST https://api.formswrite.com/api/v1/convert \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "documentId": "YOUR_GOOGLE_DOC_ID",
    "format": "google_form",
    "async": true
  }'
The API returns a jobId immediately. Poll for the result:
bashcurl https://api.formswrite.com/api/v1/convert/status/JOB_ID \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Use Cases

  • Teachers automating weekly quiz creation from lesson plans
  • Training departments converting HR documents into feedback forms
  • EdTech platforms integrating form generation into their workflow
  • Schools batch-converting exam documents for Google Classroom
  • Developers building automation pipelines with Zapier or Make

Supported Output Formats

While this guide focuses on Google Forms, the same API endpoint supports 25+ output formats:
Google Forms, Moodle XML, Canvas QTI, Blackboard, Brightspace, Schoology, Sakai, Kahoot, Quizizz, Blooket, Gimkit, Socrative, Wooclap, Quizalize, ClassMarker, Pear Assessment, QTI 2.1, QTI 2.2, GIFT, Aiken, Cloze, Microsoft Word, LearnDash, H5P, and more.
Just change the format parameter in your API call.

FAQ

How much does the Formswrite API cost?

The API is included with any Formswrite subscription plan. Visit the pricing page for current plans.

What document formats can I use as input?

Currently, the API accepts Google Docs as input. You can pass either a document ID or a full Google Docs URL.

Does the API support grading and answer keys?

Yes. If your Google Doc includes correct answers (marked with asterisks, bold, or other formatting), the AI will automatically detect them and set up grading in the output.

Can I use this with Zapier or Make?

Absolutely. The API uses standard REST conventions with JWT authentication, making it easy to integrate with Zapier, Make (Integromat), n8n, or any automation platform.

Is there a rate limit?

The API uses your subscription's conversion credits. There is no separate rate limit beyond your plan's allocation.

How long does conversion take?

Most documents convert in under 60 seconds. For very large documents (50+ pages), use async mode and poll for the result.

Get Started

Ready to automate Google Forms creation? Sign up for Formswrite and start converting documents to forms with a single API call.

Share this post with your network


Formswrite - Google Docs to Forms Converter

Create forms in seconds, not hours

Convert Google Docs to Forms with one click

Save hours on quiz creation every month.

No more manual form creation. No more formatting hassles.

We care about your data in our privacy policy

© 2026 Formswrite. All Rights Reserved.