# Tennisexplorer — 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 comprehensive tennis data from TennisExplorer, including player profiles, ATP rankings, tournament schedules, and today's match listings across ATP and WTA tours at all competition levels.

**Category:** Sports | **Website:** [tennisexplorer.com/](https://tennisexplorer.com/) | **Docs:** [parse.bot/marketplace/6dd60344-63ab-4965-b941-dfcfde3ce4bd/tennisexplorer-com-api](https://parse.bot/marketplace/6dd60344-63ab-4965-b941-dfcfde3ce4bd/tennisexplorer-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-tennisexplorer-com-api-6dd60344/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_atp_lower_level_tournaments

Fetch the three ATP lower-level tournaments with the fewest scheduled matches this week. Useful for identifying smaller events. Returns up to 3 tournaments sorted by ascending match count.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-tennisexplorer-com-api-6dd60344/get_atp_lower_level_tournaments \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_atp_main_tournaments

Fetch ATP main-level tournaments for the current week. Returns a list of tournaments with name, URL, and match count.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-tennisexplorer-com-api-6dd60344/get_atp_main_tournaments \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_atp_rankings

Fetch the current ATP men's singles rankings (top 50 players). Each entry includes rank, player name, country, points, and slug for profile lookup.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-tennisexplorer-com-api-6dd60344/get_atp_rankings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_player_profile

Fetch detailed profile information for a player by slug. Returns the player's name, country, birthdate, and list of upcoming/recent matches (may be empty if none scheduled). The slug is obtainable from search_player or get_atp_rankings results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `slug` | string | Yes | Player slug from the URL path, e.g. 'djokovic', 'sinner-8b8e8', 'alcaraz-5ab70'. Obtainable from search_player or get_atp_rankings. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-tennisexplorer-com-api-6dd60344/get_player_profile \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"slug":"<string>"}'
```

### get_today_matches

Fetch all matches scheduled for today. Optionally filter by tour type. Each match includes the tournament name, scheduled time, and player names.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `tour_type` | string | No | Filter by tour type. Accepted values: 'atp-single', 'wta-single', 'atp-double', 'wta-double'. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-tennisexplorer-com-api-6dd60344/get_today_matches \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tour_type":"<string>"}'
```

### get_weekly_tournaments

Fetch all tournaments scheduled for the current week, categorized by tour (ATP/WTA) and level (Main/Lower). Returns a single schedule object with four arrays. Each tournament entry includes the name, URL, and number of scheduled matches.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-tennisexplorer-com-api-6dd60344/get_weekly_tournaments \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### search_player

Search for players by name. Returns matching player names, profile URLs, and slugs. The slug can be passed to get_player_profile for full details.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Player name to search for (e.g. 'Djokovic', 'Sinner'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-tennisexplorer-com-api-6dd60344/search_player \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```
