A RESTful API service that provides access to historical data of Canada's Express Entry draws. This API helps track and analyze Express Entry draw patterns, including CRS scores, invitation numbers, category-specific draws, and candidate pool distribution.
- Retrieve all Express Entry draws
- Filter draws by year and category
- Get the latest draw (closest to today's date)
- View CRS score distribution in the candidate pool
- Automated updates via GitHub Actions
- Deployed on Cloudflare Workers
https://can-ee-draws.karanjit-sagun01.workers.dev
-
Get All Draws
GET /drawsQuery Parameters:
year(optional): Filter draws by year (e.g., 2023, 2024)category(optional): Filter draws by category (e.g., PNP, CEC, French, Healthcare)
-
Get Latest Draw
GET /draws/latestReturns the draw closest to today's date
-
Get Candidate Pool Distribution
GET /poolReturns the current CRS score distribution of candidates in the Express Entry pool
For detailed API documentation, visit: https://can-ee-draws.workers.dev/api/docs
-
Clone the repository
git clone https://github.com/yourusername/can-ee-draws.git cd can-ee-draws -
Install dependencies
pnpm install
-
Start the development server
pnpm dev
-
Build the project
pnpm build
-
Deploy to Cloudflare Workers
pnpm deploy
The project includes a data extraction script that fetches the latest Express Entry draw data from IRCC and updates the local data files.
-
Basic extraction (without webhook notification):
node ./scripts/extractor.js
-
With webhook notification:
WEBHOOK_API=https://your-webhook-url.com/api/notify node ./scripts/extractor.js
- Fetches the latest draw data from IRCC's official API
- Converts the data to the project's format
- Updates
data/ee-draws.jsonwith new draw information - Updates
data/distribution.jsonwith candidate pool distribution - Sends a webhook notification (if
WEBHOOK_APIis set) - Handles duplicate draws gracefully
WEBHOOK_API(optional): URL to send notifications when new draws are found
The extractor runs automatically via GitHub Actions:
- Schedule: Every 5 minutes from 10:00-22:00 UTC, Monday-Friday
- Manual trigger: Available via GitHub Actions workflow_dispatch
- Webhook: Configured via GitHub repository secrets
-
Pull Request Checks
- Automatically runs build checks on pull requests
- Ensures code quality before merging
-
Automated Deployment
- Automatically deploys to Cloudflare Workers when code is pushed to main
- Runs data updates every 30 minutes during business hours (UTC 10:00-17:00, Mon-Fri)
- Hono - Lightweight web framework
- Cloudflare Workers - Edge computing platform
- pnpm - Package manager
- Rollup - Module bundler
- GitHub Actions - CI/CD and automation
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Data source: IRCC Express Entry Draws
- Inspired by the need for easy access to Express Entry draw history