canonical: https://jentic.com/apis/haloapi.com/haloapi-stats

# Haloapi Stats

The Halo Stats API exposes player and match statistics from Halo 5: Guardians and Halo Wars 2 across arena, warzone, custom, and campaign game modes. It returns match results, player service records, leaderboards, company data, and per-match event timelines suitable for tracker sites, esports tooling, and community dashboards. Authentication uses an Ocp-Apim-Subscription-Key header issued by the Halo developer portal. The API covers 28 read-only endpoints scoped to the Halo 5 and Halo Wars 2 titles only.

## For AI agents

Look up Halo 5 and Halo Wars 2 player stats, match results, leaderboards, and service records using a developer subscription key.

## Scope

Does not handle matchmaking, game purchases, or Halo Infinite stats - use for read-only Halo 5 and Halo Wars 2 statistics only.

## Capabilities

- Retrieve Halo 5 arena, warzone, custom, and campaign match results by match ID
- Pull a player's match history across Halo 5, Halo 5 PC, and Halo Wars 2
- Read player service records broken down by arena, warzone, custom, and campaign modes
- Fetch player and company commendation progress for Halo 5
- Query CSR season leaderboards for a given playlist
- Access per-match event timelines for replay and analysis tooling

## Use cases

### Halo Stats Tracker Dashboard

Build a community stats site that displays a player's recent Halo 5 matches, win rates, and CSR rank using the player match history and service record endpoints. The Halo Stats API returns JSON for each match and aggregated service records per game mode, so a dashboard can update on demand without scraping. Each subscription key is rate limited by the Halo developer portal.

Example prompt: Fetch the last 25 matches for player gamertag 'AgentSmith' from `/h5/players/AgentSmith/matches` and summarise wins and losses per playlist.

### Esports Match Replay Analysis

Pull per-match event timelines from `/h5/matches/{matchId}/events` to reconstruct kill, death, and objective events for esports analysts and casters. Combined with `/h5/arena/matches/{matchId}` this gives a complete picture of a competitive match without parsing game film. Coverage is limited to Halo 5 arena and supported playlists.

Example prompt: Retrieve match events for Halo 5 match ID 'abc-123' and produce a chronological list of kills with weapon and victim.

### Spartan Company Recruitment

Use `/h5/companies/{companyId}` and `/h5/companies/{companyId}/commendations` to surface a Halo 5 Spartan Company's roster and commendation progress on a recruitment page. The endpoints return member rosters and aggregate achievement data so prospective members can evaluate company activity. Data is read-only and cached short-term by the upstream service.

Example prompt: Get company commendations for company ID '00000000-0000-0000-0000-000000000001' and rank members by total commendation score.

### AI Agent Halo Lookup Tool

Expose Halo player and match lookups as agent tools so an assistant can answer questions like 'how did I do in my last warzone match' or 'what's my arena CSR'. Through Jentic, the agent calls `/h5/players/{player}/matches` and `/h5/servicerecords/arena` with credentials kept in your Jentic One instance. The Stats API is read-only, so agents cannot modify game data.

Example prompt: When a user asks 'how am I doing in arena', call `/h5/servicerecords/arena` for their gamertag and report KDR, win rate, and current CSR.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/h5/players/{player}/matches` | Halo 5 player match history |
| GET | `/h5/arena/matches/{matchId}` | Halo 5 arena match result |
| GET | `/h5/warzone/matches/{matchId}` | Halo 5 warzone match result |
| GET | `/h5/servicerecords/arena` | Halo 5 arena service records |
| GET | `/h5/matches/{matchId}/events` | Halo 5 per-match event timeline |
| GET | `/h5/player-leaderboards/csr/{seasonId}/{playlistId}` | Halo 5 CSR leaderboard |
| GET | `/hw2/matches/{matchId}` | Halo Wars 2 match result |

## Key resources

- **Matches** — Per-mode match results for Halo 5 (arena, warzone, custom, campaign) and Halo Wars 2
- **Service Records** — Aggregate player stats per game mode
- **Players** — Player match history and commendation progress
- **Companies** — Spartan Company rosters and commendations
- **Leaderboards** — CSR leaderboards by season and playlist

## Why Jentic

- **Setup:** Wiring the Halo Stats API by hand means setting its Ocp-Apim-Subscription-Key header on every call and building each Halo 5 and Halo Wars 2 statistics request yourself. Through Jentic you install once, import the Halo Stats API from the API Directory, store the subscription key once, and your agent calls it.
- **Permission scoping:** The Halo Stats API is read-only, covering Halo 5 and Halo Wars 2 statistics, so scope your agent to the operations it needs, such as reading a player's match history or a service record. You choose what it may call, and there are no write operations for it to reach.
- **Credential handling:** Your Halo Ocp-Apim-Subscription-Key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'get a halo 5 player match history' or 'get match events', and Jentic returns the matching operation with its input schema so the agent calls the right endpoint without crawling the Halo developer portal docs.

## Related APIs

- **Twitch API** — Twitch streams and clips alongside Halo match data for esports overlays.
- **Steam Web API** — Player stats and game data for Steam titles when the user plays non-Halo games.
- **RAWG Video Games Database** — Game metadata, screenshots, and reviews for catalog enrichment around Halo titles.

## FAQ

### What authentication does the Halo Stats API use?

The Halo Stats API uses an API key in the Ocp-Apim-Subscription-Key header (or a subscription-key query parameter) issued by the Halo developer portal. Through Jentic the key is stored in the encrypted vault and injected per request, so it never enters the agent's prompt context.

### Can I retrieve a player's match history with the Halo Stats API?

Yes. Call GET `/h5/players/{player}/matches` with the player's gamertag to retrieve their Halo 5 match history. For Halo 5 PC use `/h5pc/players/{player}/matches.` Both endpoints return paginated match summaries that you can join against the per-match endpoints for detailed results.

### What are the rate limits for the Halo Stats API?

Rate limits are tied to the developer portal subscription tier (typically 10 requests per second on the standard tier). The API does not return retry-after headers, so clients should back off on HTTP 429 responses. Limits are per subscription key, not per endpoint.

### How do I get a Halo 5 match result through Jentic?

Search Jentic for 'get halo 5 match result', load the schema for GET `/h5/arena/matches/{matchId}` (or the warzone, custom, or campaign variant), then execute with the matchId. Run pip install jentic and use the async client.search, client.load, and client.execute pattern.

### Does the Halo Stats API cover Halo Infinite?

No. This spec covers Halo 5: Guardians, Halo 5 PC, and Halo Wars 2 only. Halo Infinite stats are served by a separate, unofficial waypoint endpoint that is not part of this OpenAPI spec.

### Is the Halo Stats API free to use?

The Halo developer portal offered free subscription tiers for community sites, though new sign-ups have been restricted at various points. Existing keys continue to work for Halo 5 and Halo Wars 2 data. Check the Halo developer portal for current availability before building.

### Can I limit what my agent is allowed to do with the Halo Stats API?

Yes. Because you run Jentic One yourself, your own rules decide which Halo Stats operations and credentials the agent may use, so you can allow only the endpoints it needs, such as GET `/h5/players/{player}/matches` for match history or `/h5/servicerecords/arena` for a service record. The Halo Stats API is entirely read-only for Halo 5 and Halo Wars 2, so there are no write operations for the agent to reach and it cannot modify game data. Your Ocp-Apim-Subscription-Key is stored once by your own instance and injected at execution time, so it never enters the agent's prompt or context.
