API DOCUMENTATION

Live sports streaming API. All requests require an API key. Base URL:

https://tzsports.live/api

Authentication

Append api_key as a query parameter to every request. Whitelist your domain (browser) or IP (server) in your account.

https://tzsports.live/api/matches?api_key=xxxxxxx

Endpoints

GET

Get all matches

Returns matches grouped by category. Optional filter by status.

GET https://tzsports.live/api/matches?api_key=xxxxxxx

Query parameters

ParameterTypeRequiredDescription
api_keystringYesYour API key
statusstringNolive, upcoming, or completed

Response 200

{
  "success": true,
  "data": [
    {
      "id": 2,
      "name": "Bangladesh Odommo T20 Cup",
      "sport_type": "Cricket",
      "matches": [
        {
          "id": 4,
          "name": "Dhumketu v Duronto",
          "date": "2026-02-05",
          "time": "20:35:00",
          "streaming_link": "https://...",
          "status": "live"
        }
      ]
    }
  ]
}
GET

Get live matches

Returns only matches with status live, grouped by category.

GET https://tzsports.live/api/matches/live?api_key=xxxxxxx

Query parameters

ParameterTypeRequiredDescription
api_keystringYesYour API key

Response 200

Same structure as Get all matches; data contains only categories that have live matches.

GET

Get upcoming matches

Returns only matches with status upcoming, grouped by category.

GET https://tzsports.live/api/matches/upcoming?api_key=xxxxxxx

Query parameters

ParameterTypeRequiredDescription
api_keystringYesYour API key

Response 200

Same structure as Get all matches; data contains only categories that have upcoming matches.

GET

Get single match

Returns one match by ID with its category.

GET https://tzsports.live/api/matches/{id}?api_key=xxxxxxx

Path parameters

ParameterTypeDescription
idintegerMatch ID

Query parameters

ParameterTypeRequiredDescription
api_keystringYesYour API key

Response 200

{
  "success": true,
  "data": {
    "id": 4,
    "name": "Dhumketu v Duronto",
    "date": "2026-02-05",
    "time": "20:35:00",
    "streaming_link": "https://...",
    "status": "live",
    "category": {
      "id": 2,
      "name": "Bangladesh Odommo T20 Cup",
      "sport_type": "Cricket"
    }
  }
}

Response 404

{
  "success": false,
  "message": "Match not found."
}

Response schema

List endpoints (/matches, /matches/live, /matches/upcoming):

Single match (/matches/{id}): data is one match object with category (id, name, sport_type).

Status codes

CodeDescription
200Success
401Missing or invalid API key
403API key not whitelisted (domain/IP)
404Match not found

Code examples

const apiKey = 'xxxxxxx';
const url = `https://tzsports.live/api/matches?api_key=${apiKey}`;

fetch(url, { headers: { 'Accept': 'application/json' } })
  .then(res => res.json())
  .then(data => {
    if (data.success) {
      data.data.forEach(cat => {
        console.log(cat.name, cat.sport_type);
        cat.matches.forEach(m => console.log(m.name, m.status));
      });
    }
  });
$apiKey = 'xxxxxxx';
$url = 'https://tzsports.live/api/matches?api_key=' . $apiKey;

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Accept: application/json']);
$response = curl_exec($ch);
curl_close($ch);

$data = json_decode($response, true);
if ($data['success'] ?? false) {
    foreach ($data['data'] as $category) {
        foreach ($category['matches'] as $match) {
            echo $match['name'] . ' - ' . $match['status'] . "\n";
        }
    }
}
String apiKey = "xxxxxxx";
String url = "https://tzsports.live/api/matches?api_key=" + apiKey;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create(url))
    .header("Accept", "application/json")
    .GET().build();

HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
String json = response.body(); // Parse with Gson or Jackson
import requests

api_key = 'xxxxxxx'
url = 'https://tzsports.live/api/matches'
params = {'api_key': api_key}
headers = {'Accept': 'application/json'}

r = requests.get(url, params=params, headers=headers)
data = r.json()

if data.get('success'):
    for category in data['data']:
        for match in category['matches']:
            print(match['name'], match['status'])
# All matches
curl -X GET "https://tzsports.live/api/matches?api_key=xxxxxxx" -H "Accept: application/json"

# Live matches
curl -X GET "https://tzsports.live/api/matches/live?api_key=xxxxxxx" -H "Accept: application/json"

# Upcoming matches
curl -X GET "https://tzsports.live/api/matches/upcoming?api_key=xxxxxxx" -H "Accept: application/json"

# Single match
curl -X GET "https://tzsports.live/api/matches/1?api_key=xxxxxxx" -H "Accept: application/json"