Tennis Live API
Live Events & Scores
Real-time live match data including live events, live scores, odds, point-by-point stats, event timelines, and Socket.IO integration for push updates. All REST endpoints use the Tennis Live API product on RapidAPI.
β οΈ
Plan Restriction
Live Odds endpoints (including odds/summary, recent-odds) are only available to ULTRA and MEGA plan subscribers. Socket.IO real-time updates require MEGA plan. If you encounter access errors, please upgrade your plan or contact support.
Product: Tennis Live API (
Base path:
tennis-live-api.p.rapidapi.com)Base path:
https://tennis-live-api.p.rapidapi.com/tennis/v2/extend/api
Endpoint Summary
| Method | Path | Description |
|---|---|---|
| GET | /events/live | All currently live match events |
| GET | /odds/summary/{eventId} | Odds summary for a live event |
| GET | /event/recent-odds/get/{eventId} | Recent odds history for an event |
| GET | /event/pbp/{eventId}/{set}/{game} | Point-by-point data for a set & game |
| GET | /event/timeline/{eventId} | Full event timeline |
| GET | /live-score/get/{eventId} | Live score by event ID |
| GET | /event/get/{player1}/{player2}/{date} | Get event ID by participants and date |
Get Live Events
GET
/tennis/v2/extend/api/events/live
Returns all currently live match events
Example Request
cURL
curl --request GET \
--url 'https://tennis-live-api.p.rapidapi.com/tennis/v2/extend/api/events/live' \
--header 'Content-Type: application/json' \
--header 'x-rapidapi-host: tennis-live-api.p.rapidapi.com' \
--header 'x-rapidapi-key: YOUR_RAPIDAPI_KEY'
Get Odds Summary
GET
/tennis/v2/extend/api/odds/summary/{eventId}
Returns an odds summary for the given live event
Path Parameters
| Parameter | Type | Description |
|---|---|---|
eventId Required | number | The numeric event ID (e.g. 3679258) |
Example Request
cURL
curl --request GET \
--url 'https://tennis-live-api.p.rapidapi.com/tennis/v2/extend/api/odds/summary/3679258' \
--header 'Content-Type: application/json' \
--header 'x-rapidapi-host: tennis-live-api.p.rapidapi.com' \
--header 'x-rapidapi-key: YOUR_RAPIDAPI_KEY'
Get Recent Odds
GET
/tennis/v2/extend/api/event/recent-odds/get/{eventId}
Returns recent odds history for the given event
Path Parameters
| Parameter | Type | Description |
|---|---|---|
eventId Required | number | The numeric event ID (e.g. 3263263) |
Example Request
cURL
curl --request GET \
--url 'https://tennis-live-api.p.rapidapi.com/tennis/v2/extend/api/event/recent-odds/get/3263263' \
--header 'Content-Type: application/json' \
--header 'x-rapidapi-host: tennis-live-api.p.rapidapi.com' \
--header 'x-rapidapi-key: YOUR_RAPIDAPI_KEY'
Get Points By Points
GET
/tennis/v2/extend/api/event/pbp/{eventId}/{set}/{game}
Returns point-by-point data for a specific set and game within an event
Path Parameters
| Parameter | Type | Description |
|---|---|---|
eventId Required | number | The numeric event ID (e.g. 29935) |
set Required | number | Set number (e.g. 73620) |
game Required | number | Game number within the set (e.g. 21334) |
Example Request
cURL
curl --request GET \
--url 'https://tennis-live-api.p.rapidapi.com/tennis/v2/extend/api/event/pbp/29935/73620/21334/4' \
--header 'Content-Type: application/json' \
--header 'x-rapidapi-host: tennis-live-api.p.rapidapi.com' \
--header 'x-rapidapi-key: YOUR_RAPIDAPI_KEY'
Get Event Timeline
GET
/tennis/v2/extend/api/event/timeline/{eventId}
Returns the full timeline of events for a match
Path Parameters
| Parameter | Type | Description |
|---|---|---|
eventId Required | number | The numeric event ID (e.g. 2732239) |
Example Request
cURL
curl --request GET \
--url 'https://tennis-live-api.p.rapidapi.com/tennis/v2/extend/api/event/timeline/2732239' \
--header 'Content-Type: application/json' \
--header 'x-rapidapi-host: tennis-live-api.p.rapidapi.com' \
--header 'x-rapidapi-key: YOUR_RAPIDAPI_KEY'
Get Live Score By Event Id
GET
/tennis/v2/extend/api/live-score/get/{eventId}
Returns the current live score for the given event
Path Parameters
| Parameter | Type | Description |
|---|---|---|
eventId Required | number | The numeric event ID (e.g. 2732239) |
Example Request
cURL
curl --request GET \
--url 'https://tennis-live-api.p.rapidapi.com/tennis/v2/extend/api/live-score/get/2732239' \
--header 'Content-Type: application/json' \
--header 'x-rapidapi-host: tennis-live-api.p.rapidapi.com' \
--header 'x-rapidapi-key: YOUR_RAPIDAPI_KEY'
Get Event Id By Participants And Date
GET
/tennis/v2/extend/api/event/get/{player1}/{player2}/{date}
Returns event details by player names and match date
Path Parameters
| Parameter | Type | Description |
|---|---|---|
player1 Required | string | First player full name (e.g. Daniil Medvedev) |
player2 Required | string | Second player full name (e.g. Kamil Majchrzak) |
date Required | string | Match date in YYYY-MM-DD format (e.g. 2026-06-13) |
Example Request
cURL
curl --request GET \
--url 'https://tennis-live-api.p.rapidapi.com/tennis/v2/extend/api/event/get/Daniil%20Medvedev/Kamil%20Majchrzak/2026-06-13' \
--header 'Content-Type: application/json' \
--header 'x-rapidapi-host: tennis-live-api.p.rapidapi.com' \
--header 'x-rapidapi-key: YOUR_RAPIDAPI_KEY'
Socket Integration
Real-time push updates are available via Socket.IO. Subscribe to live events, live odds, and sport-wide feeds without polling.
Mega Plan Only: Socket integration requires a Mega Plan subscription. Contact support for your
SOCKET_URL and API_KEY.Sport support: Currently only tennis live updates are available. Cricket and football will be added in future releases.
Installation
npm
npm install socket.io-client
yarn
yarn add socket.io-client
Connection Singleton
Create a singleton socket file to reuse the connection across your app:
tennis-api-live-socket.js
// For Raw JS β include via CDN:
// <script src="https://cdn.socket.io/4.8.1/socket.io.min.js"></script>
// For frameworks:
import { io } from "socket.io-client";
let socket = null;
export function tennisApiLiveSocketConn() {
if (!socket) {
socket = io(YOUR_SOCKET_URL, {
auth: { apiKey: YOUR_API_KEY },
transports: ["websocket"],
reconnection: true,
autoConnect: true,
});
socket.on("connect", () => console.log("Socket connected:", socket.id));
socket.on("connect_error", (err) => console.log("Connect error:", err));
socket.on("disconnect", (reason) => console.log("Disconnected:", reason));
}
return socket;
}
Events Reference
Client β Server (emit):
| Event | Payload | Description |
|---|---|---|
join-event | eventId | Subscribe to a single match event |
leave-event | eventId | Unsubscribe from a single match event |
join-live-events-all | sportSlug | Subscribe to all live events for a sport ("tennis") |
leave-live-events-all | sportSlug | Unsubscribe from sport-wide live feed |
Server β Client (on):
| Event | Description |
|---|---|
event-update | Live update for a subscribed single event |
odds-update | Live odds update for a subscribed event |
live-events-all-update | Bulk update for all live events in subscribed sport |
React / Next.js
Single Event
useEffect(() => {
const socket = tennisApiLiveSocketConn();
socket.emit("join-event", eventId);
const handleEventUpdate = (data) => setEventData(data);
const handleOddsUpdate = (data) => setOddsData(data);
socket.on("event-update", handleEventUpdate);
socket.on("odds-update", handleOddsUpdate);
return () => {
socket.off("event-update", handleEventUpdate);
socket.off("odds-update", handleOddsUpdate);
socket.emit("leave-event", eventId);
};
}, [eventId]);
Sport Live Feed
useEffect(() => {
if (!sportSlug) return;
const socket = tennisApiLiveSocketConn();
socket.emit("join-live-events-all", sportSlug);
const handleUpdate = (data) => setData(data);
socket.on("live-events-all-update", handleUpdate);
return () => {
socket.off("live-events-all-update", handleUpdate);
socket.emit("leave-live-events-all", sportSlug);
};
}, [sportSlug]);
Angular
live-match.component.ts
import { Component, OnInit, OnDestroy } from '@angular/core';
import { tennisApiLiveSocketConn } from './tennis-api-live-socket';
@Component({ selector: 'app-live-match', templateUrl: './live-match.component.html' })
export class LiveMatchComponent implements OnInit, OnDestroy {
eventData: any = null;
oddsData: any = null;
eventId = 123456;
private socket = tennisApiLiveSocketConn();
private _handleEventUpdate: any;
private _handleOddsUpdate: any;
ngOnInit() {
this.socket.emit('join-event', this.eventId);
this._handleEventUpdate = (data: any) => this.eventData = data;
this._handleOddsUpdate = (data: any) => this.oddsData = data;
this.socket.on('event-update', this._handleEventUpdate);
this.socket.on('odds-update', this._handleOddsUpdate);
}
ngOnDestroy() {
this.socket.off('event-update', this._handleEventUpdate);
this.socket.off('odds-update', this._handleOddsUpdate);
this.socket.emit('leave-event', this.eventId);
}
}
Vue 3
Single Event
import { ref, onMounted, onUnmounted } from 'vue';
import { tennisApiLiveSocketConn } from '@/libs/tennis-api-live-socket';
const eventData = ref(null);
const oddsData = ref(null);
const eventId = 123456;
const socket = tennisApiLiveSocketConn();
const handleEventUpdate = (data) => { eventData.value = data; };
const handleOddsUpdate = (data) => { oddsData.value = data; };
onMounted(() => {
socket.emit('join-event', eventId);
socket.on('event-update', handleEventUpdate);
socket.on('odds-update', handleOddsUpdate);
});
onUnmounted(() => {
socket.off('event-update', handleEventUpdate);
socket.off('odds-update', handleOddsUpdate);
socket.emit('leave-event', eventId);
});
Raw JavaScript
JavaScript
const socket = tennisApiLiveSocketConn();
const eventId = 123456;
const handleEventUpdate = (data) => console.log('Event Update:', data);
const handleOddsUpdate = (data) => console.log('Odds Update:', data);
socket.emit('join-event', eventId);
socket.on('event-update', handleEventUpdate);
socket.on('odds-update', handleOddsUpdate);
window.addEventListener('beforeunload', () => {
socket.off('event-update', handleEventUpdate);
socket.off('odds-update', handleOddsUpdate);
socket.emit('leave-event', eventId);
});
Best Practices
- Use a singleton socket instance β never create multiple connections.
- Always remove listeners on component unmount to prevent memory leaks.
- Always leave rooms when navigating away or closing the page.
- Use
sportSlug: "tennis"for the sport-wide feed.