# Ittf — 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 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. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-ittf-com-api-415ec7ad/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## 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.paywithlocus.com/api/wrapped/parse-ittf-com-api-415ec7ad/get_event_results \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-ittf-com-api-415ec7ad/get_events \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-ittf-com-api-415ec7ad/get_featured_players \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-ittf-com-api-415ec7ad/get_player_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-ittf-com-api-415ec7ad/get_rankings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category":"<string>"}'
```
