Integrate structural ID number validation into your applications with our simple REST API. Check format, date, and Luhn checksum, and decode the date of birth, age, gender, and citizenship from the number itself.
Get started with the SA ID Checker API in minutes. Here's a simple example to validate an ID number:
curl -X POST https://www.saidchecker.co.za/api/validate \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"idNumber": "8501015009086"}'Response:
{
"success": true,
"data": {
"isValid": true,
"idNumber": "8501015009086",
"errors": [],
"details": {
"dateOfBirth": "15 January 1985",
"age": 40,
"gender": "Male",
"citizenship": "SA Citizen"
}
}
}All API requests require authentication using an API key. Include your key in the X-API-Key header:
Keep your API key secret! Never expose it in client-side code or public repositories.
/api/validateValidates the structure of a single South African ID number — its format, date, and Luhn checksum — and returns the date of birth, age, gender, and citizenship decoded from the number itself. It does not check the number against Home Affairs or verify a person's real-world identity.
| Parameter | Type | Required | Description |
|---|---|---|---|
| idNumber | string | Yes | 13-digit SA ID number. Dashes and whitespace are automatically stripped. |
| includeBreakdown | boolean | No | Include digit breakdown (default: false) |
{
"success": true,
"data": {
"isValid": boolean,
"idNumber": string,
"errors": string[],
"details": {
"dateOfBirth": string | null,
"age": number | null,
"gender": "Male" | "Female" | null,
"citizenship": "SA Citizen" | "Permanent Resident" | null
} | null,
"breakdown": { // Only if includeBreakdown: true
"birthDate": string,
"genderSequence": string,
"citizenship": string,
"checksum": string
} | null
}
}/api/validate/bulkValidate multiple ID numbers in a single request (up to 1000 per request).
curl -X POST https://www.saidchecker.co.za/api/validate/bulk \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"idNumbers": [
"8501015009086",
"9001015800088",
"7505115111081"
]
}'The API uses standard HTTP status codes to indicate success or failure:
| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad request (invalid parameters) |
| 401 | Unauthorized (invalid API key) |
| 429 | Rate limit exceeded |
| 500 | Server error |
API rate limits depend on your plan:
| Plan | Requests/minute | Requests/month |
|---|---|---|
| Business | 100 | Unlimited |
| Enterprise | Custom | Unlimited |
const response = await fetch('https://www.saidchecker.co.za/api/validate', {
method: 'POST',
headers: {
'X-API-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({ idNumber: '8501015009086' })
});
const data = await response.json();
console.log(data);import requests
response = requests.post(
'https://www.saidchecker.co.za/api/validate',
headers={
'X-API-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
json={'idNumber': '8501015009086'}
)
print(response.json())$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://www.saidchecker.co.za/api/validate',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'X-API-Key: YOUR_API_KEY',
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode(['idNumber' => '8501015009086'])
]);
$response = curl_exec($curl);
curl_close($curl);
print_r(json_decode($response, true));