Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

147 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SoccerBot

npm version Package License NPM Downloads Build & Publish codecov stars forks HitCount

Library for scraping soccer data from the internet

🛠️ Install

Node.js >=24 and <26 must be installed first

npm install soccerbot

or

bun add soccerbot

🚀 Quick start

Type this into your ts file.

import { soccerway, transfermarkt, fotbalunas, eurofotbal, sportnet, worldfootball } from 'soccerbot';

console.log(soccerway.leagueUrl('czech-republic/chance-liga/standings/bNFMkskm')); // show url

soccerway.league('czech-republic/chance-liga/standings/bNFMkskm').then((res) => console.log(res));

console.log(soccerway.teamUrl('slavia-prague/viXGgnyB')); // show url

soccerway.team('slavia-prague/viXGgnyB').then((res) => console.log(res));

console.log(soccerway.playerUrl('kolar-ondrej/xfBGcS1U')); // show url

soccerway.player('kolar-ondrej/xfBGcS1U').then((res) => console.log(res));

console.log(transfermarkt.teamUrl('62')); // show url

transfermarkt.team('62').then((res) => console.log(res));

console.log(fotbalunas.teamUrl('62')); // show url

fotbalunas.team('62').then((res) => console.log(res));

console.log(eurofotbal.teamUrl('cesko/sparta-praha')); // show url

eurofotbal.team('cesko/sparta-praha').then((res) => console.log(res));

console.log(sportnet.teamUrl('fk-inter-bratislava-1/tim/dospeli-m-a')); // show url

sportnet.team('fk-inter-bratislava-1/tim/dospeli-m-a').then((res) => console.log(res));

console.log(worldfootball.leagueUrl('co7093/mexico-lp---serie-b')); // show url

worldfootball.league('co7093/mexico-lp---serie-b').then((res) => console.log(res));

console.log(worldfootball.teamUrl('te237557/artesanos-metepec')); // show squad url

worldfootball.team('te237557/artesanos-metepec').then((res) => console.log(res));

console.log(worldfootball.playerUrl('pe599828/oscar-altamirano')); // show url

worldfootball.player('pe599828/oscar-altamirano').then((res) => console.log(res));

Transfermarkt players also include an optional FIFA-style detailed position:

import { SoccerBotPositionDetail, transfermarkt } from 'soccerbot';

const response = await transfermarkt.team('62');
const centreBacks = response.data?.filter((player) => player.positionDetail === SoccerBotPositionDetail.CB);

🛠️ Sources

Source Speed Stability Coverage
transfermarkt ⚽⚽⚽ ⚽⚽⚽ World
soccerway World
fotbalunas ⚽⚽⚽ Czech Republic
eurofotbal ⚽⚽ ⚽⚽ Europe
sportnet Slovakia
worldfootball ⚽⚽ World

Note: Soccerway, Fotbalunas and sportnet take data from multiple pages, so they need more time. WorldFootball uses its HEIM:SPIEL sister site as a fallback when the primary site returns a Cloudflare challenge.

🪪 License

Copyright © 2021 - 2026 Dominik Hladik

All contents are licensed under the MIT license.

About

Library for scraping soccer data from the internet

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages