apyhub
Back
▣ VERIFICATION KIT

Validate Egypt National ID API

What it does

The Egypt national ID API checks a 14-digit Egyptian national ID and decodes what the number contains. Send the number in value and get back valid, the cleaned-up number and the details below.

A valid ID returns the birth date, age, gender and governorate. The governorate comes in English and Arabic, for example Dakahlia and الدقهلية. Spaces, dashes and Arabic-Indic digits are cleaned up first.

The check looks at the structure of the number: 14 digits, a valid century digit, a real birth date and a known governorate code. Failed checks list codes in problems, such as must_be_14_digits, invalid_birth_date or unknown_governorate_code. The last digit is an official check digit whose formula is not public, so it is not verified.

Teams use the Egypt national ID API in KYC and onboarding forms, age checks, and to prefill birth date and gender from the ID.

This is a structure check. It catches typos and made-up numbers but does not confirm that the ID is registered with the Egyptian government.

To check many IDs at once, use the Batch Validate MENA IDs API. For the next KYC step, screen names with the Sanctions Screening API.

POST
Egypt National ID
https://api.eu.apyhub.com/odelyo/validate-egypt-national-id/egypt-national-ids

QUICKSTART

GUIDE

Quickstart

Send the required value string to validate it.

curl -X POST "https://api.eu.apyhub.com/odelyo/validate-egypt-national-id/egypt-national-ids" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"value":"29001011234567"}'

What you'll get back

Returns a JSON object with data (the validation result) and meta (request id and version). Below is the real response for the request above.

{
  "data": {
    "valid": true,
    "input": "29001011234567",
    "normalized": "29001011234567",
    "problems": [],
    "birth_date": "1990-01-01",
    "age": 36,
    "gender": "female",
    "governorate_code": "12",
    "governorate": {
      "en": "Dakahlia",
      "ar": "الدقهلية"
    },
    "note": "Structure check only. The last digit is an official check digit whose formula is not public, so it is not verified."
  },
  "meta": {
    "request_id": "req_73398345c54bef35",
    "version": "v1"
  }
}
TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*

About this endpoint

What it does

Validates a 14-digit Egyptian national ID and decodes its birth date, age, gender and governorate. Invalid values still return 200 with valid: false and the reasons in problems. The last digit is an official check digit whose formula is not public, so it is not verified.

Request Body

ParameterTypeMandatoryDescription
valueStringYesThe 14-digit national ID. Spaces, dashes and Arabic-Indic digits are allowed and cleaned up. Other JSON types (number, array, boolean) return 422.

Response

Returns a JSON object with a data object holding the validation result and a meta object with the request_id and API version. Invalid values still return 200 with valid: false and the reasons in problems. Requests with a missing or wrong-type field return 422 with an error object.

ParameterTypeDescription
dataObjectThe validation result.
data.validBooleantrue if the value passes all checks for its format.
data.inputStringThe value you sent.
data.normalizedStringThe value after cleanup: spaces and separators removed and Arabic-Indic digits converted to Latin digits.
data.problemsString ArrayProblem codes when the value is not valid, e.g. checksum_failed, must_be_14_digits. Empty when valid.
data.birth_dateStringBirth date encoded in the ID (YYYY-MM-DD).
data.ageIntegerAge in years, from the birth date.
data.genderStringmale or female, from the 13th digit.
data.governorate_codeStringTwo-digit code of the governorate of birth.
data.governorateObjectGovernorate of birth, with en (English) and ar (Arabic) names.
data.governorate.enStringGovernorate name in English, e.g. Dakahlia.
data.governorate.arStringGovernorate name in Arabic.
data.noteStringReminder that only the structure is checked: the last digit is an official check digit whose formula is not public.
metaObjectRequest details.
meta.request_idStringUnique id of this request, useful for support.
meta.versionStringAPI version, e.g. v1.
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.