You need tournament dates, surfaces and locations for a tennis calendar, but collecting them by hand makes the schedule hard to maintain. By the end of this guide, you can request an ATP tournament calendar, inspect the returned fields and turn the timestamps into dates for your application.
What the tennis calendar endpoint returns
Zyla API Hub provides access to FlashScore - Live API, including the Get Tennis Tournament Calendar endpoint. The supplied ATP example returns an array of tournaments with names, surfaces, country information, start and end timestamps, and winner details.
That data can support a tournament calendar page, a tennis news dashboard or an internal planning tool. The response also contains relative tournament and player paths; treat those as paths rather than complete URLs.
Getting started on Zyla API Hub
Open the FlashScore - Live API marketplace page, create a free account if you do not have one, and select Subscribe or Start Free Trial when available. Get your API key and send it in the Authorization: Bearer YOUR_API_KEY header.
Zyla API Hub uses subscriptions and quotas rather than pay-per-call billing. For a first API, the stated trial is seven days or 50 requests; check the API page for current access options and pricing.
Request the ATP tournament calendar
Get Tennis Tournament Calendar uses GET at the following Hub URL:
https://zylalabs.com/api/12518/flashscore-live-api/40630/get-tennis-tournament-calendar
The official request uses the query parameter type=atp. Replace YOUR_API_KEY with your key before running it:
curl -s -X GET "https://zylalabs.com/api/12518/flashscore-live-api/40630/get-tennis-tournament-calendar?type=atp" \
-H "Authorization: Bearer YOUR_API_KEY"
Read the response
The official response excerpt starts as follows. It is truncated during the Australian Open entry, so the excerpt itself is not a complete JSON document; parse the full response returned by the API instead.
[
{
"name": "Brisbane ATP",
"surface": "hard",
"tournament_url": "/tennis/atp-singles/brisbane/",
"start_timestamp": 1767510600,
"end_timestamp": 1768104000,
"country": {
"country_id": 24,
"name": "Australia"
},
"winner": {
"player_id": "O8qG0Nhb",
"name": "Medvedev Daniil",
"player_url": "/player/medvedev-daniil/O8qG0Nhb/",
"country": {
"country_id": 8,
"name": "World"
}
}
},
{
"name": "Hong Kong ATP",
"surface": "hard",
"tournament_url": "/tennis/atp-singles/hong-kong/",
"start_timestamp": 1767591600,
"end_timestamp": 1768111200,
"country": {
"country_id": 222,
"name": "Hong Kong"
},
"winner": {
"player_id": "t0WN9vR6",
"name": "Bublik Alexander",
"player_url": "/player/bublik-alexander/t0WN9vR6/",
"country": {
"country_id": 102,
"name": "Kazakhstan"
}
}
},
{
"name": "Auckland ATP",
"surface": "hard",
"tournament_url": "/tennis/atp-singles/auckland/",
"start_timestamp": 1768171200,
"end_timestamp": 1768618800,
"country": {
"country_id": 140,
"name": "New Zealand"
},
"winner": {
"player_id": "UFj257G8",
"name": "Mensik Jakub",
"player_url": "/player/mensik-jakub/UFj257G8/",
"country": {
"country_id": 62,
"name": "Czech Republic"
}
}
},
{
"name": "Adelaide ATP",
"surface": "hard",
"tournament_url": "/tennis/atp-singles/adelaide/",
"start_timestamp": 1768191300,
"end_timestamp": 1768618800,
"country": {
"country_id": 24,
"name": "Australia"
},
"winner": {
"player_id": "S44E7UYr",
"name": "Machac Tomas",
"player_url": "/player/machac-tomas/S44E7UYr/",
"country": {
"country_id": 62,
"name": "Czech Republic"
}
}
},
{
"name": "Australian Open ATP",
"surface": "hard",
"tournament_url": "/tennis/atp-singles/australian-open/",
"start_timestamp": 1768694400,…
For a calendar row, use name, surface, country.name, start_timestamp and end_timestamp. The sample timestamps can be interpreted as Unix seconds; convert them to the timezone you want to display rather than treating the raw numbers as formatted dates.
The sample also includes a nested winner object. Keep tournament country and winner country separate: they describe different things. Do not assume that every tournament has winner data simply because the entries in this excerpt do.
Use the calendar in Python
This standard-library example calls the same endpoint with the same query parameter. Set an environment variable named YOUR_API_KEY to your Zyla API key, then run the script. It displays each tournament’s dates in UTC and tolerates missing country or winner objects.
import json
import os
from datetime import datetime, timezone
from urllib.request import Request, urlopen
url = (
"https://zylalabs.com/api/12518/flashscore-live-api/"
"40630/get-tennis-tournament-calendar?type=atp"
)
request = Request(
url,
headers={"Authorization": "Bearer " + os.environ["YOUR_API_KEY"]},
method="GET",
)
with urlopen(request, timeout=30) as response:
tournaments = json.load(response)
def utc_time(timestamp):
if timestamp is None:
return "Not available"
return datetime.fromtimestamp(timestamp, tz=timezone.utc).isoformat()
for tournament in tournaments:
country = tournament.get("country") or {}
winner = tournament.get("winner") or {}
print(tournament.get("name", "Unnamed tournament"))
print(" Surface:", tournament.get("surface", "Not available"))
print(" Country:", country.get("name", "Not available"))
print(" Start UTC:", utc_time(tournament.get("start_timestamp")))
print(" End UTC:", utc_time(tournament.get("end_timestamp")))
print(" Winner:", winner.get("name", "Not available"))
print(" Tournament path:", tournament.get("tournament_url", "Not available"))
For a production integration, handle request and JSON parsing failures at the boundary where you fetch the data. Keep the last successful calendar available to your application if a refresh fails, and choose a refresh interval that fits your subscription quota and freshness needs.
Build around the calendar
For a tournament list, sort or group entries using the returned start timestamp, then format the start and end times consistently for the viewer. Store the original timestamp as well as any formatted display value so a timezone change does not require another API request.
For a tennis dashboard, show the surface and tournament country alongside the date range. A winner name can be useful context, but the interface should still render a tournament when winner information is unavailable.
FlashScore - Live API also documents these separate sports endpoints. They are not substitutes for the tournament calendar:
- Get Player News:
GET https://zylalabs.com/api/12518/flashscore-live-api/40617/get-player-news. Requiresplayer_id; returns news articles with title, link, image, source and publication time. - Get Team News:
GET https://zylalabs.com/api/12518/flashscore-live-api/40618/get-team-news. Requiresteam_id; returns news articles about that team. - Get Team Winner Odds:
GET https://zylalabs.com/api/12518/flashscore-live-api/40619/get-team-winner-odds. Requiresteam_id;geo_ip_codeis optional. It returns a team’s tournament-winning odds by bookmaker.
Call from an AI agent
An MCP-compatible client, including Claude Code, Cursor or Windsurf, can connect to Zyla’s MCP endpoint at https://mcp.zylalabs.com/mcp?apikey=YOUR_API_KEY. Replace the placeholder with your key, then use the client to access the available API tools. See MCP for the entry point.
FAQ
How do I request an ATP tennis tournament calendar?
Call Get Tennis Tournament Calendar with type=atp and your Zyla API key in the Bearer authorization header. The curl and Python examples above use the official request.
What date format does the response use?
The sample supplies numeric start_timestamp and end_timestamp values. Interpret them as Unix seconds and convert them to UTC or your chosen display timezone.
Does the calendar include tournament winners?
The supplied response excerpt includes a winner object for several tournaments. Make that part of your display optional rather than assuming it is present for every entry.
Can I call the endpoint from an AI agent?
Yes. Configure an MCP-compatible client with the Zyla MCP endpoint and your API key. The regular HTTP endpoint remains available for application code.
Ready to integrate the calendar? Create a free Zyla account, get an API key, and Start 7-day trial on FlashScore - Live API. Check the listing for current access options and pricing.