Lorenzo Sonego
Current rank #32 ATP
#32
API Reference

Baseline Rank API

Built for agencies who manage dozens of player sites. Use a single API key to keep every profile current, whether you deploy static pages or a headless CMS.

Base URL https://api.baselinerank.com
Auth Bearer token (org scoped)
Format JSON
Rate limit 600 req/min
Works with static sites, serverless routes, or any backend.

Quickstart

Paste a key, call the endpoint, and render the response in your player page.

1. Authenticate
Header
Authorization: Bearer {API_KEY}

Keys are scoped to your organization and roster.

2. Fetch a player
curl
curl -H "Authorization: Bearer {API_KEY}" \
https://api.baselinerank.com/players/a0e2

Drop this into a build step or a serverless function.

3. Render in your UI
Response
{
  "data": {
    "atp_id": "a0e2",
    "name_short": "C. Alcaraz",
    "country": "Spain",
    "rank": 1,
    "points": 13550,
    "coach": "Samuel Lopez",
    "career_titles": 26
  }
}

Wrap in your player page template and you're done.

Endpoints

All endpoints require Authorization: Bearer <API_KEY>.

GET /players/{atpId}

Returns player details and current rank. Use the ATP player ID as the path parameter.

Auth required Returns JSON Cached 10 min
Parameters
atpId string ATP player ID, e.g. a0e2 (Alcaraz) or s0ag (Sinner).
Request
curl -H "Authorization: Bearer <API_KEY>" \
  https://api.baselinerank.com/players/a0e2
Response 200
{
  "data": {
    "atp_id": "a0e2",
    "name_short": "C. Alcaraz",
    "country": "Spain",
    "dob": "2003-05-05",
    "height_cm": 183,
    "weight_kg": 74,
    "plays": "Right-Handed, Two-Handed Backhand",
    "coach": "Samuel Lopez",
    "turned_pro": 2018,
    "rank": 1,
    "points": 13550,
    "movement": 0,
    "tournaments_played": 17,
    "career_high_rank": 1,
    "career_wins": 292,
    "career_losses": 65,
    "career_titles": 26,
    "ytd_prize_money": "$3,301,730",
    "career_prize_money": "$63,333,776",
    "scraped_at": "2026-03-03T21:03:09Z"
  }
}
Response 404
{
  "error": "Player not found"
}
GET /players/{atpId}/ranking/history

Weekly ranking snapshots for a player, newest first. Supports both singles and doubles. Ideal for charting rank progression over a season or career.

Auth required Returns JSON Up to 500 rows
Parameters
atpId string ATP player ID (path), e.g. su87 (Sonego).
type string Ranking type: singles (default) or doubles. Query param.
limit integer Max rows returned. Default 100, max 500. Query param.
Request
curl -H "Authorization: Bearer <API_KEY>" \
  "https://api.baselinerank.com/players/su87/ranking/history?limit=52"
Response 200
{
  "data": {
    "atpId": "su87",
    "type": "singles",
    "history": [
      { "date": "2026-03-02", "rank": 64 },
      { "date": "2026-02-23", "rank": 65 },
      { "date": "2026-02-16", "rank": 60 },
      { "date": "2026-02-09", "rank": 60 },
      { "date": "2026-02-02", "rank": 40 },
      { "date": "2026-01-19", "rank": 40 }
    ]
  }
}
Response 404
{
  "error": "Player not found"
}
GET /v1/rosters/{agencyId}/rankings

Returns rankings for all players in a roster in a single response.

Batch response Daily updatedAt Roster scoped
Parameters
agencyId string Organization slug from your dashboard.
Request
curl -H "Authorization: Bearer <API_KEY>" \
  https://api.baselinerank.com/v1/rosters/acme/rankings
Response 200
{
  "agency": "Baseline Sports Group",
  "updatedAt": "2026-02-23",
  "players": [
    { "name": "Coco Gauff", "rank": 3, "trend": 1 },
    { "name": "Carlos Alcaraz", "rank": 2, "trend": 0 }
  ]
}
POST /v1/webhooks/rank-change

Register a webhook to receive events when a player’s rank changes.

Agency tier+ Webhook events JSON payload
Body
events array List of event keys, e.g. rank.updated.
callbackUrl string Your HTTPS endpoint to receive webhooks.
Request body
{
  "events": ["rank.updated"],
  "callbackUrl": "https://yoursite.com/hooks/rank"
}
Live sample
Updated today
JSON
{
  "data": {
    "atp_id": "a0e2",
    "name_short": "C. Alcaraz",
    "country": "Spain",
    "dob": "2003-05-05",
    "height_cm": 183,
    "weight_kg": 74,
    "plays": "Right-Handed, Two-Handed Backhand",
    "coach": "Samuel Lopez",
    "turned_pro": 2018,
    "rank": 1,
    "points": 13550,
    "movement": 0,
    "tournaments_played": 17,
    "career_high_rank": 1,
    "career_wins": 292,
    "career_losses": 65,
    "career_titles": 26,
    "ytd_prize_money": "$3,301,730",
    "career_prize_money": "$63,333,776",
    "scraped_at": "2026-03-03T21:03:09Z"
  }
}

Reference

Authentication, rate limits, errors, and SDKs.

Authentication

Use Bearer tokens for server or client-side requests.

Header
Authorization: Bearer {API_KEY}

Rate limits

Default: 600 requests / minute per key.

Headers
X-RateLimit-Limit: 600
X-RateLimit-Remaining: 542

Error handling

Structured errors with consistent status codes.

Example
{
  "error": "not_found",
  "message": "Player ID not recognized"
}

SDKs Coming soon

Native clients for JavaScript and Python are in development. Until then, the API is fully usable with fetch, curl, or any HTTP client.

JS — fetch example
const res = await fetch(
  "https://api.baselinerank.com/players/a0e2",
  { headers: { Authorization: "Bearer " + API_KEY } }
);
const { data } = await res.json();

Response schema

Field definitions for /players/{atpId}.

Field Type Description
atp_id string ATP player ID, e.g. a0e2.
name_short string Display name, e.g. C. Alcaraz.
country string Nationality, e.g. Spain.
dob date Date of birth, ISO 8601.
height_cm integer Height in centimetres.
weight_kg integer Weight in kilograms.
plays string Handedness and backhand style.
coach string Current coach name.
turned_pro integer Year the player turned professional.
rank integer Current official singles rank.
points integer Current ranking points.
movement integer Rank change since last update. Positive = gained places.
tournaments_played integer Tournaments played in the current ranking period.
career_high_rank integer Best singles rank ever achieved.
career_wins integer Total career match wins.
career_losses integer Total career match losses.
career_titles integer Number of ATP titles won.
ytd_prize_money string Year-to-date prize money, e.g. $3,301,730.
career_prize_money string Total career prize money.
scraped_at datetime Timestamp of last data refresh, ISO 8601.

Ranking history schema

Field definitions for /players/{atpId}/ranking/history.

Field Type Description
atpId string The ATP player ID echoed from the request.
type string singles or doubles.
history[].date date Week ending date, ISO 8601, e.g. 2026-03-02.
history[].rank integer Official ATP rank on that date.

Error codes

  • not_found — Player ID is not recognized.
  • unauthorized — Missing or invalid API key.
  • rate_limited — Too many requests in a short window.
  • invalid_request — Malformed parameters.

Versioning

The API is versioned under /v1. Future versions will ship behind a new base path. Breaking changes will be announced in the changelog with a deprecation window before removal.

Use cases for agency teams

Keep every player surface accurate without a content rewrite.

Most common
01

Player microsites

Embed live rankings on every player profile without redeploys.

Static-site friendly Auto refresh daily
02

Agency dashboards

Track every athlete in a roster view.

03

Sponsor reports

Export rank history for partner updates.

04

Press kits

Embed live rankings into media pages.

05

Official data, no manual updates

Daily refresh directly from the official tour tables.

06

Built for scale

One key supports dozens or hundreds of player sites.

07

Clear audit trail

Every response includes the publish date.

Roster tiers

Plans tuned to player volume and support requirements.

Starter

Up to 10 players

Email support, shared infrastructure.

Enterprise

Unlimited players

Dedicated support and custom SLA.

FAQ

Everything you need before connecting player sites.

How often are rankings updated?

Daily, directly from official ATP and WTA rankings tables.

Can I request multiple players at once?

Yes, the roster endpoint returns all players in one response.

Do you offer webhooks?

Rank-change webhooks are available on Agency and Enterprise tiers.

Is the data official?

Yes, the dataset is sourced daily from official tour tables.

Changelog

API and documentation updates.

2026-02-27 Docs refresh: Swagger-style layout, parameter tables, and copy buttons.
2026-02-23 v1 launched with Bearer auth, JSON responses, and roster endpoints.

API status

Current status of Baseline Rank API services.

All systems operational

Last checked just now. View status page