Developer API Reference

Integrate high-quality fake data generation into your development pipeline. Our API is designed for privacy, ease of use, and maximum flexibility for developers and QA teams.

Use the guide below to get started. For advanced topics, see code samples and integration tips at the end of this page.

Overview

SafeTestData.com offers a simple, REST-style API that allows you to generate realistic fake data (names, emails, addresses, company info, and more) for development, testing, and anonymization workflows. The API is designed for seamless integration into CI pipelines, automation scripts, and custom applications.

  • All API endpoints are stateless and require no prior registration.
  • Data is generated on-the-fly and never stored or logged on our servers.
  • Responses are fast, lightweight, and available in JSON (default) or CSV.
  • Use cases: populating test databases, QA automation, privacy-compliant demos, and more.

API Endpoints

Base URL https://safetestdata.com/api/ (On staging: use https://SafeTestData.com/api/)
1. Generate Fake Data GET /api/generate/

Generates a list of fake records based on the requested type and quantity.

Query Parameters:
  • type (required)Type of data: person, address, company, or mixed.
  • count (optional, default: 5)Number of records (3-100, max 100 per request).
  • format (optional, default: json)Response format: json or csv.
Example Request:
GET https://SafeTestData.com/api/generate/?type=person&count=10&format=json
2. Data Types
  • person: Name, Email
  • address: Address, City, State, ZIP
  • company: Company, Contact, Email, Phone
  • mixed: Name, Email, Address, City, State
3. Response Formats
  • JSON (default): Array of objects, each representing a record.
  • CSV: Header row, then data rows (suitable for spreadsheet import).
4. Example Responses
For type=person, format=json:
[
  { "Name": "Olivia Smith", "Email": "olivia.smith17@example.com" },
  { "Name": "Liam Johnson", "Email": "liam.johnson22@testmail.org" }
]
For type=address, format=csv:
Address,City,State,ZIP
1277 Parkview Dr,Seattle,WA,27054
4378 Sunset Road,Boston,MA,77831
...
5. Notes and Best Practices
  • All endpoints are GET only for data generation (no authentication required, no POST or PUT).
  • Limit requests to 100 records per call to avoid rate limiting.
  • For bulk or automated generation, stagger requests to avoid temporary throttling.
  • Data is randomized per request and not persistent. For repeatable results, consider generating once and saving locally.
  • Never use generated data in production environments with real users or for regulated personal data.

Authentication & Security

  • No API key is required for public data generation endpoints.
  • All requests must be made over HTTPS. Requests over HTTP will be redirected or denied.
  • Data is generated in-memory and never stored or logged by SafeTestData.com.
  • Usage is monitored for abuse and automated scraping. Please respect fair use.

Integration Examples

cURL (shell):
curl "https://SafeTestData.com/api/generate/?type=company&count=7&format=json"
Node.js (fetch):
fetch('https://SafeTestData.com/api/generate/?type=address&count=10')
  .then(res => res.json())
  .then(data => console.log(data));
Python (requests):
import requests
url = 'https://SafeTestData.com/api/generate/?type=mixed&count=5&format=json'
resp = requests.get(url)
print(resp.json())
PHP (file_get_contents):

Frequently Asked API Questions

Yes, you may use the API in commercial projects for test data needs, provided generated data is not resold, republished, or used to misrepresent real users. Always comply with privacy guidelines.

No authentication is required for standard fake data generation endpoints. If authentication becomes required for additional features, details will be published here.

All data is generated on-demand and is not based on real individuals or organizations. We do not store, log, or track any generated data. Please review our privacy policy for detailed information.

Reasonable use is encouraged. If excessive, abusive, or automated scraping is detected, temporary rate limits may apply. For high-volume or enterprise needs, contact us at hello@safetestdata.com.
Ready to generate real test data?
Try the Full Fake Data Generator →