# Ittf — 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 official World Table Tennis player statistics, match results, and event data to track tournament outcomes, compare player rankings, and explore international competition details. Search player profiles, browse featured athletes, and review results from global table tennis events.

**Category:** Sports | **Website:** [ittf.com/](https://ittf.com/) | **Docs:** [parse.bot/marketplace/415ec7ad-2f20-4d4d-88a3-42ba6ff2f986/ittf-com-api](https://parse.bot/marketplace/415ec7ad-2f20-4d4d-88a3-42ba6ff2f986/ittf-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/ittf/`
**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 event results

Fetch official match results and scores for a specific event ID. Returns up to 10 recent official results including game scores, player names, match duration, and venue. Only events that have completed matches will return data; events that have not yet started will return input_not_found.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `event_id` | string | Yes | The unique numeric event ID (e.g. '3231' for WTT Champions Doha 2026). Obtainable from get_events results via EventId field. |

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

### Get events

Fetch the world table tennis event calendar for a specific year. Returns all scheduled and completed events including name, dates, location, and event type. A single request returns the full year's calendar (100+ events); no pagination needed.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `year` | integer | No | The calendar year to fetch events for. |

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

### Get featured players

Fetch featured players with current world rankings, ranking points, player bio data, and season statistics. Returns a curated list of players currently highlighted by WTT, including their detailed PlayerData (bio) and StatsData (season performance).

**Estimated cost:** Metered

_No parameters required._

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

### Get player details

Fetch detailed player bio and technical profile by their official ITTF ID. Returns handedness, grip style, country, age, date of birth, and headshot URLs. The ITTF ID can be discovered from get_featured_players or from match result competitor data.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `ittf_id` | string | Yes | The official ITTF ID of the player (e.g. '102891'). |

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

### Get rankings

Fetch the ITTF world ranking table for a specific category. Returns ranked players with position, name, association/country, points, and ranking changes. A single request returns the full ranking list (typically 100 players); no pagination needed.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category` | string | No | The ranking category to fetch. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/ittf/get-rankings \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"category":"<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.