A CLI tool to extract Typeform form content and logic into a usable text format.
Designing conditional forms is hard and no dedicated prototyping tools exist. Typeform is a great form designer, but you can't easily extract the definition and use it in your development workflow.
This script allows you to prototype and test your form using Typeform — create inputs, logic jumps, validation and more — then export the definition to JSON for use in your web or mobile app development workflow.
Extracts ALL available question data from Typeform forms, including:
- High-level form configuration
- Question titles and descriptions
- Input types (multiple choice, short text, email, etc.)
- Answer options and validation configuration
- Logic jumps and conditional branching
Important
This tool extracts form structure and logic, NOT user submission data or styling/customization data.
- Simple single-file Node.js implementation
- Clean command line interface, with helpful flags
- Progress messages
- Robust error handling and helpful error messages
- Raw JSON output saved to timestamped folders
- Works with public forms (no 'Personal Access Token' needed)
- Optional API token support for private forms, configurable via
.envfile
- Node.js 14.0.0 or higher
git clone https://github.com/renderghost/typeform-logic-extractor.git
cd typeform-logic-extractornpm installImportant
Public forms work without using a 'Personal Access Token' token!
You only need .env when working with private forms
cp .env.example .env- Log in to your Typeform account
- Go to Account Settings → Personal tokens
- Or visit: https://admin.typeform.com/user/tokens
- Click "Generate a new token"
- Copy the token and add it to your
.envfile
TYPEFORM_API_TOKEN=your_token_hereNote
Typeform URL pattern:
https://mysite.typeform.com/to/abc123
node typeform-extractor.js --url https://mysite.typeform.com/to/abc123# Custom output directory
node typeform-extractor.js --url https://yoursite.typeform.com/to/abc123 --output ./my-forms
# Verbose mode with detailed progress
node typeform-extractor.js --url https://yoursite.typeform.com/to/abc123 --verbose
# Compact JSON format
node typeform-extractor.js --url https://yoursite.typeform.com/to/abc123 --format json| Flag | Alias | Description | Default |
|---|---|---|---|
--url |
-u |
Typeform URL (required) | - |
--output |
-o |
Output directory | ./outputs |
--format |
-f |
Output format: json or pretty |
pretty |
--verbose |
- | Show detailed progress messages | false |
--help |
-h |
Show help message | - |
--version |
-v |
Show version number | - |
⟳ Parsing Typeform URL...
✓ Form ID: abc123
⟳ Fetching form data from Typeform API...
✓ Form data retrieved successfully
ℹ Form title: Customer Feedback Survey
ℹ Total fields: 5
ℹ Logic jumps: 2
⟳ Creating output directory...
✓ Output directory: ./outputs/2025-11-26_12-30-45
⟳ Saving form definition...
✓ Saved: form-definition.json
⟳ Generating metadata...
✓ Saved: form-metadata.json
✓ Extraction complete!
ℹ Files saved to: ./outputs/2025-11-26_12-30-45The tool creates a timestamped subfolder in your output directory and saves two files:
Contains the complete raw response from the Typeform API, including:
- Form ID, title, and settings
- All fields (questions) with their configurations
- Logic jumps and conditional branching rules
- Variables and hidden fields
- Theme and workspace information
Contains extraction metadata:
- Extraction timestamp
- Form ID and source URL
- Form title
- Total number of fields
- Logic jump information
- List of field types used
- Package manager support (Homebrew, npm global install)
- Additional output formats (CSV, Markdown)
This tool uses the Typeform Create API to retrieve form definitions.
[!NOTE] Endpoint
GET https://api.typeform.com/forms/{form_id}
Contributions are welcome! Please feel free to submit a Pull Request.