Türkiye'nin en kapsamlı spor verileri API servisi. Ligler, takımlar, oyuncular, fikstürler, canlı maçlar ve daha fazlası için güvenilir RESTful API.
Modern, güvenilir ve kolay entegre edilebilir API servisi
Yüksek performanslı sunucular üzerinde %99.9 uptime garantisi ile kesintisiz hizmet.
API Key authentication ile güvenli erişim. HTTPS protokolü zorunlu.
Ligler, takımlar, oyuncular, istatistikler, fikstürler ve canlı maç verileri.
Modern REST standartlarına uygun, JSON formatında yanıtlar.
Adil kullanım politikası ile dengeli ve sürdürülebilir hizmet.
Teknik destek ekibimiz her zaman yanınızda. Hızlı ve profesyonel çözümler.
22 farklı endpoint ile tüm spor verilerine erişin
Tüm liglerin listesini getir
Belirli bir ligin detaylı bilgilerini getir
Tüm takımların listesini getir
Belirli bir takımın detaylı bilgilerini getir
Tüm oyuncuların listesini getir
Belirli bir oyuncunun detaylı bilgilerini getir
Maç fikstürlerini getir
Puan durumu tablosunu getir
Canlı maçların listesini getir
Gol krallığı sıralamasını getir
Asist krallığı sıralamasını getir
En az gol yiyen kalecileri getir
En değerli oyuncular listesi
En değerli kaleciler listesi
En değerli defans oyuncuları listesi
En değerli orta saha oyuncuları listesi
En değerli forvet oyuncuları listesi
En değerli genç yetenekler listesi
Şehir bazlı hava durumu bilgisi
Döviz, altın ve kripto para verileri
Günlük burç yorumları (12 burç)
Gazete manşetleri ve haberleri
API kullanımı için detaylı rehber
Tüm API isteklerinde X-API-Key header'ı ile API anahtarınızı göndermeniz gerekmektedir. API anahtarınız olmadan istekler reddedilecektir.
// cURL Örneği
curl -X GET "https://sporapi.com/api/v1/leagues" \
-H "X-API-Key: your_api_key_here"
// PHP Örneği
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://sporapi.com/api/v1/leagues');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-Key: your_api_key_here'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
// JavaScript Örneği (Fetch API)
fetch('https://sporapi.com/api/v1/leagues', {
headers: {
'X-API-Key': 'your_api_key_here'
}
})
.then(response => response.json())
.then(data => console.log(data));
Tüm API istekleri için kullanılacak temel adres:
https://sporapi.com/api/v1/
Tüm API yanıtları JSON formatında döner. Başarılı istekler için HTTP 200 durum kodu, hatalar için uygun HTTP hata kodları kullanılır.
// Başarılı Yanıt Örneği
{
"success": true,
"data": [
{
"id": 1,
"name": "Süper Lig",
"country": "Türkiye",
"season": "2024/2025"
}
],
"meta": {
"total": 1,
"page": 1,
"per_page": 20
}
}
// Hata Yanıt Örneği
{
"success": false,
"error": {
"code": 401,
"message": "Invalid API Key"
}
}
Her plan için dakika başına farklı istek limitleri mevcuttur. Limit aşımında HTTP 429 (Too Many Requests) hatası döner.
| Plan | İstek/Dakika | Günlük Limit |
|---|---|---|
| Free | 60 | 1,000 |
| Basic | 300 | 10,000 |
| Pro | 600 | 50,000 |
| Enterprise | 1000 | Sınırsız |
// Rate Limit Header'ları
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1640000000
| HTTP Kodu | Açıklama |
|---|---|
| 200 | Başarılı istek |
| 400 | Hatalı istek (geçersiz parametreler) |
| 401 | Yetkisiz erişim (geçersiz API key) |
| 404 | Kaynak bulunamadı |
| 429 | Rate limit aşımı |
| 500 | Sunucu hatası |
Endpoint'lerde kullanabileceğiniz standart sorgu parametreleri:
| Parametre | Tip | Açıklama |
|---|---|---|
| page | integer | Sayfa numarası (varsayılan: 1) |
| per_page | integer | Sayfa başına kayıt (varsayılan: 20, max: 100) |
| league_id | integer | Lig ID'sine göre filtrele |
| team_id | integer | Takım ID'sine göre filtrele |
| season | string | Sezon filtresi (örn: 2024/2025) |
// Örnek Kullanım
GET /api/v1/players?league_id=1&page=2&per_page=50
// Yanıt
{
"success": true,
"data": [...],
"meta": {
"total": 500,
"page": 2,
"per_page": 50,
"total_pages": 10
}
}
<?php
class SporAPI {
private $apiKey;
private $baseUrl = 'https://sporapi.com/api/v1/';
public function __construct($apiKey) {
$this->apiKey = $apiKey;
}
private function request($endpoint, $params = []) {
$url = $this->baseUrl . $endpoint;
if (!empty($params)) {
$url .= '?' . http_build_query($params);
}
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-Key: ' . $this->apiKey,
'Content-Type: application/json'
]);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($httpCode !== 200) {
throw new Exception("API Error: HTTP $httpCode");
}
return json_decode($response, true);
}
// Ligleri getir
public function getLeagues() {
return $this->request('leagues');
}
// Takımları getir
public function getTeams($leagueId = null) {
$params = [];
if ($leagueId) {
$params['league_id'] = $leagueId;
}
return $this->request('teams', $params);
}
// Oyuncuları getir
public function getPlayers($teamId = null) {
$params = [];
if ($teamId) {
$params['team_id'] = $teamId;
}
return $this->request('players', $params);
}
// Puan durumunu getir
public function getStandings($leagueId) {
return $this->request('standings', ['league_id' => $leagueId]);
}
// Canlı maçları getir
public function getLiveMatches() {
return $this->request('livematches');
}
}
// Kullanım
$api = new SporAPI('your_api_key_here');
try {
// Ligleri al
$leagues = $api->getLeagues();
// Süper Lig puan durumunu al
$standings = $api->getStandings(1);
// Canlı maçları al
$liveMatches = $api->getLiveMatches();
echo json_encode($standings, JSON_PRETTY_PRINT);
} catch (Exception $e) {
echo "Hata: " . $e->getMessage();
}
?>
const axios = require('axios');
class SporAPI {
constructor(apiKey) {
this.apiKey = apiKey;
this.baseUrl = 'https://sporapi.com/api/v1/';
}
async request(endpoint, params = {}) {
try {
const response = await axios.get(this.baseUrl + endpoint, {
headers: {
'X-API-Key': this.apiKey
},
params: params
});
return response.data;
} catch (error) {
console.error('API Error:', error.response?.status, error.message);
throw error;
}
}
// Ligleri getir
async getLeagues() {
return await this.request('leagues');
}
// Takımları getir
async getTeams(leagueId = null) {
const params = leagueId ? { league_id: leagueId } : {};
return await this.request('teams', params);
}
// Puan durumunu getir
async getStandings(leagueId) {
return await this.request('standings', { league_id: leagueId });
}
// Canlı maçları getir
async getLiveMatches() {
return await this.request('livematches');
}
}
// Kullanım
(async () => {
const api = new SporAPI('your_api_key_here');
try {
// Süper Lig puan durumu
const standings = await api.getStandings(1);
console.log(standings);
// Canlı maçlar
const liveMatches = await api.getLiveMatches();
console.log(liveMatches);
} catch (error) {
console.error('Hata:', error.message);
}
})();
import requests
import json
class SporAPI:
def __init__(self, api_key):
self.api_key = api_key
self.base_url = 'https://sporapi.com/api/v1/'
self.headers = {
'X-API-Key': api_key,
'Content-Type': 'application/json'
}
def request(self, endpoint, params=None):
url = self.base_url + endpoint
try:
response = requests.get(url, headers=self.headers, params=params)
response.raise_for_status()
return response.json()
except requests.exceptions.RequestException as e:
print(f"API Error: {e}")
raise
def get_leagues(self):
return self.request('leagues')
def get_teams(self, league_id=None):
params = {'league_id': league_id} if league_id else None
return self.request('teams', params)
def get_standings(self, league_id):
return self.request('standings', {'league_id': league_id})
def get_live_matches(self):
return self.request('livematches')
# Kullanım
api = SporAPI('your_api_key_here')
try:
# Ligleri al
leagues = api.get_leagues()
print(json.dumps(leagues, indent=2, ensure_ascii=False))
# Puan durumu
standings = api.get_standings(1)
print(json.dumps(standings, indent=2, ensure_ascii=False))
except Exception as e:
print(f"Hata: {e}")
İhtiyacınıza uygun planı seçin
Size yardımcı olmak için buradayız
[email protected]
24 saat içinde yanıt garantisi
Hafta içi 09:00 - 18:00
Anlık yardım için canlı sohbet
Detaylı API dokümantasyonu
Kod örnekleri ve rehberler
1. Yukarıdaki fiyatlandırma planlarından birini seçin
2. Kayıt formunu doldurun ve ödeme işlemini tamamlayın
3. E-posta adresinize API anahtarınız gönderilecektir
4. API anahtarınızı kullanarak hemen başlayın