{"id":16235787,"url":"https://github.com/rayriffy/thai-lotto-api","last_synced_at":"2025-10-25T11:04:07.386Z","repository":{"id":49228578,"uuid":"164387455","full_name":"rayriffy/thai-lotto-api","owner":"rayriffy","description":"API สำหรับแสดงเลขผลสลากกินแบ่ง","archived":false,"fork":false,"pushed_at":"2025-05-20T18:32:19.000Z","size":350,"stargazers_count":86,"open_issues_count":2,"forks_count":38,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-05-25T15:03:44.152Z","etag":null,"topics":["elysia","lottery","typescript"],"latest_commit_sha":null,"homepage":"https://lotto.api.rayriffy.com/","language":"TypeScript","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/rayriffy.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-01-07T06:21:21.000Z","updated_at":"2025-05-20T18:32:22.000Z","dependencies_parsed_at":"2024-02-16T15:45:14.406Z","dependency_job_id":"86bc5f3a-53ed-4386-ab05-5e8fd0d3b476","html_url":"https://github.com/rayriffy/thai-lotto-api","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/rayriffy/thai-lotto-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rayriffy%2Fthai-lotto-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rayriffy%2Fthai-lotto-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rayriffy%2Fthai-lotto-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rayriffy%2Fthai-lotto-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rayriffy","download_url":"https://codeload.github.com/rayriffy/thai-lotto-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rayriffy%2Fthai-lotto-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280943395,"owners_count":26417747,"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-25T02:00:06.499Z","response_time":81,"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":["elysia","lottery","typescript"],"created_at":"2024-10-10T13:27:34.414Z","updated_at":"2025-10-25T11:04:07.348Z","avatar_url":"https://github.com/rayriffy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Thai Lottery API\n================\n\nAn API for checking latest Thai Lottery\n\nRequirements\n------------\n\n- [Bun](https://bun.sh)\n\nDevelopment\n-----------\n\n```sh\n$ bun i\n$ bun run dev\n```\n\nBuilding for production\n---\n\nWe packed application to production by using Docker images.\n\n```sh\n$ docker build -t runtime .\n```\n\nLimitations\n-----------\n\nThis API crawl data from sanook.com and the API cannot handle URL in case of 404 yet\n\nAPI\n---\n\nThe API is based on HTTPS requests and JSON responses. The stable HTTPS endpoint for the latest version is: `https://lotto.api.rayriffy.com`\n\n### Get latest lottery result\n\n##### request\n`GET /latest`\n\n##### response\n\u003cdetails\u003e\n\u003csummary\u003eJSON\u003c/summary\u003e\n\n```json\n{  \n  \"status\":\"success\",\n  \"response\":{  \n    \"date\":\"30 ธันวาคม 2561\",\n    \"endpoint\":\"https://news.sanook.com/lotto/check/30122561/\",\n    \"prizes\":[  \n      {  \n        \"id\":\"prizeFirst\",\n        \"name\":\"รางวัลที่ 1\",\n        \"reward\":\"6000000\",\n        \"amount\":1,\n        \"number\":[  \n          \"735867\"\n        ]\n      },\n      {  \n        \"id\":\"prizeFirstNear\",\n        \"name\":\"รางวัลข้างเคียงรางวัลที่ 1\",\n        \"reward\":\"100000\",\n        \"amount\":2,\n        \"number\":[  \n          \"735866\",\n          \"735868\"\n        ]\n      },\n      {  \n        \"id\":\"prizeSecond\",\n        \"name\":\"รางวัลที่ 2\",\n        \"reward\":\"200000\",\n        \"amount\":5,\n        \"number\":[  \n          \"031880\",\n          \"466182\",\n          \"548097\",\n          \"838262\",\n          \"990824\"\n        ]\n      },\n      {  \n        \"id\":\"prizeThrid\",\n        \"name\":\"รางวัลที่ 3\",\n        \"reward\":\"80000\",\n        \"amount\":5,\n        \"number\":[  \n          \"049590\",\n          \"063523\",\n          \"237012\",\n          \"259642\",\n          \"348399\"\n        ]\n      },\n      {  \n        \"id\":\"prizeForth\",\n        \"name\":\"รางวัลที่ 4\",\n        \"reward\":\"40000\",\n        \"amount\":50,\n        \"number\":[  \n          \"018432\",\n          \"025422\",\n          \"049808\",\n          \"056211\",\n          \"094398\",\n          \"121783\",\n          \"148104\",\n          \"148638\",\n          \"150056\",\n          \"189221\",\n          \"196152\",\n          \"219869\",\n          \"227554\",\n          \"237802\",\n          \"260728\",\n          \"268460\",\n          \"286869\",\n          \"288547\",\n          \"317267\",\n          \"320072\",\n          \"346821\",\n          \"379926\",\n          \"383854\",\n          \"388285\",\n          \"412794\",\n          \"412948\",\n          \"449958\",\n          \"461152\",\n          \"474792\",\n          \"489937\",\n          \"527656\",\n          \"537851\",\n          \"556221\",\n          \"594958\",\n          \"644732\",\n          \"646556\",\n          \"682687\",\n          \"731295\",\n          \"771266\",\n          \"840258\",\n          \"867152\",\n          \"897648\",\n          \"903266\",\n          \"943811\",\n          \"953370\",\n          \"961883\",\n          \"964917\",\n          \"978357\",\n          \"983361\",\n          \"995186\"\n        ]\n      },\n      {  \n        \"id\":\"prizeFifth\",\n        \"name\":\"รางวัลที่ 5\",\n        \"reward\":\"20000\",\n        \"amount\":100,\n        \"number\":[  \n          \"015058\",\n          \"028293\",\n          \"028606\",\n          \"053976\",\n          \"057188\",\n          \"076979\",\n          \"086025\",\n          \"088404\",\n          \"114402\",\n          \"115726\",\n          \"123167\",\n          \"124132\",\n          \"144169\",\n          \"162592\",\n          \"164805\",\n          \"168795\",\n          \"169152\",\n          \"170811\",\n          \"179718\",\n          \"182023\",\n          \"190866\",\n          \"225839\",\n          \"227691\",\n          \"231646\",\n          \"231912\",\n          \"241934\",\n          \"251830\",\n          \"278673\",\n          \"279372\",\n          \"281526\",\n          \"284837\",\n          \"293893\",\n          \"294604\",\n          \"294670\",\n          \"304360\",\n          \"314093\",\n          \"321218\",\n          \"335344\",\n          \"392746\",\n          \"401511\",\n          \"426861\",\n          \"433739\",\n          \"437494\",\n          \"444284\",\n          \"444854\",\n          \"447606\",\n          \"449838\",\n          \"451979\",\n          \"455457\",\n          \"483172\",\n          \"491712\",\n          \"527546\",\n          \"555996\",\n          \"564587\",\n          \"565011\",\n          \"572138\",\n          \"579551\",\n          \"587670\",\n          \"599175\",\n          \"600249\",\n          \"609415\",\n          \"616992\",\n          \"617281\",\n          \"632558\",\n          \"636087\",\n          \"648256\",\n          \"661753\",\n          \"669104\",\n          \"672017\",\n          \"687652\",\n          \"697383\",\n          \"702306\",\n          \"702607\",\n          \"708124\",\n          \"720464\",\n          \"722030\",\n          \"744770\",\n          \"775333\",\n          \"779634\",\n          \"785705\",\n          \"795585\",\n          \"795779\",\n          \"807768\",\n          \"827729\",\n          \"831475\",\n          \"833686\",\n          \"839802\",\n          \"840137\",\n          \"845082\",\n          \"854427\",\n          \"855559\",\n          \"861761\",\n          \"872372\",\n          \"874608\",\n          \"880273\",\n          \"893374\",\n          \"913405\",\n          \"954538\",\n          \"961018\",\n          \"982520\"\n        ]\n      }\n    ],\n    \"runningNumbers\":[  \n      {  \n        \"id\":\"runningNumberFrontThree\",\n        \"name\":\"รางวัลเลขหน้า 3 ตัว\",\n        \"reward\":\"4000\",\n        \"amount\":2,\n        \"number\":[  \n          \"701\",\n          \"884\"\n        ]\n      },\n      {  \n        \"id\":\"runningNumberBackThree\",\n        \"name\":\"รางวัลเลขท้าย 3 ตัว\",\n        \"reward\":\"4000\",\n        \"amount\":2,\n        \"number\":[  \n          \"701\",\n          \"884\"\n        ]\n      },\n      {  \n        \"id\":\"runningNumberBackTwo\",\n        \"name\":\"รางวัลเลขท้าย 2 ตัว\",\n        \"reward\":\"2000\",\n        \"amount\":1,\n        \"number\":[  \n          \"02\"\n        ]\n      }\n    ]\n  }\n}\n```\n\u003c/details\u003e\n\n### List past lottery date\n\n##### request\n`GET /list/[:page?]`\n\n##### response\n\u003cdetails\u003e\n\u003csummary\u003eJSON\u003c/summary\u003e\n\n```json\n{  \n  \"status\":\"success\",\n  \"response\":[  \n    {  \n      \"id\":\"30122561\",\n      \"url\":\"/lotto/30122561\",\n      \"date\":\"30 ธันวาคม 2561\"\n    },\n    {  \n      \"id\":\"16122561\",\n      \"url\":\"/lotto/16122561\",\n      \"date\":\"16 ธันวาคม 2561\"\n    },\n    {  \n      \"id\":\"01122561\",\n      \"url\":\"/lotto/01122561\",\n      \"date\":\"1 ธันวาคม 2561\"\n    },\n    {  \n      \"id\":\"16112561\",\n      \"url\":\"/lotto/16112561\",\n      \"date\":\"16 พฤศจิกายน 2561\"\n    },\n    {  \n      \"id\":\"01112561\",\n      \"url\":\"/lotto/01112561\",\n      \"date\":\"1 พฤศจิกายน 2561\"\n    },\n    {  \n      \"id\":\"16102561\",\n      \"url\":\"/lotto/16102561\",\n      \"date\":\"16 ตุลาคม 2561\"\n    },\n    {  \n      \"id\":\"01102561\",\n      \"url\":\"/lotto/01102561\",\n      \"date\":\"1 ตุลาคม 2561\"\n    },\n    {  \n      \"id\":\"16092561\",\n      \"url\":\"/lotto/16092561\",\n      \"date\":\"16 กันยายน 2561\"\n    },\n    {  \n      \"id\":\"01092561\",\n      \"url\":\"/lotto/01092561\",\n      \"date\":\"1 กันยายน 2561\"\n    },\n    {  \n      \"id\":\"16082561\",\n      \"url\":\"/lotto/16082561\",\n      \"date\":\"16 สิงหาคม 2561\"\n    },\n    {  \n      \"id\":\"01082561\",\n      \"url\":\"/lotto/01082561\",\n      \"date\":\"1 สิงหาคม 2561\"\n    }\n  ]\n}\n```\n\u003c/details\u003e\n\n### Get past lottery result\n\n##### request\n`GET /lotto/[:id]`\n\n`[:id]` can be obtain from `/list`\n\n##### response\n\u003cdetails\u003e\n\u003csummary\u003eJSON\u003c/summary\u003e\n\n```json\n{  \n  \"status\":\"success\",\n  \"response\":{  \n    \"date\":\"1 ธันวาคม 2561\",\n    \"endpoint\":\"https://news.sanook.com/lotto/check/01122561\",\n    \"prizes\":[  \n      {  \n        \"id\":\"prizeFirst\",\n        \"name\":\"รางวัลที่ 1\",\n        \"reward\":\"6000000\",\n        \"amount\":1,\n        \"number\":[  \n          \"021840\"\n        ]\n      },\n      {  \n        \"id\":\"prizeFirstNear\",\n        \"name\":\"รางวัลข้างเคียงรางวัลที่ 1\",\n        \"reward\":\"100000\",\n        \"amount\":2,\n        \"number\":[  \n          \"021839\",\n          \"021841\"\n        ]\n      },\n      {  \n        \"id\":\"prizeSecond\",\n        \"name\":\"รางวัลที่ 2\",\n        \"reward\":\"200000\",\n        \"amount\":5,\n        \"number\":[  \n          \"062948\",\n          \"127470\",\n          \"288347\",\n          \"548436\",\n          \"628614\"\n        ]\n      },\n      {  \n        \"id\":\"prizeThrid\",\n        \"name\":\"รางวัลที่ 3\",\n        \"reward\":\"80000\",\n        \"amount\":5,\n        \"number\":[  \n          \"270065\",\n          \"464017\",\n          \"473504\",\n          \"530912\",\n          \"575061\"\n        ]\n      },\n      {  \n        \"id\":\"prizeForth\",\n        \"name\":\"รางวัลที่ 4\",\n        \"reward\":\"40000\",\n        \"amount\":50,\n        \"number\":[  \n          \"016086\",\n          \"116226\",\n          \"124870\",\n          \"129956\",\n          \"169205\",\n          \"182461\",\n          \"187910\",\n          \"189146\",\n          \"205144\",\n          \"207414\",\n          \"242734\",\n          \"256039\",\n          \"283334\",\n          \"301910\",\n          \"336526\",\n          \"352184\",\n          \"362582\",\n          \"382852\",\n          \"394749\",\n          \"394958\",\n          \"397740\",\n          \"401668\",\n          \"404330\",\n          \"407257\",\n          \"438263\",\n          \"473839\",\n          \"576342\",\n          \"585200\",\n          \"594545\",\n          \"603363\",\n          \"611618\",\n          \"633252\",\n          \"636183\",\n          \"637833\",\n          \"690892\",\n          \"709491\",\n          \"730042\",\n          \"731791\",\n          \"755978\",\n          \"792456\",\n          \"876942\",\n          \"883662\",\n          \"898711\",\n          \"947046\",\n          \"971620\",\n          \"987205\",\n          \"988277\",\n          \"992200\",\n          \"995247\",\n          \"995971\"\n        ]\n      },\n      {  \n        \"id\":\"prizeFifth\",\n        \"name\":\"รางวัลที่ 5\",\n        \"reward\":\"20000\",\n        \"amount\":100,\n        \"number\":[  \n          \"013109\",\n          \"024421\",\n          \"026991\",\n          \"031643\",\n          \"050657\",\n          \"058926\",\n          \"069749\",\n          \"071412\",\n          \"076515\",\n          \"080316\",\n          \"092905\",\n          \"096928\",\n          \"111764\",\n          \"137488\",\n          \"210276\",\n          \"216370\",\n          \"218749\",\n          \"235889\",\n          \"244712\",\n          \"250170\",\n          \"255504\",\n          \"257666\",\n          \"262364\",\n          \"273440\",\n          \"305286\",\n          \"310466\",\n          \"334375\",\n          \"339161\",\n          \"345423\",\n          \"353899\",\n          \"360663\",\n          \"363981\",\n          \"364818\",\n          \"373331\",\n          \"381198\",\n          \"395963\",\n          \"421785\",\n          \"428210\",\n          \"437231\",\n          \"529822\",\n          \"546498\",\n          \"553767\",\n          \"555761\",\n          \"559922\",\n          \"560040\",\n          \"563302\",\n          \"588125\",\n          \"593122\",\n          \"594897\",\n          \"601621\",\n          \"618166\",\n          \"620234\",\n          \"623563\",\n          \"627915\",\n          \"629906\",\n          \"634940\",\n          \"641039\",\n          \"641321\",\n          \"667984\",\n          \"670679\",\n          \"674943\",\n          \"682070\",\n          \"690240\",\n          \"694936\",\n          \"709212\",\n          \"713159\",\n          \"714334\",\n          \"720766\",\n          \"765748\",\n          \"766906\",\n          \"770412\",\n          \"774771\",\n          \"783683\",\n          \"785299\",\n          \"797030\",\n          \"803837\",\n          \"804359\",\n          \"817707\",\n          \"840520\",\n          \"852313\",\n          \"852630\",\n          \"856027\",\n          \"856216\",\n          \"857880\",\n          \"869371\",\n          \"873773\",\n          \"875098\",\n          \"876651\",\n          \"917189\",\n          \"932242\",\n          \"934569\",\n          \"935834\",\n          \"936538\",\n          \"937265\",\n          \"944402\",\n          \"958246\",\n          \"971100\",\n          \"987737\",\n          \"988424\",\n          \"993708\"\n        ]\n      }\n    ],\n    \"runningNumbers\":[  \n      {  \n        \"id\":\"runningNumberFrontThree\",\n        \"name\":\"รางวัลเลขหน้า 3 ตัว\",\n        \"reward\":\"4000\",\n        \"amount\":2,\n        \"number\":[  \n          \"561\",\n          \"988\"\n        ]\n      },\n      {  \n        \"id\":\"runningNumberBackThree\",\n        \"name\":\"รางวัลเลขท้าย 3 ตัว\",\n        \"reward\":\"4000\",\n        \"amount\":2,\n        \"number\":[  \n          \"561\",\n          \"988\"\n        ]\n      },\n      {  \n        \"id\":\"runningNumberBackTwo\",\n        \"name\":\"รางวัลเลขท้าย 2 ตัว\",\n        \"reward\":\"2000\",\n        \"amount\":1,\n        \"number\":[  \n          \"67\"\n        ]\n      }\n    ]\n  }\n}\n```\n\u003c/details\u003e\n\nContributing\n------------\n\nWe welcome all contributions by sending PR to this repository.\n\nNeed Help ?\n-----------\n\nIf you need help with anything, here're following methods:\n\n#### Create an Issue\n\nIf you have something you want to discuss in detail, or have hit an issue which you believe others will also have in deployment or development of the system, [opening an issue](https://github.com/rayriffy/thai-lotto-api/issues) is the best way to get help. It creates a permanent resource for others wishing to contribute to conversation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frayriffy%2Fthai-lotto-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frayriffy%2Fthai-lotto-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frayriffy%2Fthai-lotto-api/lists"}