Toplam Oy Sayısı
1,305 Oy

🚀 TCSI API

Turkey Customer Satisfaction Index verilerine programatik erişim

Ücretsiz REST API JSON Güvenli
32+
TCSI Puanı Olan Firma
70.4
Ortalama TCSI Puanı
65+
Toplam Değerlendirme
7
API Endpoint

📚 API Dokümantasyonu

🔧 Temel Bilgiler

Base URL: /api/tcsi/v1/
Format: JSON
Authentication: API Key Required
Rate Limit: 1000 requests/day

🔐 Kimlik Doğrulama

API'yi kullanmak için API anahtarınızı aşağıdaki yöntemlerden biriyle gönderebilirsiniz:

1. Header ile

curl -H "X-API-Key: your_api_key" \
     /api/tcsi/v1/firm/123

2. Authorization Header ile

curl -H "Authorization: Bearer your_api_key" \
     /api/tcsi/v1/firm/123

3. Query Parameter ile

curl "/api/tcsi/v1/firm/123?api_key=your_api_key"

📋 API Endpoint'leri

GET /firm/{id}

Belirli bir firmanın TCSI verilerini getirir

Örnek:
/api/tcsi/v1/firm/123
GET /firm/{slug}

Firma slug'ı ile TCSI verilerini getirir

Örnek:
/api/tcsi/v1/firm/ornek-firma
GET /firms

Çoklu firma TCSI verilerini getirir (pagination destekli)

Parametreler:
  • ids - Firma ID'leri (virgülle ayırın)
  • limit - Sayfa başına kayıt (varsayılan: 10, max: 100)
  • offset - Sayfa offset (varsayılan: 0)
  • order_by - Sıralama (score, name, responses, updated)
  • order - Sıralama yönü (ASC, DESC)
Örnek:
/api/tcsi/v1/firms?limit=20&order_by=score&order=DESC
GET /city/{city}/top

Şehir bazlı en iyi firmaları getirir

Örnek:
/api/tcsi/v1/city/istanbul/top?limit=10
GET /sector/{sector}/top

Sektör bazlı en iyi firmaları getirir

Örnek:
/api/tcsi/v1/sector/restoran/top?limit=10
GET /test

API anahtarınızın geçerliliğini test eder

Örnek:
/api/tcsi/v1/test
GET /stats

Genel TCSI istatistiklerini getirir

Örnek:
/api/tcsi/v1/stats

📄 Yanıt Formatı

API yanıtları JSON formatında döner. İşte örnek bir firma yanıtı:

{
  "firm_id": 123,
  "name": "Örnek Firma A.Ş.",
  "slug": "ornek-firma-as",
  "city": "İstanbul",
  "address": "Örnek Mahallesi, Örnek Sokak No:1",
  "phone": "+90 212 123 45 67",
  "website": "https://www.ornekfirma.com",
  "category": "Restoran",
  "types": ["restaurant", "food"],
  "tcsi": {
    "score": 87.5,
    "total_responses": 42,
    "certification_level": "gold",
    "certification_label": "Altın",
    "score_category": "very_good",
    "last_updated": "2024-01-15 14:30:00",
    "tcsi_url": "https://www.sektorlideri.com/acsi/123/",
    "survey_url": "https://www.sektorlideri.com/acsi-anket/firma/123/ornek-firma/"
  },
  "location": {
    "latitude": 41.0082,
    "longitude": 28.9784,
    "place_id": "ChIJexample123"
  },
  "urls": {
    "profile": "https://www.sektorlideri.com/firma/123/ornek-firma/",
    "api": "/api/tcsi/v1/firm/123"
  },
  "meta": {
    "created_at": "2024-01-01 00:00:00",
    "updated_at": "2024-01-15 14:30:00",
    "is_active": true
  }
}

🏆 TCSI Puan Kategorileri

90-100
Mükemmel
excellent
80-89
Çok İyi
very_good
70-79
İyi
good
60-69
Orta
fair
1-59
Zayıf
poor

⚠️ Hata Kodları

401 Unauthorized API anahtarı geçersiz veya eksik
403 Forbidden IP adresi izin listesinde değil
404 Not Found İstenen kaynak bulunamadı
429 Too Many Requests Rate limit aşıldı
500 Internal Server Error Sunucu hatası

💡 Kullanım Örnekleri

JavaScript ile Firma Verisi

fetch('/api/tcsi/v1/firm/123', {
    headers: {'X-API-Key': 'your_api_key'}
})
.then(response => response.json())
.then(data => {
    console.log(`${data.name}: ${data.tcsi.score} TCSI`);
    console.log(`Madalya: ${data.tcsi.certification_label}`);
});

PHP ile En İyi Firmalar

$response = wp_remote_get('/api/tcsi/v1/city/istanbul/top?limit=5', [
    'headers' => ['X-API-Key' => 'your_api_key']
]);

$data = json_decode(wp_remote_retrieve_body($response), true);

foreach ($data['data'] as $firm) {
    echo "{$firm['name']}: {$firm['tcsi']['score']} TCSI\n";
}

Python ile API Kullanımı

import requests

headers = {'X-API-Key': 'your_api_key'}
response = requests.get('/api/tcsi/v1/firms?limit=10', headers=headers)

if response.status_code == 200:
    data = response.json()
    for firm in data['data']:
        print(f"{firm['name']}: {firm['tcsi']['score']} TCSI")

📋 API Kullanım Şartları

  1. Kabul Edilebilir Kullanım: API'yi yasal ve etik amaçlarla kullanın
  2. Rate Limiting: Günlük istek limitlerini aşmayın
  3. Veri Saklama: TCSI verilerini cache'leyebilirsiniz (maksimum 24 saat)
  4. Kaynak Gösterimi: Verileri kullanırken TCSI kaynağını belirtin
  5. Ticari Kullanım: Ticari projeler için onay alın
  6. Misuse: API'yi kötüye kullanım durumunda erişim engellenebilir
  7. Destek: Teknik destek için iletişim bilgilerimizi kullanın

🚀 Hemen Başlayın!

TCSI API'yi kullanmaya başlamak için API anahtarınızı alın.