API Dökümanları

Tüm API endpoint'leri, parametreleri ve örnek kullanımları.

🔑 Base URL: https://apiverse.com.tr/api/  ·  Kredi sorgusu: https://apiverse.com.tr/api/v1/?route=time/current

Kimlik Doğrulama

Her istekte API anahtarınızı X-API-Key header'ı veya api_key parametresi ile gönderin.

curl -H "X-API-Key: af_your_key_here" "https://apiverse.com.tr/api/v1/?route=time/current"

# Alternatif
curl "https://apiverse.com.tr/api/v1/?route=time/current&api_key=af_your_key_here"

Kredi Sistemi

Her API isteği 1 kredi tüketir. Mail ve fatura API'larında kullanım uzunluğa göre değişir (1 kredi/karakter).

📧 Mail Gönder

POST /api/mail/send.php 50 kredi HTML veya düz metin mail gönder
ParametreTürAçıklama
mail_config_idintZorunluDashboard'dan eklediğiniz SMTP yapılandırma ID'si
tostringZorunluAlıcı e-posta adresi
subjectstringZorunluMail konusu
bodystringZorunluMail içeriği (HTML destekli)
is_htmlboolOpsiyonelHTML formatı (varsayılan: true)
curl -X POST "https://apiverse.com.tr/api/mail/send.php" \
  -H "X-API-Key: af_your_key" \
  -H "Content-Type: application/json" \
  -d '{"mail_config_id":1,"to":"user@example.com","subject":"Merhaba!","body":"<h1>Test</h1>"}'

// Yanıt:
{"success":true,"credits_used":82,"credits_remaining":418,"recipient":"user@example.com"}

🧾 Fatura Oluştur

POST /api/invoice/create.php 50 kredi
curl -X POST "https://apiverse.com.tr/api/invoice/create.php" \
  -H "X-API-Key: af_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_name": "Ahmet Yılmaz",
    "customer_email": "ahmet@example.com",
    "tax_rate": 18,
    "items": [
      {"name": "Web Tasarım", "quantity": 1, "unit_price": 5000},
      {"name": "SEO", "quantity": 3, "unit_price": 500}
    ],
    "send_to_email": true,
    "return_html": false
  }'

🌤️ Hava Durumu

GET /api/weather/current.php 50 kredi
# Şehir adıyla
curl "https://apiverse.com.tr/api/weather/current.php?city=Istanbul" -H "X-API-Key: af_key"

# Koordinatlarla
curl "https://apiverse.com.tr/api/weather/current.php?lat=41.01&lon=28.97" -H "X-API-Key: af_key"

🕐 Anlık Saat

GET /api/v1/?route=time/current 50 kredi
curl "https://apiverse.com.tr/api/v1/?route=time/current&timezone=Europe/Istanbul" -H "X-API-Key: af_key"
// {"success":true,"timezone":"Europe/Istanbul","datetime":"2025-04-08 15:30:22","time":"15:30:22",...}

💱 Döviz Kurları

GET /api/v1/?route=currency/rates 50 kredi
curl "https://apiverse.com.tr/api/v1/?route=currency/rates&base=TRY" -H "X-API-Key: af_key"

🗺️ IP Sorgulama

GET /api/v1/?route=ip/lookup 50 kredi
curl "https://apiverse.com.tr/api/v1/?route=ip/lookup&ip=8.8.8.8" -H "X-API-Key: af_key"

📊 QR Kod

GET /api/v1/?route=qr/generate 50 kredi
curl "https://apiverse.com.tr/api/v1/?route=qr/generate&text=https://example.com&size=300" -H "X-API-Key: af_key"

🔐 Şifre & Token Üretme

GET /api/v1/?route=password/generate 50 kredi
# length=16, count=5 şifre
curl "https://apiverse.com.tr/api/v1/?route=password/generate&length=16&count=5&symbols=1" -H "X-API-Key: af_key"

🌍 Deprem API'leri

USGS (ABD Jeoloji Araştırmaları Kurumu) açık verilerini kullanır. Tüm endpoint'ler 50 kredi/istek tüketir. Kaynak: earthquake.usgs.gov

GET /api/v1/?route=earthquake/recent 50 kredi

Son depremleri listeler. Bölge (Türkiye veya dünya), büyüklük ve zaman aralığı ile filtrele.

ParametreAçıklamaVarsayılan
limitSonuç sayısı (1-100)20
minmagnitudeMinimum büyüklük1.0
daysSon kaç gün (1-30)7
regionturkey veya worldworld
# Son 7 günde Türkiye'de M2.5+ depremler
curl "https://apiverse.com.tr/api/v1/?route=earthquake/recent®ion=turkey&minmagnitude=2.5&days=7" \
  -H "X-API-Key: af_key"

# Yanıt:
{
  "success": true,
  "count": 12,
  "region": "turkey",
  "earthquakes": [
    {
      "id": "us7000n9v4",
      "magnitude": 4.2,
      "place": "23 km NE of Malatya, Turkey",
      "time": "2024-01-15 08:34:22",
      "depth_km": 10,
      "latitude": 38.45,
      "longitude": 38.12,
      "tsunami": false,
      "url": "https://earthquake.usgs.gov/earthquakes/eventpage/us7000n9v4"
    }
  ],
  "credits_used": 50
}
GET /api/v1/?route=earthquake/nearby 50 kredi

Belirtilen koordinata yakın depremleri getirir. Mesafeye göre sıralar.

ParametreAçıklamaVarsayılan
latitudeEnlem (ondalık)39.0
longitudeBoylam (ondalık)35.0
radius_kmArama yarıçapı km (10-500)200
limitSonuç sayısı (1-20)5
daysSon kaç gün (1-30)30
minmagnitudeMinimum büyüklük1.0
# İstanbul'a 300km yakın son depremler
curl "https://apiverse.com.tr/api/v1/?route=earthquake/nearby&latitude=41.01&longitude=28.97&radius_km=300" \
  -H "X-API-Key: af_key"
GET /api/v1/?route=earthquake/seismic 50 kredi

Canlı sismik dalga verilerini GeoJSON formatında döndürür. Harita ve görselleştirme uygulamaları için tasarlanmıştır.

ParametreAçıklamaVarsayılan
hoursSon kaç saat (1-24)1
minmagnitudeMinimum büyüklük0.5
# Son 3 saatin sismik verisini GeoJSON olarak al
curl "https://apiverse.com.tr/api/v1/?route=earthquake/seismic&hours=3&minmagnitude=1.0" \
  -H "X-API-Key: af_key"

# Yanıt ham GeoJSON içerir — Leaflet.js ile direkt kullanılabilir
GET /api/v1/?route=earthquake/stats 50 kredi

Büyüklük dağılımı ve periyot bazlı istatistikler.

ParametreAçıklamaVarsayılan
daysPeriyot (1-30)30
regionturkey veya worldworld
curl "https://apiverse.com.tr/api/v1/?route=earthquake/stats®ion=turkey&days=30" \
  -H "X-API-Key: af_key"
GET /api/v1/?route=earthquake/detail 50 kredi

Tek bir deprem olayının tüm detaylarını getirir.

ParametreAçıklama
event_idUSGS event ID (örn: us7000n9v4)
curl "https://apiverse.com.tr/api/v1/?route=earthquake/detail&event_id=us7000n9v4" \
  -H "X-API-Key: af_key"

SQL Database API

Her kullanıcı kişisel SQLite veritabanına ([email].db) sahip olur. Tüm SQL işlemleri güvenli ve parameterized sorgu yöntemiyle çalışır.

SQL Sorgusu Çalıştır

POST /api/v1?route=sqldb/query 5-10 kredi

SELECT, INSERT, UPDATE, DELETE gibi SQL sorgularını çalıştırın. Tüm sorgular parameterized yöntemiyle güvenli şekilde çalıştırılır.

ParametreAçıklamaÖrnek
sql *Çalıştırılacak SQL sorgusuSELECT * FROM users WHERE id=?
params opt.Query parametreleri (array)[1, "John"]
cost opt.Kredi maliyeti (varsayılan: 5)10
curl -X POST "https://apiverse.com.tr/api/v1?route=sqldb/query" \
  -H "X-API-Key: af_key" \
  -H "Content-Type: application/json" \
  -d '{
    "sql": "SELECT * FROM users WHERE age > ?",
    "params": [18],
    "cost": 5
  }'

Yanıt:

{
  "success": true,
  "operation": "SELECT",
  "data": [
    {"id": 1, "name": "John", "age": 25},
    {"id": 2, "name": "Jane", "age": 30}
  ],
  "rows_count": 2,
  "credits_used": 5,
  "credits_remaining": 95
}

Tablo Yönetimi

POST /api/v1?route=sqldb/table 3 kredi

Tablo oluştur, sil, temizle veya tablo bilgilerini al.

ParametreAçıklama
table *Tablo adı (örn: users, products)
action *create, drop, truncate, info
schema opt.Tablo şeması (CREATE için gerekli)
curl -X POST "https://apiverse.com.tr/api/v1?route=sqldb/table" \
  -H "X-API-Key: af_key" \
  -H "Content-Type: application/json" \
  -d '{
    "table": "users",
    "action": "create",
    "schema": [
      {"name": "id", "type": "INTEGER", "primary": true},
      {"name": "name", "type": "TEXT", "not_null": true},
      {"name": "email", "type": "TEXT"},
      {"name": "created_at", "type": "DATETIME"}
    ]
  }'

Tabloları Listele

GET /api/v1?route=sqldb/tables 1 kredi

Veritabanındaki tüm tabloları listele.

curl "https://apiverse.com.tr/api/v1?route=sqldb/tables" \
  -H "X-API-Key: af_key"

Yanıt:

{
  "success": true,
  "tables": ["users", "products", "orders"],
  "count": 3,
  "credits_used": 1,
  "credits_remaining": 99
}

Yedekleme & Geri Yükleme

POST /api/v1?route=sqldb/backup 10 kredi

Veritabanının yedeğini al. Restore için başka endpoint kullan.

curl -X POST "https://apiverse.com.tr/api/v1?route=sqldb/backup" \
  -H "X-API-Key: af_key"

Geri Yükleme:

curl -X POST "https://apiverse.com.tr/api/v1?route=sqldb/restore" \
  -H "X-API-Key: af_key" \
  -H "Content-Type: application/json" \
  -d '{"backup": "user@example.com_backup_20260511120000.db"}'

Dışa Aktarma & İthalatçı

POST /api/v1?route=sqldb/export 5 kredi

Veritabanını SQL, JSON veya CSV formatında dışa aktar.

Formatİçerik
sqlINSERT komutları
jsonJSON array formatı
csvCSV satırları
curl -X POST "https://apiverse.com.tr/api/v1?route=sqldb/export" \
  -H "X-API-Key: af_key" \
  -H "Content-Type: application/json" \
  -d '{"format": "json"}'

İthalatçı (8 kredi):

curl -X POST "https://apiverse.com.tr/api/v1?route=sqldb/import" \
  -H "X-API-Key: af_key" \
  -H "Content-Type: application/json" \
  -d '{
    "format": "json",
    "data": {
      "users": [
        {"id": 1, "name": "John", "email": "john@example.com"}
      ]
    }
  }'

Veritabanı Bilgisi

GET /api/v1?route=sqldb/info 1 kredi

Veritabanı boyutu, tablo sayısı ve diğer metabilgileri al.

curl "https://apiverse.com.tr/api/v1?route=sqldb/info" \
  -H "X-API-Key: af_key"

Yanıt:

{
  "success": true,
  "database": "user@example.com.db",
  "table_count": 5,
  "size_bytes": 102400,
  "size_readable": "100 KB",
  "sqlite_version": "3.35.0"
}

📁 File API

JPG, PNG, PDF, DOC, ZIP, MP3 ve daha pek çok dosya türünü güvenle barındırın. Her kullanıcının izole edilmiş dosya deposu vardır. Desteklenen tüm türler: jpg, jpeg, png, gif, webp, pdf, doc, docx, xls, xlsx, ppt, pptx, txt, csv, zip, rar, 7z, tar, gz, mp3, wav, ogg, flac, aac (max 50MB).

🔒 Dosyalara doğrudan erişim kapalıdır. Dosyalar API üzerinden base64 olarak alınabilir. Güvenlik: MIME kontrolü, içerik taraması, uzantı blacklist (php, html, js, exe, sh vb.), execute izni yok.

Dosya Yükle

POST /api/v1?route=files/upload 2 kredi

Multipart file upload veya URL ile dosya yükleyin.

ParametreTürAçıklama
filefilemultipartDosya (multipart/form-data)
urlstringveya URLDosya URL'si
# Multipart yükleme:
curl -X POST "https://apiverse.com.tr/api/v1?route=files/upload" \
  -H "X-API-Key: af_key" \
  -F "file=@/path/to/resim.jpg"

# URL'den yükleme:
curl -X POST "https://apiverse.com.tr/api/v1?route=files/upload" \
  -H "X-API-Key: af_key" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/image.jpg"}'

Yanıt:

{
  "success": true,
  "file": {
    "id": "af_1a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6p",
    "name": "resim.jpg",
    "original_name": "resim.jpg",
    "mime": "image/jpeg",
    "size": 24576,
    "size_readable": "24 KB",
    "extension": "jpg",
    "uploaded_at": 1715412345
  },
  "credits_used": 2,
  "credits_remaining": 98
}

Dosyaları Listele

GET /api/v1?route=files/list 1 kredi

Tüm dosyalarınızı meta bilgileriyle listeler.

curl "https://apiverse.com.tr/api/v1?route=files/list" \
  -H "X-API-Key: af_key"

Yanıt:

{
  "success": true,
  "files": [
    {
      "id": "af_1a2b3c4d5e6f7g8h",
      "name": "resim.jpg",
      "mime": "image/jpeg",
      "size": 24576,
      "size_readable": "24 KB",
      "extension": "jpg",
      "uploaded_at": 1715412345
    }
  ],
  "count": 1,
  "credits_used": 1
}

Dosya İndir (base64)

POST /api/v1?route=files/get 2 kredi

Dosyayı base64 formatında indirin.

ParametreAçıklama
id *Dosya ID (af_...)
curl -X POST "https://apiverse.com.tr/api/v1?route=files/get" \
  -H "X-API-Key: af_key" \
  -H "Content-Type: application/json" \
  -d '{"id": "af_1a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6p"}'

Yanıt:

{
  "success": true,
  "file": {
    "id": "af_...",
    "name": "resim.jpg",
    "mime": "image/jpeg",
    "size": 24576,
    "extension": "jpg"
  },
  "data_base64": "/9j/4AAQSkZJRg...",
  "data_size": 24576,
  "credits_used": 2
}

Dosya Bilgisi

GET /api/v1?route=files/info 1 kredi

Tek bir dosyanın meta bilgisini getirir (içerik döndürmez).

ParametreAçıklama
id *Dosya ID
curl "https://apiverse.com.tr/api/v1?route=files/info&id=af_..." \
  -H "X-API-Key: af_key"

Dosya Sil

POST /api/v1?route=files/delete 1 kredi

Dosyayı ve meta bilgisini kalıcı olarak siler.

ParametreAçıklama
id *Dosya ID
curl -X POST "https://apiverse.com.tr/api/v1?route=files/delete" \
  -H "X-API-Key: af_key" \
  -H "Content-Type: application/json" \
  -d '{"id": "af_..."}'

Dosya Adı Değiştir

POST /api/v1?route=files/rename 1 kredi

Dosyanın görünen adını değiştirir.

ParametreAçıklama
id *Dosya ID
name *Yeni dosya adı (örn: yeni_resim.jpg)
curl -X POST "https://apiverse.com.tr/api/v1?route=files/rename" \
  -H "X-API-Key: af_key" \
  -H "Content-Type: application/json" \
  -d '{"id": "af_...", "name": "yeni_ad.jpg"}'

🤖 DeepSeek AI — Chat (v2)

POST /api/v2/?route=deepseek/chat 1 token/kredi DeepSeek v4 Flash ile sohbet

Gönderdiğiniz mesajlara DeepSeek v4 Flash yapay zeka modeli ile yanıt alın. 1 token = 1 kredi olarak DeepSeek token bakiyenizden düşer.

ParametreTürAçıklama
messagesarrayZorunluSohbet geçmişi: [{role:"user/system/assistant", content:"..."}]
modelstringOpsiyonelModel adı (varsayılan: deepseek-chat)
temperaturefloatOpsiyonelYaratıcılık seviyesi (0-1, varsayılan: 0.7)
max_tokensintOpsiyonelMaksimum yanıt uzunluğu (varsayılan: 1000)
curl -X POST "https://apiverse.com.tr/api/v2/?route=deepseek/chat" \
  -H "X-API-Key: af_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-chat",
    "temperature": 0.7,
    "messages": [
      {"role": "system", "content": "Sen yardımcı bir yapay zeka asistanısın."},
      {"role": "user", "content": "Merhaba, nasılsın?"}
    ]
  }'

// Yanıt:
{
  "success": true,
  "choices": [{"message": {"role": "assistant", "content": "Merhaba! Ben iyiyim..."}}],
  "usage": {"prompt_tokens": 25, "completion_tokens": 15, "total_tokens": 40},
  "tokens_used": 40,
  "tokens_remaining": 960
}

Completions (Tamamlama)

POST /api/v2/?route=deepseek/completions 1 token/kredi

Metin tamamlama modeli. Prompt ile başlatın, AI tamamlasın.

curl -X POST "https://apiverse.com.tr/api/v2/?route=deepseek/completions" \
  -H "X-API-Key: af_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-coder",
    "prompt": "def fibonacci(n):",
    "max_tokens": 200,
    "temperature": 0.3
  }'

Hata Kodları

KodAçıklama
401API anahtarı geçersiz veya eksik
402Yetersiz kredi
403Hesap askıya alınmış
404Kaynak bulunamadı
429Rate limit aşıldı
500Sunucu hatası