Profesyonel Spor Verileri API

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.

22
Endpoint
99.9%
Uptime
24/7
Destek

Neden SporAPI?

Modern, güvenilir ve kolay entegre edilebilir API servisi

Hızlı ve Güvenilir

Yüksek performanslı sunucular üzerinde %99.9 uptime garantisi ile kesintisiz hizmet.

🔒

Güvenli API

API Key authentication ile güvenli erişim. HTTPS protokolü zorunlu.

📊

Kapsamlı Veri

Ligler, takımlar, oyuncular, istatistikler, fikstürler ve canlı maç verileri.

🚀

RESTful API

Modern REST standartlarına uygun, JSON formatında yanıtlar.

📈

Rate Limiting

Adil kullanım politikası ile dengeli ve sürdürülebilir hizmet.

💬

7/24 Destek

Teknik destek ekibimiz her zaman yanınızda. Hızlı ve profesyonel çözümler.

API Endpoints

22 farklı endpoint ile tüm spor verilerine erişin

/api/v1/leagues

Tüm liglerin listesini getir

GET

/api/v1/leagues/{id}

Belirli bir ligin detaylı bilgilerini getir

GET

/api/v1/teams

Tüm takımların listesini getir

GET

/api/v1/teams/{id}

Belirli bir takımın detaylı bilgilerini getir

GET

/api/v1/players

Tüm oyuncuların listesini getir

GET

/api/v1/players/{id}

Belirli bir oyuncunun detaylı bilgilerini getir

GET

/api/v1/fixtures

Maç fikstürlerini getir

GET

/api/v1/standings

Puan durumu tablosunu getir

GET

/api/v1/livematches

Canlı maçların listesini getir

GET

/api/v1/goalscorers

Gol krallığı sıralamasını getir

GET

/api/v1/assistleaders

Asist krallığı sıralamasını getir

GET

/api/v1/cleansheets

En az gol yiyen kalecileri getir

GET

/api/v1/valuable-players

En değerli oyuncular listesi

GET

/api/v1/valuable-goalkeepers

En değerli kaleciler listesi

GET

/api/v1/valuable-defenders

En değerli defans oyuncuları listesi

GET

/api/v1/valuable-midfielders

En değerli orta saha oyuncuları listesi

GET

/api/v1/valuable-forwards

En değerli forvet oyuncuları listesi

GET

/api/v1/valuable-talents

En değerli genç yetenekler listesi

GET

/api/v1/weather

Şehir bazlı hava durumu bilgisi

GET

/api/v1/financial

Döviz, altın ve kripto para verileri

GET

/api/v1/horoscopes

Günlük burç yorumları (12 burç)

GET

/api/v1/newspapers

Gazete manşetleri ve haberleri

GET

Dokümantasyon

API kullanımı için detaylı rehber

Authentication (Kimlik Doğrulama)

API Key Kullanımı

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));

Base URL

API Temel Adresi

Tüm API istekleri için kullanılacak temel adres:

https://sporapi.com/api/v1/

Response Format (Yanıt Formatı)

JSON Formatı

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"
    }
}

Rate Limiting (İstek Limiti)

Kullanım Limitleri

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

Error Codes (Hata Kodları)

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ı

Query Parameters (Sorgu Parametreleri)

Filtreleme ve Sayfalama

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
    }
}

Detaylı Kod Örnekleri

PHP ile Tam Entegrasyon

<?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();
}
?>

JavaScript (Node.js) ile Entegrasyon

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);
    }
})();

Python ile Entegrasyon

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}")

Fiyatlandırma

İhtiyacınıza uygun planı seçin

Free

₺0/ay
  • 60 istek/dakika
  • 1,000 istek/gün
  • Temel endpoint'ler
  • JSON yanıtlar
  • E-posta destek
Başla

Basic

₺299/ay
  • 300 istek/dakika
  • 10,000 istek/gün
  • Tüm endpoint'ler
  • JSON yanıtlar
  • Öncelikli e-posta destek
  • API istatistikleri
Satın Al

Enterprise

Özel
  • 1000 istek/dakika
  • Sınırsız istek
  • Tüm endpoint'ler
  • Özel SLA
  • Dedicated destek
  • White-label seçeneği
  • Özel geliştirme
  • On-premise kurulum
İletişime Geç

Destek ve İletişim

Size yardımcı olmak için buradayız

📧

E-posta Destek

[email protected]
24 saat içinde yanıt garantisi

💬

Canlı Destek

Hafta içi 09:00 - 18:00
Anlık yardım için canlı sohbet

📚

Dokümantasyon

Detaylı API dokümantasyonu
Kod örnekleri ve rehberler

API Anahtarı Nasıl Alınır?

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