🕌 WaqfData API

Free Islamic educational content API with AI-friendly metadata. Access structured JSON data for Asma ul Husna, Tajweed, Dhul-Hijjah benefits, and more.

📊

Schema Analysis

/_meta returns full schema with field types and examples

🔍

Global Search

/_search?q=term searches across all datasets

📄

Pagination

?_limit=N&_offset=M for paginated results

🔀

Sorting

?_sort=field or ?_sort=-field for desc

🔎

Partial Matching

?field_like=text for substring search

💡

Smart Errors

Typo suggestions and available values on empty results

Quick Start

# Get API schema (great for AI agents)
curl https://api.waqf.dev/_meta

# Search across all datasets
curl "https://api.waqf.dev/_search?q=الصلاة"

# Get paginated benefits
curl "https://api.waqf.dev/44fth?_limit=5&_offset=0"

# Get specific endpoint schema with samples
curl https://api.waqf.dev/44fth/_meta

# Filter by field value
curl "https://api.waqf.dev/44fth?category_ar=الذكر"

# Select specific fields only
curl "https://api.waqf.dev/44fth?_fields=id,title_short_ar"

# Sort results ascending by field
curl "https://api.waqf.dev/44fth?_sort=id"

# Sort results descending (prefix with -)
curl "https://api.waqf.dev/44fth?_sort=-id"

# Partial text matching with _like suffix
curl "https://api.waqf.dev/44fth?title_short_ar_like=الحج"

# Filter by multiple values (OR logic)
curl "https://api.waqf.dev/44fth?id=1,2,3"

# Health check endpoint
curl https://api.waqf.dev/_health

# OpenAPI specification
curl https://api.waqf.dev/_openapi

Query Parameters

Parameter Description Example
?field=value Filter by exact field match (works on nested arrays) ?id=1, ?category_ar=الذكر
?field=v1,v2,v3 Filter by multiple values (OR logic within field) ?id=1,2,3, ?bloom_level=Remembering,Understanding
?field_like=text Partial text matching (substring search with Arabic normalization) ?title_short_ar_like=الحج
?_sort=field Sort results ascending by field ?_sort=id
?_sort=-field Sort results descending by field (prefix with -) ?_sort=-id
?_limit=N Limit results to N items (max 100, enables pagination) ?_limit=10
?_offset=N Skip first N items (for pagination) ?_offset=10
?_fields=a,b Return only specified fields (comma-separated) ?_fields=id,title_short_ar

Special Endpoints

GET /_health

Health check endpoint for monitoring API availability. Returns current status, timestamp, and version information.

Response:
{ "status": "healthy", "timestamp": "2024-01-01T00:00:00.000Z", "version": "1.0.0" }
GET /_openapi

OpenAPI 3.0 specification document. Use for client code generation, API documentation tools, or understanding the complete API contract. Also available at /_openapi.json.

Includes: All endpoints, query parameters, response schemas, and example values
GET /_meta

Returns comprehensive schema for all endpoints. Ideal for AI agents to understand available data, field types, and generate queries.

Response includes: field types, nested arrays, searchable fields, filterable fields, statistics (min/max), query examples
GET /_search?q=<term>

Global full-text search across all datasets. Supports Arabic text with automatic normalization (tashkeel, alef variants).

Examples:
Search for "الرحمن" /_search?q=الرحمن

Data Endpoints

GET /44fth

٤٤ فائدة في عشر ذي الحجة - 44 Benefits in Dhul-Hijjah by Sheikh al-Munajjid

Available fields: id, page_pdf, title_short_ar, text_ar, category_ar, reference_ar, reference_url, hashtag_ar
Examples:
Get all benefits /44fth
Get benefit by ID /44fth?id=1
Filter by category /44fth?category_ar=الذكر
Paginate (first 5) /44fth?_limit=5&_offset=0
Sort by ID descending /44fth?_sort=-id
Partial match on title /44fth?title_short_ar_like=الحج
Multiple IDs (OR) /44fth?id=1,2,3
GET /AsmaaHusna

أسماء الله الحسنى - The Beautiful Names of Allah with detailed explanations, Quran references, and Sunnah references

Available fields: names.number, names.name_arabic, names.knowledge_section, names.quran_references, names.sunnah_references, names.conduct_section
Examples:
Get all names /AsmaaHusna
Get schema /AsmaaHusna/_meta
Sort by number /AsmaaHusna?_sort=number
GET /MenhajDareseen-p79p102

أسئلة التجويد - Tajweed Questions categorized by Bloom's Taxonomy levels

Available fields: id, bloom_level, question, options, correct_answer, explanation
Examples:
Get all questions /MenhajDareseen-p79p102
Get question by ID /MenhajDareseen-p79p102?id=1
GET /alEmanBeAllah

الإيمان بالله - Faith in Allah book content with chapters and pages

Available fields: book_title, main_theme, introduction, chapters.title, chapters.pages
Examples:
Get full book /alEmanBeAllah
GET /fatwaCategories

Dataset: fatwaCategories

Available fields: id, title, sections, slug
Examples:
Get all fatwaCategories /fatwaCategories
Filter by id /fatwaCategories?id=1
GET /fatwaCategoriesMin

Dataset: fatwaCategoriesMin

Available fields: id, title, slug, sections
Examples:
Get all fatwaCategoriesMin /fatwaCategoriesMin

Response Format

Standard responses return JSON. When pagination is used, the response includes metadata:

{
  "data": { ... },
  "pagination": {
    "total": 44,
    "limit": 5,
    "offset": 0,
    "hasMore": true
  }
}

When a query has invalid fields, you get helpful suggestions:

{
  "data": [],
  "validation_errors": ["Unknown field: categori_ar"],
  "suggestions": { "did_you_mean": "category_ar" }
}

Response Headers

Header Description
X-Request-Id Unique identifier for request tracing and debugging
X-RateLimit-Limit Maximum requests allowed per time window
X-RateLimit-Remaining Remaining requests in current window
X-RateLimit-Reset Unix timestamp when the rate limit window resets
Cache-Control Caching directive (max-age for data endpoints, no-cache for /_meta and /_health)
ETag Content hash for cache validation