{"id":31788923,"url":"https://github.com/zerosdev/nik-reader","last_synced_at":"2025-10-10T14:29:43.552Z","repository":{"id":46599186,"uuid":"370765405","full_name":"zerosdev/nik-reader","owner":"zerosdev","description":"Identity data reader based on NIK (Nomor Induk Kependudukan)","archived":false,"fork":false,"pushed_at":"2021-11-05T13:33:11.000Z","size":171,"stargazers_count":16,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-08-10T19:21:32.624Z","etag":null,"topics":["hacktoberfest","ktp","nik"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zerosdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-25T16:50:35.000Z","updated_at":"2024-08-02T06:42:17.000Z","dependencies_parsed_at":"2022-09-02T03:02:22.557Z","dependency_job_id":null,"html_url":"https://github.com/zerosdev/nik-reader","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/zerosdev/nik-reader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerosdev%2Fnik-reader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerosdev%2Fnik-reader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerosdev%2Fnik-reader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerosdev%2Fnik-reader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zerosdev","download_url":"https://codeload.github.com/zerosdev/nik-reader/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerosdev%2Fnik-reader/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279004178,"owners_count":26083688,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","ktp","nik"],"created_at":"2025-10-10T14:29:08.342Z","updated_at":"2025-10-10T14:29:43.547Z","avatar_url":"https://github.com/zerosdev.png","language":"PHP","readme":"\u003ch1 align=\"center\"\u003eNIK Reader\u003c/h1\u003e\n\u003ch6 align=\"center\"\u003eIdentity data reader based on NIK (Nomor Induk Kependudukan)\u003c/h6\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/ZerosDev/nik-reader/workflows/build/badge.svg\" alt=\"build\"/\u003e\n  \u003cimg src=\"https://img.shields.io/github/v/release/ZerosDev/nik-reader?include_prereleases\" alt=\"release\"/\u003e\n  \u003cimg src=\"https://img.shields.io/github/languages/top/ZerosDev/nik-reader\" alt=\"language\"/\u003e\n  \u003cimg src=\"https://img.shields.io/github/license/ZerosDev/nik-reader\" alt=\"license\"/\u003e\n  \u003cimg src=\"https://img.shields.io/github/languages/code-size/ZerosDev/nik-reader\" alt=\"size\"/\u003e\n  \u003cimg src=\"https://img.shields.io/github/downloads/ZerosDev/nik-reader/total\" alt=\"downloads\"/\u003e\n  \u003cimg src=\"https://img.shields.io/badge/PRs-welcome-brightgreen.svg\" alt=\"pulls\"/\u003e\n\u003c/p\u003e\n\n## About\n\nThis library gives you a way to convert the NIK number into useful information such as: Region name (province, city, sub-district), date of birth, gender, zodiac, age, and more. This can also be used to validate whether the NIK number is valid or not.\nHere is the example result :\n\n```json\n{\n    \"valid\": true,\n    \"nik\": \"3502200101000001\",\n    \"province_id\": \"35\",\n    \"province\": \"JAWA TIMUR\",\n    \"city_id\": \"3502\",\n    \"city\": \"KAB. PONOROGO\",\n    \"subdistrict_id\": \"350220\",\n    \"subdistrict\": \"JAMBON\",\n    \"postal_code\": \"63456\",\n    \"birthday\": \"01-01-2000\",\n    \"age\":\n    {\n        \"year\": 21,\n        \"month\": 9,\n        \"day\": 25\n    },\n    \"zodiac\": \"Capricorn\",\n    \"gender\": \"male\",\n    \"unique_code\": \"0001\"\n} \n```\n\n## Installation\n\n1. Run command\n\u003cpre\u003e\u003ccode\u003ecomposer require zerosdev/nik-reader\u003c/code\u003e\u003c/pre\u003e\n\n## Usage\n\n### Laravel\n\n```php\n// .........\npublic function method()\n{\n    $nik = '3502200101910001';\n    $result = \\NikReader::read($nik);\n    \n    if (true === $result-\u003evalid) {\n        // code\n    }\n}\n```\n\n### Non-Laravel\n\n```php\n\u003c?php\n\nrequire 'path/to/your/vendor/autoload.php';\n\nuse ZerosDev\\NikReader\\Reader;\n\n$nik = '3502200101910001';\n$reader = new Reader();\n$result = $reader-\u003eread($nik);\n\nif (true === $result-\u003evalid) {\n    // code\n}\n```\n\n### Available Methods\n\n| Method                    | Description                      |\n|---------------------------|----------------------------------|\n| read()                    | Start reading NIK number         |\n| valid()                   | Check wether NIK is valid or not |\n| setDatabase()             | Load database file               |\n| getProvince()             | Get province data                |\n| getCity()                 | Get city data                    |\n| getSubdistrict()          | Get subdistrict data             |\n| getPostalCode()           | Get postal code data             |\n| getBornDate()             | Get date of birth data           |\n| getAge()                  | Get age data                     |\n| getZodiac()               | Get zodiac data                  |\n| getGender()               | Get gender data                  |\n| getUniqueCode()           | Get unique code                  |\n| toArray()                 | Convert result into Array format |\n| toJSON()                  | Convert result into JSON format  |\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzerosdev%2Fnik-reader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzerosdev%2Fnik-reader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzerosdev%2Fnik-reader/lists"}