Cricket Database
0 of 50 calls today
Get a free API key Sign in Dashboard Upgrade

Getting started

Your first call in a minute: the base address, your key and the shape of a response.

The API answers GET requests under https://api.cricketdatabase.com/v1 with JSON. You need one thing to start: a key, which the free plan gives you with no card.

Your first call

curl -H "Authorization: Bearer $CDB_KEY" \
  https://api.cricketdatabase.com/v1/results/yesterday

That returns every result from the latest day in the database: each match's address, date, format, the two teams with their scores, and the result.

What a response looks like

Every answer has the same two parts: data, the thing you asked for, and meta, about the answer: your plan, and for lists the count and the way to the next page.

{"data": [ ... ], "meta": {"plan": "free", "count": 50, "total": 919, "next_cursor": "Y2RiOnAy"}}

Everything that refers to something else carries its address, such as {"player": "je-root", "name": "JE Root"}, so you can follow it with another call. The version in the address is optional: /matches is /v1/matches.

Finding your way

/v1 on its own lists every endpoint, and /v1/status answers without a key, so it suits a health check. /v1/search?q= finds players, teams, grounds and competitions by name when you do not know the address.

Next, read What each plan can call, so that nothing you build depends on data your plan does not include.