Overview
Metaphorsum is a synthetic data generation platform aimed at developers and technical teams. It provides programmatic and visual tools to create realistic, yet fictional, datasets for a range of use cases, including API mocking, database population, and user interface prototyping. The platform's core offering includes a RESTful API, a command-line interface (CLI), and a web-based user interface, allowing for flexible integration into existing development workflows.
Developers primarily use Metaphorsum to address challenges associated with real data. For instance, when building a new frontend application, developers can use Metaphorsum to generate a mock API that returns structured, diverse data, enabling UI development to proceed independently of backend readiness. This approach helps prevent delays and facilitates parallel development efforts. The data generated can simulate various formats, such as JSON for REST APIs or CSV for database imports, supporting diverse application needs.
Beyond frontend development, Metaphorsum supports backend testing by generating large volumes of synthetic data for load testing scenarios. Synthetic data can mimic production data characteristics, including data types, relationships, and distributions, without exposing sensitive information. This is particularly relevant for compliance requirements like GDPR, where using real customer data in non-production environments carries significant risks. The platform's ability to create custom schemas allows users to define the structure and types of data fields, ensuring the generated data aligns with specific application models.
The Metaphorsum API provides endpoints for defining data schemas, generating data based on those schemas, and managing datasets. Its design emphasizes ease of integration, offering clear documentation and code examples in popular programming languages like Python and JavaScript. This focus on developer experience simplifies the process of integrating synthetic data generation into CI/CD pipelines or automated testing frameworks, allowing teams to maintain consistent, high-quality test data across the software development lifecycle. For a deeper understanding of API mocking principles, resources like the Martin Fowler article on Mocks Aren't Stubs provide foundational context on the role of mocks in testing.
Metaphorsum is particularly effective for teams that require evolving datasets for continuous integration and automated testing. Instead of manually creating test data or anonymizing production data, which can be time-consuming and error-prone, Metaphorsum automates the process. This ensures that test environments are always populated with relevant and diverse data, improving test coverage and reliability. The platform's web UI further simplifies schema creation and data preview, making it accessible to team members who may not prefer command-line tools.
Key features
- Synthetic Data Generation: Create structured, realistic data based on user-defined schemas, including various data types like names, addresses, emails, numbers, and dates. This supports diverse testing scenarios and application requirements.
- API Mocking: Define and serve mock API endpoints that return synthetic data, enabling frontend and mobile development to proceed without a live backend. This accelerates parallel development efforts.
- Custom Schema Definition: Users can define complex data schemas with nested objects, arrays, and relationships between fields, ensuring generated data matches specific application models.
- Data Localization: Generate localized data for different regions and languages, supporting internationalization testing and development.
- Data Masking and Anonymization: Produce data that mimics real-world patterns while ensuring privacy and compliance, suitable for scenarios requiring GDPR adherence.
- Command Line Interface (CLI): Automate data generation tasks and integrate Metaphorsum into scripting and CI/CD pipelines, enhancing development automation.
- RESTful API: Programmatically access all Metaphorsum functionalities for seamless integration into applications, testing frameworks, and other developer tools. Explore the Metaphorsum API reference documentation for detailed endpoint information.
- Web User Interface: Visually design data schemas, preview generated data, and manage projects through an intuitive web application, making it accessible for non-technical users as well.
Pricing
Metaphorsum offers a tiered pricing model, including a free Starter plan and scalable paid options. Pricing scales primarily based on the number of API calls per month.
| Plan Name | Monthly Cost (as of 2026-05-28) | API Calls/Month | Key Features |
|---|---|---|---|
| Starter | Free | 500 | Basic data generation, web UI access, 1 project |
| Developer | $29 | 5,000 | All Starter features, increased API calls, 5 projects, CLI access |
| Team | $99 | 25,000 | All Developer features, higher API limits, unlimited projects, priority support |
| Enterprise | Custom | Custom | All Team features, dedicated infrastructure, advanced security, custom compliance |
For the most current pricing details and additional plan specifics, refer to the official Metaphorsum pricing page.
Common integrations
Metaphorsum is designed to integrate into various development and testing environments:
- Testing Frameworks: Use Metaphorsum with popular testing frameworks like Jest, Pytest, or Cypress to generate test data on demand for unit, integration, and end-to-end tests.
- CI/CD Pipelines: Integrate the Metaphorsum CLI into Continuous Integration/Continuous Deployment pipelines (e.g., Jenkins, GitLab CI, GitHub Actions) to automate the provisioning of test data for builds and deployments.
- Frontend Frameworks: Mock API responses for React, Angular, Vue.js, and other frontend applications during development, allowing frontend teams to build UIs independently.
- Database Tools: Generate large datasets to populate development and staging databases for performance testing, schema validation, and data migration tests.
- Cloud Platforms: Deploy Metaphorsum workers or integrate its API into serverless functions on platforms like AWS Lambda or Google Cloud Functions for on-demand data generation.
Alternatives
- Faker.js: A popular JavaScript library for generating realistic fake data in the browser and Node.js environments.
- Mockaroo: A web-based service that generates realistic test data in various formats, often used for database population and API prototyping.
- Mostly AI: An enterprise-grade synthetic data generation platform focused on AI-powered data anonymization and high-fidelity synthetic datasets.
Getting started
To begin generating synthetic data with Metaphorsum, you can use one of the available SDKs. The following Python example demonstrates how to generate a simple dataset using the Metaphorsum Python SDK:
import os
from metaphorsum import MetaphorsumClient
# Replace with your actual API key from Metaphorsum dashboard
api_key = os.environ.get("METAPHORSUM_API_KEY", "YOUR_METAPHORSUM_API_KEY")
client = MetaphorsumClient(api_key=api_key)
def generate_user_data():
schema_definition = {
"name": "string.fullName",
"email": "internet.email",
"age": "number.int(min=18, max=65)",
"city": "address.city"
}
try:
# Generate 5 records based on the schema
data = client.generate_data(schema=schema_definition, count=5)
print("Generated Data:")
for record in data:
print(record)
except Exception as e:
print(f"Error generating data: {e}")
if __name__ == "__main__":
generate_user_data()
This Python code snippet initializes the Metaphorsum client with an API key and then defines a simple schema for user data, including full names, email addresses, ages, and cities. It then calls the generate_data method to create five records based on this schema and prints them to the console. For detailed installation instructions for the Python SDK and other language-specific examples, consult the Metaphorsum getting started guide.
Similarly, for JavaScript environments, you can use the Metaphorsum JavaScript SDK:
import MetaphorsumClient from '@metaphorsum/sdk';
// Replace with your actual API key
const apiKey = process.env.METAPHORSUM_API_KEY || 'YOUR_METAPHORSUM_API_KEY';
const client = new MetaphorsumClient(apiKey);
async function generateUserData() {
const schemaDefinition = {
name: 'string.fullName',
email: 'internet.email',
age: 'number.int(18, 65)',
country: 'address.country',
};
try {
const data = await client.generateData({
schema: schemaDefinition,
count: 3,
});
console.log('Generated Data:');
data.forEach(record => console.log(record));
} catch (error) {
console.error('Error generating data:', error);
}
}
generateUserData();
This JavaScript example performs a similar function, defining a user schema and generating three records. Both examples demonstrate the straightforward approach to integrating Metaphorsum into development projects for quick and efficient synthetic data provisioning. The Metaphorsum JavaScript SDK documentation offers more examples and configuration options.