Live Cricket Score JSON API - Build using Deno π¦
API is not working due to the Cricbuzz Mobile site being Fully Redesigned - The full Site Structure was Changed it's a bit complex to get data - Please Consider using the Python Cricket API Version - https://github.com/sanwebinfo/cricket-api
- Deno on your System https://deno.land/#installation
- Denon for Development Server and Live Changes - https://github.com/denosaurs/denon
- oak middleware framework for Deno's native HTTP server - https://github.com/oakserver/oak
- cheerio for data Scrape
- Cors - https://github.com/tajpouria/cors
- API rate limit - https://github.com/AdityaTD/oak-rate-limit
- Development
denon run --allow-net --allow-read server.ts
or
deno task dev
- Production
deno run --allow-net --allow-read server.ts
or
deno task start
- Live Match -
http://localhost:3000/live
- Get Match Score by ID -
http://localhost:3000/match/<MatchID>
- Update live Match URL in
/data/config.json
- Update API Rate limits -
/server.ts
- Update CORS Headers to allow Specific websites to access the API -
/lib/router.ts
- change the Port No on
server.ts
file
You can Host this on your own server or use Deno Deploy just connect it via GitHub π
- Fork this Project on your Github Repo
- Link your Forked Project Repo on Deno Deploy, and
main
Branch to deploy - Next, Choose the deploy option to automatic and Link the
server.ts
file to Start the API Server - Finally, Click the Link Button to Connect the repo for Continous auto deploy
Note : server.ts
is the Main file to Start API server if you are Hosting
this on your Server don't Forget to install deno and denon (For Local Testing)
# Production Start
deno task start
or
deno run --allow-net --allow-read server.ts
- Download or use git to clone the Project repo on your Server
- Create Systemd.service file to run the app forever
- Use Nginx reverse proxy for DENO api server
self Host this API Service for 100% Uptime β¬
- Personally, I recommended Deno deploy - they offer a Free plan too
- For More About Deno Deploy Refer - https://deno.com/deploy
- Random User Agent
- API Caching
- Display Live Match ID No's in seperate API router
- Free Live Cricket Score API (PHP) - https://github.com/sanwebinfo/cricket-api
- Live Cricket Score JSON API (Node.js) - https://github.com/sanwebinfo/cricket-api-nodejs
Your PR's are Welcome π
- This is not an Offical API from Cricbuzz - it's an Unofficial API
- This is for Education Purpose only - use at your own risk on Production Site
MIT