Everything you need to integrate the SA Fake Data API
Get up and running in three simple steps.
Include your key in the request header and start generating data.
curl /api/v1/person \ -H "x-api-key: safk_..."
All API requests require authentication. Pass your API key using either of the two supported methods below.
curl https://safakedata.dev/api/v1/person \ -H "x-api-key: safk_your_key_here"
curl https://safakedata.dev/api/v1/person \ -H "Authorization: Bearer safk_your_key_here"
All endpoints return JSON and accept optional query parameters.
/api/v1/personGenerate person data including name, SA ID number, phone, email, and address.
/api/v1/idGenerate valid SA ID numbers with correct Luhn check digits.
/api/v1/addressGenerate SA addresses across all 9 provinces.
/api/v1/companyGenerate SA company data with registration and VAT numbers.
/api/v1/bankGenerate SA bank account details.
These parameters are accepted by all endpoints.
| Parameter | Type | Default | Status | Description |
|---|---|---|---|---|
| count | integer | 1 | optional | Number of records to generate (1–100) |
| seed | integer | random | optional | Pass any integer to get identical results every time. Same seed = same data. |
The seed parameter makes your API responses deterministic. When you pass the same seed value, the API returns identical data every time — same names, same ID numbers, same addresses. This is useful for:
# Run this twice — you'll get identical results
curl /api/v1/person?seed=42 -H "x-api-key: safk_..."
# → { "firstName": "Sipho", "lastName": "Dlamini", ... }
# Same seed, same data — every time
curl /api/v1/person?seed=42 -H "x-api-key: safk_..."
# → { "firstName": "Sipho", "lastName": "Dlamini", ... }
# Different seed = different data
curl /api/v1/person?seed=99 -H "x-api-key: safk_..."
# → { "firstName": "Lerato", "lastName": "Mokoena", ... }Omit the seed parameter to get random data on every request.
Strict mode:Unknown or unsupported query parameters will return a 400 error. Only pass the parameters listed above.
Rate limits are enforced on a monthly basis. Headers are included in every response.
| Plan | Monthly Limit | Overage |
|---|---|---|
| Free | 1,000 requests | 429 until reset |
| Premium | 10,000 requests | 429 until reset |
X-RateLimit-LimitYour monthly request allowanceX-RateLimit-RemainingRequests remaining in the current periodX-RateLimit-ResetUTC timestamp when the rate limit resetsErrors follow a consistent format across all endpoints. Every error response includes a structured body and a unique request ID for debugging.
{
"error": {
"type": "authentication_error",
"code": 401,
"message": "Invalid or missing API key."
},
"meta": {
"request_id": "req_abc123def456"
}
}| Type | Code | Description |
|---|---|---|
| authentication_error | 401 | Missing or invalid API key |
| invalid_request_error | 400 | Malformed request or unknown query parameters |
| rate_limit_error | 429 | Monthly request quota exceeded |