Github: phlong19

📜 INTRODUCTION

Free use API for âš½

# Teams


Path https://worldcup-api.onrender.com/all-teams

Params / Query Description Examples
id Get a team with id provided. e.g. path/id
team Search all teams contain the 'team' query string e.g. path?team=string
rank || rankHigherThan & rankLowerThan Get the exact team with that rank or teams within the range. Default rankHigherThan = 0 & rankLowerThan = 1000 e.g. path?rank=1 OR path?rankHigherThan=3 path?rankHigherThan=5&rankLowerThan=7

# World Cup 22


Path https://worldcup-api.onrender.com/worldcup22

Params / Query Description Examples
Get all groups in World Cup 22 e.g. path/groups
id Get a player with id provided. e.g. path/player/id
player Search all players contain the 'name' query string e.g. path/player?name=string

# All World Cup matches / International matches


Path https://worldcup-api.onrender.com/worldcup-match
https://worldcup-api.onrender.com/international-match

Note: Date format must be: YYYY-MM-DD

Due to a huge numbers of records can be returned, I limited it just 100 records per request.


Add 'page' query to get next 100 records, total number of pages also will be returned.


Example: /international-match?dateHigherThan=2019-10-01&dateLowerThan=2020-12-31&page=2

Results:


Params / Query World Cup International
all get all matches

e.g. path/all
id e.g. path/id
date Using date like teams ranking above.

e.g. path?date=1999-07-15 OR path?dateHigherThan=2019-12-01&dateLowerThan=2020-01-01
year Exact year only

Get all matches of that World Cup year.
e.g. path/year/2002
No support.

# Playground


Path https://worldcup-api.onrender.com/playground

Playground's data is a copy of all World Cup matches.

Note: Date format must be: YYYY-MM-DD
Methods Params - Query Required Examples
GET id Yes path/6516f0d1f4982d78357070ed
POST
  • year
  • date
  • stage
  • homeTeam
  • homeGoals
  • awayTeam
  • awayGoals
  • winConditions
Yes except winConditions

e.g. path/new-match/
PUT e.g. path/id
PATCH None, just update any field you want
DELETE id Yes