---
title: "Creart-TDK-Dictionary-API Proje Dokümanı"
canonical: https://hamzadenizyilmaz.com.tr/dokumanlar/github-creart-tdk-dictionary-api
author: "Hamza Deniz Y\u0131lmaz"
created: 2025-11-22T12:56:22.0000000+00:00
---

# Creart-TDK-Dictionary-API Proje Dokümanı

## Proje özeti

Advanced Node.js module for Turkish Language Association (TDK) dictionary data

| Alan | GitHub bilgisi |
|---|---|
| Depo | [hamzadenizyilmaz/Creart-TDK-Dictionary-API](https://github.com/hamzadenizyilmaz/Creart-TDK-Dictionary-API) |
| Ana dil | JavaScript |
| Varsayılan dal | `main` |
| Lisans | GPL-3.0 |
| Oluşturulma | 2025-11-22 |
| Son kaynak güncellemesi | 2025-12-09 |

## Proje README belgesi

# 🇹🇷 Creart TDK Dictionary API - Advanced Node.js Module

[](https://github.com/hamzadenizyilmaz/Creart-TDK-Dictionary-API) 

**Advanced Node.js module for accessing Turkish Language Institution (TDK) official dictionary data with advanced features like wildcard search, spell checking, daily word, and more!**

## ✨ **New in v1.4.0**

### 🚀 **New Features Added**
- ✅ **Asterisk/Wildcard Search** - Advanced pattern matching
- ✅ **Spell Checking** - Real-time Turkish spell checking with suggestions
- ✅ **Daily Word** - Get word of the day with meaning
- ✅ **Proverbs & Idioms** - Separate proverb/idiom search functionality
- ✅ **Similar Words** - Find semantically similar words
- ✅ **Letter-based Search** - Find words by starting letter
- ✅ **Popular Searches** - Get most searched words
- ✅ **Random Word** - Discover random Turkish words
- ✅ **Pronunciation** - Word pronunciation and audio support
- ✅ **Caching System** - Performance optimization with cache
- ✅ **Rate Limiting** - API protection
- ✅ **Batch Operations** - Multiple word search
- ✅ **Health Check** - System monitoring
- ✅ **Advanced Error Handling** - Better error messages
- ✅ **API Server** - Built-in Express.js server

## 📦 **Installation**

```bash
npm install creart-tdk
# or
yarn add creart-tdk
```

## 🚀 **Quick Start**

### **Basic Usage**
```javascript
const TDKSozluk = require('creart-tdk');

// Create instance
const tdk = new TDKSozluk();

// Search word
const result = await tdk.ara('merhaba');
console.log(result.data.kelime); // "merhaba"
console.log(result.data.anlamlar); // Meanings array
```

### **Asterisk Search (NEW!)**
```javascript
// Wildcard search: "k?tap" finds words like "kitap", "katap"
const wildcardResult = await tdk.asteriskAra('k?tap');

// Multiple unknowns: "k???p" finds 5-letter words
const multiResult = await tdk.asteriskAra('k???p');

// Length specific: "k*p,5" finds 5-letter k...p words
const lengthResult = await tdk.asteriskAra('k*p,5');
```

### **Spell Checking (NEW!)**
```javascript
const spellCheck = await tdk.yazimDenetimi('Türkçe yazım öreneği');
console.log(spellCheck.data.istatistik.dogrulukOrani); // 75%
console.log(spellCheck.data.sonuclar[3].oneriler); // ["örneği", "örnek", "ören"]
```

## 📖 **Complete Usage Examples**

### **1. Full Feature Usage**
```javascript
const TDKSozluk = require('creart-tdk');
const tdk = new TDKSozluk({
  cache: true,
  timeout: 15000
});

// Word search with all features
const wordResult = await tdk.ara('kitap', {
  telaffuz: true,          // Include pronunciation
  cacheTTL: 3600          // Cache for 1 hour
});

// Get today's word
const dailyWord = await tdk.gununKelimesi();

// Spell check
const spellCheck = await tdk.yazimDenetimi('Merhaba dünya!');

// Find proverbs
const proverbs = await tdk.atasozuAra('ağaç');

// Find similar words
const similar = await tdk.benzerKelimeler('sevgi', 5);

// Find words by letter
const letterWords = await tdk.harfeGoreKelimeler('a', 1, 10);

// Get popular searches
const popular = await tdk.populerAramalar(10);

// Get random word
const random = await tdk.rastgeleKelime();

// Get pronunciation
const pronunciation = await tdk.sesGetir('merhaba');
```

### **2. API Server Usage**
```javascript
const { createServer } = require('creart-tdk');

// Start API server
createServer({
  port: 3000,
  apiPath: '/api/v1',
  corsOrigin: 'https://yourdomain.com',
  rateLimitMax: 100,
  tdk: {
    cache: true,
    timeout: 20000
  }
});
```

## 🌐 **API Endpoints**

When running as a server, these endpoints are available:

| Method | Endpoint | Description |
|--------|----------|-------------|
| `GET` | `/api/kelime/:kelime` | Word search with details |
| `GET` | `/api/asterisk/:pattern` | **NEW!** Asterisk pattern search |
| `GET` | `/api/gunun-kelimesi` | Word of the day |
| `POST` | `/api/yazim-denetimi` | Spell checking |
| `GET` | `/api/atasozu/:anahtar` | Proverbs and idioms |
| `GET` | `/api/benzer/:kelime` | Similar words |
| `GET` | `/api/harf/:harf` | Words by letter |
| `GET` | `/api/populer` | Popular searches |
| `GET` | `/api/rastgele` | Random word |
| `GET` | `/api/ses/:kelime` | Pronunciation |
| `POST` | `/api/batch` | Batch word search |
| `GET` | `/api/health` | Health check |
| `GET` | `/api/cache/stats` | Cache statistics |
| `DELETE` | `/api/cache` | Clear cache |

## 🔧 **Advanced Configuration**

### **Class Options**
```javascript
const tdk = new TDKSozluk({
  baseURL: 'https://sozluk.gov.tr/',
  timeout: 15000,          // Request timeout
  retryCount: 3,          // Retry attempts
  cache: true,           // Enable caching
  // ... other options
});
```

### **Search Options**
```javascript
const result = await tdk.ara('kelime', {
  telaffuz: true,        // Include pronunciation
  cacheTTL: 1800,        // Cache time in seconds
  // Advanced options...
});
```

## 🎯 **Asterisk Search Patterns**

### **Pattern Examples:**
```
k?tap     → Matches: "kitap", "katap", "kutap"
k???p     → Matches 5-letter words: "kalıp", "künyep"
a*a       → Matches: "ada", "araba", "aşkla"
k*p,5     → Matches 5-letter words: "kalıp", "kavup"
?e?me     → Matches: "gelme", "değme", "seçme"
```

### **Pattern Rules:**
- `?` - Any single character
- `*` - Any number of characters (including zero)
- `,` - Length specifier (e.g., `,5` for 5 letters)
- Case insensitive
- Turkish character support

## 📊 **Response Structure**

### **Word Search Response:**
```javascript
{
  success: true,
  data: {
    kelime: "merhaba",
    temelBilgiler: {
      madde: "merhaba",
      lisan: "Arapça",
      ozel_mi: false,
      cogul_mu: false
    },
    anlamlar: [
      {
        sira: 1,
        anlam: "Selam vermek, selamlaşmak",
        ornekler: ["Merhaba arkadaş!"],
        kullanim: "ünlem"
      }
    ],
    ornekler: [...],
    atasozleri: [...],
    deyimler: [...],
    birlesikler: [...],
    etimoloji: { /* etymology */ },
    telaffuz: "mer-ha-ba",
    sesDosyasi: "https://.../merhaba.mp3",
    kullanimTuru: ["ünlem", "isim"],
    metadata: {
      islemSuresi: "450ms",
      veriKaynaklari: 5,
      tamVeri: true
    }
  },
  metadata: {
    source: "TDK Sözlük",
    version: "1.4.0",
    timestamp: "2024-01-15T10:30:00.000Z"
  }
}
```

### **Spell Check Response:**
```javascript
{
  success: true,
  data: {
    metin: "Türkçe yazım öreneği",
    sonuclar: [
      { kelime: "Türkçe", dogru: true, oneriler: [] },
      { kelime: "yazım", dogru: true, oneriler: [] },
      { kelime: "denetimi", dogru: true, oneriler: [] },
      { kelime: "öreneği", dogru: false, oneriler: ["örneği", "örnek", "ören"] }
    ],
    istatistik: {
      toplamKelime: 4,
      dogruKelime: 3,
      hataliKelime: 1,
      dogrulukOrani: "75.00"
    }
  }
}
```

## 🛡 **Error Handling**

```javascript
try {
  const result = await tdk.ara('gecersizkelime123');
  
  if (!result.success) {
    console.error('Hata:', result.error.message);
    console.error('Detay:', result.error.details);
    console.error('Kod:', result.error.code);
  }
} catch (error) {
  console.error('Beklenmeyen hata:', error);
}
```

## ⚡ **Performance Features**

### **Caching System**
- Automatic response caching
- Configurable TTL
- Cache statistics
- Manual cache clearing

### **Rate Limiting**
- Built-in rate limiting
- Customizable limits
- Fair usage protection

### **Batch Operations**
```javascript
const batchResult = await fetch('/api/batch', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    kelimeler: ['merhaba', 'teşekkür', 'sevgi', 'aşk']
  })
});
```

## 🚀 **Running as API Server**

### **Start Server:**
```bash
# Direct execution
node index.js

# Using npm script
npm start

# With custom port
PORT=8080 node index.js
```

### **Docker Support:**
```dockerfile
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 3000
CMD ["node", "index.js"]
```

## 🧪 **Testing**

### **Run Tests:**
```bash
# Basic tests
node test.js

# With server tests
node test.js --server

# Performance tests
node test.js --performance
```

### **Test Examples:**
```javascript
const test = require('./test');
await test.runAllTests();
await test.runPerformanceTest();
await test.runServerTest();
```

## 🔧 **Development**

### **Requirements:**
- Node.js >= 14.0.0
- npm or yarn

### **Setup Development:**
```bash
git clone https://github.com/hamzadenizyilmaz/Creart-TDK-Dictionary-API.git
cd Creart-TDK-Dictionary-API
npm install

# Create word database
node -e "const tdk = require('./index'); new tdk();"

# Run development server
npm run dev
```

### **Build for Production:**
```bash
npm run build
npm test
npm publish
```

## 🤝 **Contributing**

We welcome contributions! Here's how:

1. **Fork** the repository
2. **Create** feature branch: `git checkout -b feature/amazing-feature`
3. **Commit** changes: `git commit -m 'Add amazing feature'`
4. **Push** to branch: `git push origin feature/amazing-feature`
5. **Open** Pull Request

### **Contribution Guidelines:**
- Follow existing code style
- Add tests for new features
- Update documentation
- Ensure backward compatibility

## 📊 **Statistics**

- **Word Database**: ~10,000+ Turkish words
- **Response Time**:  60% with caching
- **API Success Rate**: > 98%
- **Memory Usage**: 

### **Made with ❤️ for the Turkish language community**

**Hamza Deniz Yılmaz** · [GitHub](https://github.com/hamzadenizyilmaz) · [Website](https://hamzadenizyilmaz.com)

## 📦 **Updated package.json**

```json
{
  "name": "creart-tdk",
  "version": "1.4.0",
  "description": "Creart TDK Dictionary API is an advanced Node.js module that provides easy access to the Turkish Language Association (TDK) dictionary data. It allows developers to retrieve word definitions, synonyms, antonyms, and other linguistic information programmatically.",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/hamzadenizyilmaz/Creart-TDK-Dictionary-API.git"
  },
  "keywords": [
    "tdk",
    "turkish",
    "dictionary",
    "language",
    "api",
    "turkish-language",
    "etymology",
    "proverbs",
    "sozluk",
    "turkce",
    "nlp",
    "linguistics",
    "turkish-dictionary",
    "tdk-api",
    "turkish-words",
    "language-processing",
    "turkish-nlp"
  ],
  "author": {
    "name": "Hamza Deniz Yılmaz",
    "url": "https://hamzadenizyilmaz.com",
    "email": "hamzadenizyilmaz@creartcloud.com"
  },
  "license": "MIT",
  "bugs": {
    "url": "https://github.com/hamzadenizyilmaz/Creart-TDK-Dictionary-API/issues"
  },
  "homepage": "https://github.com/hamzadenizyilmaz/Creart-TDK-Dictionary-API#readme",
  "dependencies": {
    "axios": "^1.6.0",
    "express": "^4.18.2",
    "cors": "^2.8.5",
    "helmet": "^7.0.0",
    "express-rate-limit": "^7.1.5",
    "node-cache": "^5.1.2"
  }
}
```

## Kaynak ve doğrulama

- [GitHub deposunu açın](https://github.com/hamzadenizyilmaz/Creart-TDK-Dictionary-API)
- [README dosyasının ham sürümü](https://raw.githubusercontent.com/hamzadenizyilmaz/Creart-TDK-Dictionary-API/main/README.md)
- [Kaynak kodu ZIP olarak indirin](https://github.com/hamzadenizyilmaz/Creart-TDK-Dictionary-API/archive/refs/heads/main.zip)

Bu sayfadaki depo tarihleri ve teknik metadata GitHub public API kaydından alınmıştır. İçeriğin otoritatif ve en güncel sürümü GitHub deposudur.

## Creart-TDK-Dictionary-API Proje Dokümanı — kaynak ve uygulama notları

### Proje ve belgeyi birlikte değerlendirin

Bu kayıt için kaynak açıklama korunmuştur. Kurulum, bağımlılık ve lisans kararlarında bu kayda bağlı proje ve dokümanı birlikte inceleyin; doğrulanmamış sürüm, ölçüm veya özellik bu ekle ilan edilmemiştir.

### Metinde geçen depo bağlantıları

- [Depo bağlantısı](https://github.com/hamzadenizyilmaz/Creart-TDK-Dictionary-API)

- [Depo bağlantısı](https://github.com/hamzadenizyilmaz/Creart-TDK-Dictionary-API.git)

### İlgili okuma yolu

- [Creart TDK Dictionary API](/projeler/creart-tdk-dictionary-api)

- [Creart-Firewall-API Proje Dokümanı](/dokumanlar/github-creart-firewall-api)

- [Creart-Backup-and-Management-Software Proje Dokümanı](/dokumanlar/github-creart-backup-and-management-software)
