API Hadis dengan terjemahan dari 9 perawi, data dalam file JSON lokal.
- Get hadiths by narrator (
/api/v1/hadis/:slug) - Get a specific hadith by narrator and number (
/api/v1/hadis/:slug/:number) - Get list of available narrators (
/api/v1/narrators) - Swagger documentation
- Pagination and search support
GET /api/v1/narrators
Returns a list of all available hadith narrators.
GET /api/v1/hadis/:slug
Returns all hadiths from a specific narrator.
Query parameters:
page: Page number for pagination (default: 1)limit: Number of hadiths per page (default: 10, max: 100)q: Search query to filter hadiths
GET /api/v1/hadis/:slug/:number
Returns a specific hadith from a narrator by its number.
Each hadith is stored in the following format:
{
"number": 1,
"arab": "حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ...",
"id": "Telah menceritakan kepada kami Abu Bakar bin Abu Syaibah..."
}# Clone repository
git clone https://github.com/kyyril/hadith-api.git
# Navigate to the project
cd hadith-api
# Run the server
go run main.go
# The server will start on port 8080 by defaultThis API is designed to be deployable on Vercel.
Swagger documentation is available at /swagger/index.html when running the server.