API Dökümanları
Tüm API endpoint'leri, parametreleri ve örnek kullanımları.
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
| Parametre | Tür | Açıklama | |
|---|---|---|---|
mail_config_id | int | Zorunlu | Dashboard'dan eklediğiniz SMTP yapılandırma ID'si |
to | string | Zorunlu | Alıcı e-posta adresi |
subject | string | Zorunlu | Mail konusu |
body | string | Zorunlu | Mail içeriği (HTML destekli) |
is_html | bool | Opsiyonel | HTML 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
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
# Ş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
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ı
curl "https://apiverse.com.tr/api/v1/?route=currency/rates&base=TRY" -H "X-API-Key: af_key"
🗺️ IP Sorgulama
curl "https://apiverse.com.tr/api/v1/?route=ip/lookup&ip=8.8.8.8" -H "X-API-Key: af_key"
📊 QR Kod
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
# 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
Son depremleri listeler. Bölge (Türkiye veya dünya), büyüklük ve zaman aralığı ile filtrele.
| Parametre | Açıklama | Varsayılan |
|---|---|---|
| limit | Sonuç sayısı (1-100) | 20 |
| minmagnitude | Minimum büyüklük | 1.0 |
| days | Son kaç gün (1-30) | 7 |
| region | turkey veya world | world |
# 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
}Belirtilen koordinata yakın depremleri getirir. Mesafeye göre sıralar.
| Parametre | Açıklama | Varsayılan |
|---|---|---|
| latitude | Enlem (ondalık) | 39.0 |
| longitude | Boylam (ondalık) | 35.0 |
| radius_km | Arama yarıçapı km (10-500) | 200 |
| limit | Sonuç sayısı (1-20) | 5 |
| days | Son kaç gün (1-30) | 30 |
| minmagnitude | Minimum büyüklük | 1.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"
Canlı sismik dalga verilerini GeoJSON formatında döndürür. Harita ve görselleştirme uygulamaları için tasarlanmıştır.
| Parametre | Açıklama | Varsayılan |
|---|---|---|
| hours | Son kaç saat (1-24) | 1 |
| minmagnitude | Minimum büyüklük | 0.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
Büyüklük dağılımı ve periyot bazlı istatistikler.
| Parametre | Açıklama | Varsayılan |
|---|---|---|
| days | Periyot (1-30) | 30 |
| region | turkey veya world | world |
curl "https://apiverse.com.tr/api/v1/?route=earthquake/stats®ion=turkey&days=30" \ -H "X-API-Key: af_key"
Tek bir deprem olayının tüm detaylarını getirir.
| Parametre | Açıklama |
|---|---|
| event_id | USGS 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
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.
| Parametre | Açıklama | Örnek |
|---|---|---|
| sql * | Çalıştırılacak SQL sorgusu | SELECT * 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
Tablo oluştur, sil, temizle veya tablo bilgilerini al.
| Parametre | Açı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
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
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çı
Veritabanını SQL, JSON veya CSV formatında dışa aktar.
| Format | İçerik |
|---|---|
| sql | INSERT komutları |
| json | JSON array formatı |
| csv | CSV 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
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
Multipart file upload veya URL ile dosya yükleyin.
| Parametre | Tür | Açıklama | |
|---|---|---|---|
file | file | multipart | Dosya (multipart/form-data) |
url | string | veya URL | Dosya 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
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)
Dosyayı base64 formatında indirin.
| Parametre | Açı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
Tek bir dosyanın meta bilgisini getirir (içerik döndürmez).
| Parametre | Açıklama |
|---|---|
| id * | Dosya ID |
curl "https://apiverse.com.tr/api/v1?route=files/info&id=af_..." \ -H "X-API-Key: af_key"
Dosya Sil
Dosyayı ve meta bilgisini kalıcı olarak siler.
| Parametre | Açı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
Dosyanın görünen adını değiştirir.
| Parametre | Açı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)
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.
| Parametre | Tür | Açıklama | |
|---|---|---|---|
messages | array | Zorunlu | Sohbet geçmişi: [{role:"user/system/assistant", content:"..."}] |
model | string | Opsiyonel | Model adı (varsayılan: deepseek-chat) |
temperature | float | Opsiyonel | Yaratıcılık seviyesi (0-1, varsayılan: 0.7) |
max_tokens | int | Opsiyonel | Maksimum 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)
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ı
| Kod | Açıklama |
|---|---|
| 401 | API anahtarı geçersiz veya eksik |
| 402 | Yetersiz kredi |
| 403 | Hesap askıya alınmış |
| 404 | Kaynak bulunamadı |
| 429 | Rate limit aşıldı |
| 500 | Sunucu hatası |