# Da Ma Cai 大马彩 API

TL;DR Scarp draw result, host on GitHub, retrieve it like API at [damacai.hongineer.com](https://damacai.hongineer.com/).

## Data Scraping

I have previously shared a technique for [scraping Da Ma Cai](https://tech.mrleong.net/scrapping-da-ma-cai-4d-results) draw result. Now I finally have time to share source code on [GitHub](https://github.com/hongster/damacai). I wrote a Python script that scraps the data. The data is committed to Git repository. By enabling GitHub Pages, I am using GitHub as CDN for serving the data. Similar to an API web service, but without coding a server app.

## API Endpoint

**GET** `https://damacai.hongineer.com/results/draw_dates.json`  
*Retrieve all the draw dates. Wednesdays, Saturdays, Sundays, and sometime Tuesdays.*

```shell
curl https://damacai.hongineer.com/results/draw_dates.json
```

**GET** `https://damacai.hongineer.com/results/{YEAR}/{YYYYMMDD}.json`  
*Get draw result for a specific date.*

```shell
curl https://damacai.hongineer.com/results/2026/20260225.json
```

## Disclaimer

*This project is an independent open-source initiative. It is neither affiliated with, nor endorsed by Pan Malaysian Pools Sdn. Bhd. (Da Ma Cai). All trademarks, logos, and brand names are the property of their respective owners.*
