API Reference

SA ID Validation API

Integrate ID validation into your applications with our simple REST API. Validate ID numbers, extract demographic data, and more.

Quick Start

Get started with the SA ID Checker API in minutes. Here's a simple example to validate an ID number:

cURL
curl -X POST https://www.saidchecker.co.za/api/validate \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"idNumber": "8501015009087"}'

Response:

{
  "success": true,
  "data": {
    "isValid": true,
    "idNumber": "8501015009087",
    "errors": [],
    "details": {
      "dateOfBirth": "15 January 1985",
      "age": 40,
      "gender": "Male",
      "citizenship": "SA Citizen"
    }
  }
}

Authentication

All API requests require authentication using an API key. Include your key in the X-API-Key header:

X-API-Key: YOUR_API_KEY

Keep your API key secret! Never expose it in client-side code or public repositories.

Getting an API Key

  1. Sign up for a Business plan
  2. Go to Dashboard β†’ API Keys
  3. Click "Create New Key"
  4. Copy your key (it won't be shown again)

Validate ID Number

POST/api/validate

Validates a single South African ID number and returns demographic information.

Request Body

ParameterTypeRequiredDescription
idNumberstringYes13-digit SA ID number
includeBreakdownbooleanNoInclude digit breakdown (default: false)

Response

{
  "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
  }
}

Bulk Validation

POST/api/validate/bulk

Validate 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": [
      "8501015009087",
      "9001015800086",
      "7505115111088"
    ]
  }'

Error Handling

The API uses standard HTTP status codes to indicate success or failure:

CodeMeaning
200Success
400Bad request (invalid parameters)
401Unauthorized (invalid API key)
429Rate limit exceeded
500Server error

Rate Limits

API rate limits depend on your plan:

PlanRequests/minuteRequests/month
Business100Unlimited
EnterpriseCustomUnlimited

Code Examples

JavaScript / Node.js

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: '8501015009087' })
});

const data = await response.json();
console.log(data);

Python

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': '8501015009087'}
)

print(response.json())

PHP

$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' => '8501015009087'])
]);

$response = curl_exec($curl);
curl_close($curl);

print_r(json_decode($response, true));

Ready to Integrate?

Get API access with a Business plan

Get API Access