Skip to main content

Visualization APIs

Source: https://www.cricketapi.com/v5/docs/worm-rest-api Source: https://www.cricketapi.com/v5/docs/manhattan-rest-api Source: https://www.cricketapi.com/v5/docs/run-rate-rest-api Source: https://www.cricketapi.com/v5/docs/wagon-zone-rest-api

Overview

Pre-computed visualization data for cricket matches. These endpoints return structured data designed for rendering charts and graphs.

Endpoints

Worm Chart

GET /v5/cricket/{project_key}/match/{match_key}/worm/

Cumulative run progression over time — the classic "worm" chart comparing two innings.

Manhattan Chart

GET /v5/cricket/{project_key}/match/{match_key}/manhattan/

Over-by-over runs scored — bar chart showing runs per over (sometimes called "skyline").

Run Rate Chart

GET /v5/cricket/{project_key}/match/{match_key}/run-rate/

Required run rate vs actual run rate progression.

Wagon Zone (Batter)

GET /v5/cricket/{project_key}/match/{match_key}/innings/{innings_key}/wagon-zone/

Wagon Zone (Bowler)

GET /v5/cricket/{project_key}/match/{match_key}/innings/{innings_key}/wagon-zone/bowlers/

Batting/bowling zone analysis — runs scored and conceded in specific ground zones. Requires innings_key (e.g., a_1).

Headers (all endpoints)

rs-token: <access_token>

Sample Request (Node.js)

// Worm data
const response = await axios.get(
`https://api.sports.roanuz.com/v5/cricket/${projectKey}/match/${matchKey}/worm/`,
{ headers: { 'rs-token': token } }
);

// Manhattan data
const response = await axios.get(
`https://api.sports.roanuz.com/v5/cricket/${projectKey}/match/${matchKey}/manhattan/`,
{ headers: { 'rs-token': token } }
);

// Run rate data
const response = await axios.get(
`https://api.sports.roanuz.com/v5/cricket/${projectKey}/match/${matchKey}/run-rate/`,
{ headers: { 'rs-token': token } }
);

// Wagon zone data (batter)
const inningsKey = 'a_1'; // team A, innings 1
const response = await axios.get(
`https://api.sports.roanuz.com/v5/cricket/${projectKey}/match/${matchKey}/innings/${inningsKey}/wagon-zone/`,
{ headers: { 'rs-token': token } }
);

Response Structures

Worm

Data points for each ball/over with cumulative runs:

{
"innings": {
"a_1": [
{ "over": 1, "runs": 8 },
{ "over": 2, "runs": 15 },
...
],
"b_1": [...]
}
}

Manhattan

Runs per over as bar chart data:

{
"innings": {
"a_1": [
{ "over": 1, "runs": 8, "wickets": 0 },
{ "over": 2, "runs": 12, "wickets": 1 },
...
]
}
}

Run Rate

Current and required run rates:

{
"current_run_rate": 8.5,
"required_run_rate": 10.2,
"progression": [
{ "over": 1, "current_rr": 8.0, "required_rr": 9.3 },
...
]
}

Wagon Zone

Shot distribution by zone:

{
"zones": {
"fine_leg": { "runs": 24, "shots": 8 },
"square_leg": { "runs": 18, "shots": 6 },
"mid_wicket": { "runs": 32, "shots": 10 },
"long_on": { "runs": 28, "shots": 7 },
"long_off": { "runs": 15, "shots": 5 },
"cover": { "runs": 22, "shots": 8 },
"point": { "runs": 12, "shots": 4 },
"third_man": { "runs": 10, "shots": 3 }
}
}

Hannibal Usage

Not currently used. High value for:

  • Live match UI — Worm chart, Manhattan chart in match dashboard
  • AI analysis — Run rate trends for session betting predictions
  • Wagon zone — Player weakness/strength analysis for AI commentary
  • Momentum tracking — Real-time momentum indicators from worm/run-rate data