South African ID API
Validate a South African ID number and read its date of birth, age, gender and citizenship status from the number itself. Checks the format and check digit only, not Home Affairs records. ID numbers are not stored.
Utility
Free
Overview
Integrate the South African ID API into your applications with ease. This API offers high performance, reliability, and comprehensive documentation to get you started quickly.
Features
- 99.9% Uptime Guarantee
- 100 requests per hour
- JSON formatted responses
- Secure HTTPS endpoints
- Real-time data processing
Endpoints
POST
https://devapi.autoplannerx.com/api/v1/sa-id/validate
Validate a South African ID number and read its date of birth, age, gender and citizenship
Code Examples
Pick an endpoint and a language. Replace YOUR_API_KEY with a key from your dashboard.
curl -X POST "https://devapi.autoplannerx.com/api/v1/sa-id/validate" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"idNumber":"8001015009087"}'
const response = await fetch('https://devapi.autoplannerx.com/api/v1/sa-id/validate', {
method: 'POST',
headers: {
'X-API-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"idNumber": "8001015009087"
})
});
if (!response.ok) {
throw new Error(`Request failed: ${response.status}`);
}
const data = await response.json();
console.log(data);
// Node.js 18+ as an ES module (.mjs). Set DEVAPI_KEY in your environment.
const response = await fetch('https://devapi.autoplannerx.com/api/v1/sa-id/validate', {
method: 'POST',
headers: {
'X-API-Key': process.env.DEVAPI_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"idNumber": "8001015009087"
})
});
if (!response.ok) {
throw new Error(`Request failed: ${response.status}`);
}
console.log(await response.json());
<?php
$ch = curl_init('https://devapi.autoplannerx.com/api/v1/sa-id/validate');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => json_encode([
'idNumber' => '8001015009087',
]),
CURLOPT_HTTPHEADER => [
'X-API-Key: YOUR_API_KEY',
'Content-Type: application/json',
],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($status !== 200) {
die('Request failed: ' . $response);
}
$data = json_decode($response, true);
print_r($data);
import requests
response = requests.post(
"https://devapi.autoplannerx.com/api/v1/sa-id/validate",
headers={"X-API-Key": "YOUR_API_KEY"},
json={
"idNumber": "8001015009087",
},
)
response.raise_for_status()
print(response.json())
Try It
Requests go to the live gateway with your key. They count toward your rate limit and are billed like any other call. Your key is only used for this request and is never saved.