# Totalcorner — 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.

> Access live match results, upcoming schedules, and detailed match statistics focused on corner kicks to analyze team performance and rankings. Track corner trends across matches and identify top-performing teams based on corner statistics.

**Category:** Sports | **Website:** [totalcorner.com/](https://totalcorner.com/) | **Docs:** [parse.bot/marketplace/9b3fe914-8c16-4082-884a-d7a6c6848698/totalcorner-com-api](https://parse.bot/marketplace/9b3fe914-8c16-4082-884a-d7a6c6848698/totalcorner-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/totalcorner/`
**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 match details

Get detailed match history and analysis including first-half goals statistics. Returns historical match data for both the home and away teams of the specified match. The history includes scores and corner counts for recent matches played by those teams. Requires both a match slug and match_id obtained from get_today_matches or get_schedule.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `match_id` | string | Yes | Match ID from match listing. Available in match_id field from get_today_matches or get_schedule. |
| `slug` | string | Yes | Match slug from match listing (e.g. 'Saudi-Arabia-vs-Senegal'). Available in match_slug field from get_today_matches or get_schedule. |

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

### Get schedule

Get full match schedule for the day including completed and upcoming matches across all leagues. Returns the same shape as get_today_matches but scoped to the full schedule view which may include recently completed matches not shown in the live today view.

**Estimated cost:** Metered

_No parameters required._

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

### Get today matches

Get today's football match list with scores and corners. Returns all matches for the current day including live, completed, and upcoming matches. Each match includes league context, team names, full-time and half-time corner counts, and identifiers (match_id, match_slug) usable for drill-down via get_match_details.

**Estimated cost:** Metered

_No parameters required._

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

### Get top teams by corners

Get top teams ranked by corner statistics in a specific league. Returns up to 10 teams sorted by average corners gained. Each team entry includes total corners won and lost, averages, and games played.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `league_id` | string | No | League ID. Confirmed working values: '1' (England Premier League), '2' (Spain La Liga). Some league IDs may have no stats available. |

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

## 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.