# Crex — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Get live cricket scores, detailed scorecards, ball-by-ball commentary, tournament fixtures, ICC rankings, and the latest cricket news in real-time. Access match information across teams, players, and formats with reliable, low-latency data.

**Category:** Sports | **Website:** [crex.com/](https://crex.com/) | **Docs:** [parse.bot/marketplace/83359220-7a08-4a6b-bd1f-d2aab1d9484e/crex-com-api](https://parse.bot/marketplace/83359220-7a08-4a6b-bd1f-d2aab1d9484e/crex-com-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/credits/crex/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Get fixtures

Returns scheduled and recently completed cricket fixtures grouped by date. Each fixture includes team IDs, resolved team and series names, scores, and match metadata. Results are paginated by page number (0-indexed). Includes matches across all formats.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number (0-indexed) for pagination. |
| `wise` | string | No | Grouping mode. Only '1' (group by date) is supported. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/crex/get-fixtures \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","wise":"<string>"}'
```

### Get live matches

Returns all currently live and recently completed cricket matches, including team names, current scores, match status, tournament/series name, venue, and match timestamps. Results reflect real-time state and include matches from all formats (T20, ODI, Test, T20I). No filtering or pagination — the full set of active matches is returned in one call.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/crex/get-live-matches \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get match info

Returns match metadata including venue stats, head-to-head records, weather information, playing XIs, and toss details. Fields use encoded formats with custom delimiters. Weather data is in the 'wU' key with sub-keys for condition (wC), temperature (crT), wind speed (wS), and humidity (hum). Venue averages at various over marks are in 'va'.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `match_id` | string | Yes | The match ID, obtainable from get_live_matches or get_fixtures (e.g. '1238'). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/crex/get-match-info \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"match_id":"<string>"}'
```

### Get match live commentary

Returns ball-by-ball commentary for a match. Supports pagination via last_doc_id to fetch older commentary entries. Response includes mixed event types: 'b' for ball, 'o' for over summary, 'w' for wicket, 'tm' for team milestone, 'dh' for day header, 'wc' for win confirmation. Each event has a unique integer 'id' which can be passed as last_doc_id for the next page.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `last_doc_id` | string | No | Last document ID from a previous response for pagination to fetch older commentary entries. |
| `match_id` | string | Yes | The match ID, obtainable from get_live_matches or get_fixtures (e.g. '1238'). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/crex/get-match-live-commentary \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"last_doc_id":"<string>","match_id":"<string>"}'
```

### Get match scorecard

Returns the full scorecard for a given match, including batting and bowling stats for each innings. Player names are resolved from internal IDs. Each innings entry contains the batting team name, total score, extras breakdown, and arrays of individual player batting and bowling records.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `match_id` | string | Yes | The match ID, obtainable from get_live_matches or get_fixtures (e.g. '1238'). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/crex/get-match-scorecard \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"match_id":"<string>"}'
```

### Get news list

Returns the latest cricket news articles with pagination support. Each article includes headline, excerpt, cover image URL, tags, and optional attached match info. Articles cover match previews, analysis, squad announcements, and pitch/weather reports.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Number of articles per page. |
| `page` | integer | No | Page number for pagination (1-indexed). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/crex/get-news-list \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","page":"<integer>"}'
```

### Get rankings

Returns ICC team rankings for Test, ODI, and T20 formats. Each format's array contains teams ordered by rank with resolved team names, rating points, and number of matches played. All three formats are always returned together.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/crex/get-rankings \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

## Next steps

- [All wrapped API providers](https://beta.paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://beta.paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://beta.paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://beta.paywithlocus.com/agent/index.md): every Locus agent page.