Endpoints
All endpoints require Authorization: Bearer <API_KEY>.
curl -H "Authorization: Bearer <API_KEY>" \
https://api.baselinerank.com/me
{
"org": "Acme Tennis Agency",
"plan": "starter",
"rate_limit_per_minute": 600,
"usage": {
"this_month": 1842,
"today": 47
},
"top_endpoints": [
{ "path": "/players/a0e2", "count": "312" },
{ "path": "/rankings", "count": "204" }
],
"key_created_at": "2026-03-01T10:00:00Z",
"last_used_at": "2026-04-05T08:22:11Z",
"renewal_date": "2026-05-01"
}
curl -H "Authorization: Bearer <API_KEY>" \
"https://api.baselinerank.com/rankings?limit=10"
{
"data": [
{ "atp_id": "s0ag", "name_short": "J. Sinner", "country": "Italy", "rank": 1, "points": 11330, "movement": 0 },
{ "atp_id": "a0e2", "name_short": "C. Alcaraz", "country": "Spain", "rank": 2, "points": 9160, "movement": 1 },
{ "atp_id": "z355", "name_short": "N. Djokovic","country": "Serbia", "rank": 3, "points": 7720, "movement": -1 }
],
"meta": { "count": 3, "type": "singles", "updated_at": "2026-04-01" }
}
curl -H "Authorization: Bearer <API_KEY>" \
https://api.baselinerank.com/rankings/doubles
{
"data": [
{ "atp_id": "b705", "name_short": "R. Bopanna", "country": "India", "rank": 1, "updated_at": "2026-04-01" },
{ "atp_id": "g850", "name_short": "M. Granollers","country": "Spain", "rank": 2, "updated_at": "2026-04-01" }
],
"meta": { "count": 2, "type": "doubles", "updated_at": "2026-04-01" }
}
curl -H "Authorization: Bearer <API_KEY>" \
"https://api.baselinerank.com/players?search=sinner"
{
"data": [
{ "atp_id": "s0ag", "name_short": "J. Sinner", "country": "Italy", "rank": 1 }
],
"meta": { "page": 1, "limit": 50, "total": 1 }
}
curl -H "Authorization: Bearer <API_KEY>" \
https://api.baselinerank.com/players/a0e2
{
"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": 2,
"points": 9160,
"movement": 1,
"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-04-01T06:00:00Z"
}
}
{
"error": "Player not found"
}
curl -H "Authorization: Bearer <API_KEY>" \
https://api.baselinerank.com/players/su87/ranking
{
"data": {
"rank": 64,
"updated_at": "2026-04-01"
}
}
curl -H "Authorization: Bearer <API_KEY>" \
"https://api.baselinerank.com/players/su87/ranking/history?limit=52"
{
"data": {
"atpId": "su87",
"type": "singles",
"history": [
{ "date": "2026-04-01", "rank": 64 },
{ "date": "2026-03-25", "rank": 65 },
{ "date": "2026-03-18", "rank": 62 },
{ "date": "2026-03-11", "rank": 60 },
{ "date": "2026-03-04", "rank": 60 },
{ "date": "2026-02-25", "rank": 40 }
]
}
}
{
"error": "Player not found"
}
curl -X POST \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-d '{"url":"https://yoursite.com/hooks/rankings"}' \
https://api.baselinerank.com/webhook/register
{
"webhook_url": "https://yoursite.com/hooks/rankings",
"webhook_secret": "whsec_br_a3f8...",
"message": "Webhook registered. Store the secret — it won't be shown again."
}
curl -X DELETE \
-H "Authorization: Bearer <API_KEY>" \
https://api.baselinerank.com/webhook/register
{
"message": "Webhook disabled."
}
{
"data": {
"atp_id": "s0ag",
"name_short": "J. Sinner",
"country": "Italy",
"dob": "2001-08-16",
"height_cm": 188,
"weight_kg": 76,
"plays": "Right-Handed, Two-Handed Backhand",
"coach": "Simone Vagnozzi",
"turned_pro": 2018,
"rank": 1,
"points": 11330,
"movement": 0,
"tournaments_played": 14,
"career_high_rank": 1,
"career_wins": 248,
"career_losses": 67,
"career_titles": 21,
"ytd_prize_money": "$5,765,082",
"career_prize_money": "$44,291,976",
"scraped_at": "2026-04-01T06:00:00Z"
}
}
Search by player name — select one to get a live response from the API.
// Search for a player above to get a live response
Reference
Authentication, rate limits, errors, and SDKs.
Authentication
Use Bearer tokens for server or client-side requests.
Authorization: Bearer {API_KEY}
Rate limits
Default: 600 requests / minute per key.
X-RateLimit-Limit: 600
X-RateLimit-Remaining: 542
Error handling
Structured errors with consistent status codes.
{
"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.
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}.
a0e2.
C. Alcaraz.
Spain.
$3,301,730.
Ranking history schema
Field definitions for /players/{atpId}/ranking/history.
singles or doubles.
2026-03-02.
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.
Webhook payload
Sent every Monday to your registered endpoint. Verify authenticity using X-Baseline-Signature.
rankings.updated.
singles.
const sig = req.headers['x-baseline-signature'];
const expected = 'sha256=' + crypto
.createHmac('sha256', WEBHOOK_SECRET)
.update(rawBody)
.digest('hex');
if (sig !== expected) return res.status(401).end();
Versioning
The API is currently unversioned at /. Future breaking changes will be
announced in the changelog with a deprecation window before removal.