Skip to main content
Deno 2 is finally here 🎉️
Learn more

Unofficial FIDE Rating Scraper

This module allows you to scrape the FIDE Elo ratings of chess players, knowing their FIDE ID. It fetches the rating from the FIDE website and processes the page with regexes to extract the data. This module is extremely lightweight and doesn’t require any additional modules.

The result is a FidePlayer object:

export interface FIDEPlayer {
    id: string;
    name: string;
    federation: string;
    country?: string;
    title?: string;
    sex: Sex;
    year: number;
    ratings: { category: Category, rating: number }[];
}

type Category = 'standard' | 'blitz' | 'rapid';
type Sex = 'M' | 'F' | 'O';

Usage:

import { FIDE } from './mod.ts';

// Magnus Carlsen:
let user = await FIDE('1503014');