# Totalcorner — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://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. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-totalcorner-com-api-9b3fe914/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## 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.paywithlocus.com/api/wrapped/parse-totalcorner-com-api-9b3fe914/get_match_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-totalcorner-com-api-9b3fe914/get_schedule \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-totalcorner-com-api-9b3fe914/get_today_matches \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-totalcorner-com-api-9b3fe914/get_top_teams_by_corners \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"league_id":"<string>"}'
```
